[x265-commits] [x265] TEncSearch: validate unidirectional MVPs prior to trying ...
Steve Borho
steve at borho.org
Fri Mar 21 04:01:05 CET 2014
details: http://hg.videolan.org/x265/rev/e06f2a068622
branches:
changeset: 6566:e06f2a068622
user: Steve Borho <steve at borho.org>
date: Thu Mar 20 17:21:49 2014 -0500
description:
TEncSearch: validate unidirectional MVPs prior to trying MV0 bidir (closes #34)
This should fix some rare non-determinism as well as prevent the crash seen
in issue #34. [CHANGES OUTPUTS]
Subject: [x265] encoder: auto-disable weightp with 4:4:4 inputs, until it is fixed
details: http://hg.videolan.org/x265/rev/fe3fcd9838c0
branches:
changeset: 6567:fe3fcd9838c0
user: Steve Borho <steve at borho.org>
date: Thu Mar 20 19:06:54 2014 -0500
description:
encoder: auto-disable weightp with 4:4:4 inputs, until it is fixed
diffstat:
source/Lib/TLibEncoder/TEncSearch.cpp | 19 +++++++++++++++++--
source/encoder/encoder.cpp | 5 +++++
2 files changed, 22 insertions(+), 2 deletions(-)
diffs (45 lines):
diff -r 8830c8bf15cb -r fe3fcd9838c0 source/Lib/TLibEncoder/TEncSearch.cpp
--- a/source/Lib/TLibEncoder/TEncSearch.cpp Thu Mar 20 16:01:49 2014 -0500
+++ b/source/Lib/TLibEncoder/TEncSearch.cpp Thu Mar 20 19:06:54 2014 -0500
@@ -2314,9 +2314,24 @@ bool TEncSearch::predInterSearch(TComDat
bidirBits = list[0].bits + list[1].bits + listSelBits[2] - (listSelBits[0] + listSelBits[1]);
bidirCost = satdCost + m_rdCost->getCost(bidirBits);
- if (list[0].mv.notZero() || list[1].mv.notZero())
+ MV mvzero(0, 0);
+ bool bTryZero = list[0].mv.notZero() || list[1].mv.notZero();
+ if (bTryZero)
{
- MV mvzero(0, 0);
+ /* Do not try zero MV if unidir motion predictors are beyond
+ * valid search area */
+ MV mvmin, mvmax;
+ int merange = X265_MAX(m_cfg->param->sourceWidth, m_cfg->param->sourceHeight);
+ xSetSearchRange(cu, mvzero, merange, mvmin, mvmax);
+ mvmax.y += 2; // there is some pad for subpel refine
+ mvmin <<= 2;
+ mvmax <<= 2;
+
+ bTryZero &= list[0].mvp.checkRange(mvmin, mvmax);
+ bTryZero &= list[1].mvp.checkRange(mvmin, mvmax);
+ }
+ if (bTryZero)
+ {
// coincident blocks of the two reference pictures
pixel *ref0 = m_mref[0][list[0].ref]->fpelPlane + (pu - fenc->getLumaAddr());
pixel *ref1 = m_mref[1][list[1].ref]->fpelPlane + (pu - fenc->getLumaAddr());
diff -r 8830c8bf15cb -r fe3fcd9838c0 source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp Thu Mar 20 16:01:49 2014 -0500
+++ b/source/encoder/encoder.cpp Thu Mar 20 19:06:54 2014 -0500
@@ -1411,6 +1411,11 @@ void Encoder::configure(x265_param *p)
x265_log(p, X265_LOG_WARNING, "!! HEVC Range Extension specifications are not finalized !!\n");
x265_log(p, X265_LOG_WARNING, "!! This output bitstream may not be compliant with the final spec !!\n");
}
+ if (p->internalCsp == X265_CSP_I444 && p->bEnableWeightedPred)
+ {
+ x265_log(p, X265_LOG_WARNING, "Weightp not supported for 4:4:4 internal color space, weightp disabled\n");
+ p->bEnableWeightedPred = false;
+ }
if (p->interlaceMode)
{
x265_log(p, X265_LOG_WARNING, "Support for interlaced video is experimental\n");
More information about the x265-commits
mailing list