[x265] [PATCH] clean asm findPosLast() output buffer to avoid debug check failure
Steve Borho
steve at borho.org
Mon Apr 20 17:22:17 CEST 2015
On 04/20, Min Chen wrote:
> # HG changeset patch
> # User Min Chen <chenm003 at 163.com>
> # Date 1429504876 -28800
> # Node ID bc9631ab9d36475c7d625fc9272ee0ddd7f5bfd7
> # Parent fa7494f2af81a513aa18222b9d6fdc7728090dac
> clean asm findPosLast() output buffer to avoid debug check failure
rolled into first patch of the series, which now passes smoke tests;
since this is doing surgery on rdo-quant, I'm going to run the full
regression tests before pushing this series.
> source/common/quant.cpp | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff -r fa7494f2af81 -r bc9631ab9d36 source/common/quant.cpp
> --- a/source/common/quant.cpp Mon Apr 20 12:41:13 2015 +0800
> +++ b/source/common/quant.cpp Mon Apr 20 12:41:16 2015 +0800
> @@ -579,6 +579,12 @@
> uint16_t coeffSign[MLS_GRP_NUM]; // bit mask map for non-zero coeff sign
> uint16_t coeffFlag[MLS_GRP_NUM]; // bit mask map for non-zero coeff
>
> +#if CHECKED_BUILD || _DEBUG
> + // clean output buffer, the asm version of findPosLast Never output anything after latest non-zero coeff group
> + memset(coeffNum, 0, sizeof(coeffNum));
> + memset(coeffSign, 0, sizeof(coeffNum));
> + memset(coeffFlag, 0, sizeof(coeffNum));
> +#endif
> const int lastScanPos = primitives.findPosLast(codeParams.scan, dstCoeff, coeffSign, coeffFlag, coeffNum, numSig);
> const int cgLastScanPos = (lastScanPos >> LOG2_SCAN_SET_SIZE);
>
>
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
--
Steve Borho
More information about the x265-devel
mailing list