[x265] [PATCH] fix hash mismatch for 422 format with HM 14.0_RExt decoder

ashok at multicorewareinc.com ashok at multicorewareinc.com
Mon Apr 28 15:03:24 CEST 2014


# HG changeset patch
# User Ashok Kumar Mishra<ashok at multicorewareinc.com>
# Date 1398687539 -19800
#      Mon Apr 28 17:48:59 2014 +0530
# Node ID 56b1d4a44798b1e8c0ea98a702ea53a975d254d1
# Parent  36e53135da57e975d58f3e21296d17c9482d9a50
fix hash mismatch for 422 format with HM 14.0_RExt decoder

diff -r 36e53135da57 -r 56b1d4a44798 source/Lib/TLibCommon/TComLoopFilter.cpp
--- a/source/Lib/TLibCommon/TComLoopFilter.cpp	Sun Apr 27 13:21:40 2014 -0500
+++ b/source/Lib/TLibCommon/TComLoopFilter.cpp	Mon Apr 28 17:48:59 2014 +0530
@@ -224,11 +224,12 @@
     uint32_t partIdxIncr = DEBLOCK_SMALLEST_BLOCK / pelsInPart ? DEBLOCK_SMALLEST_BLOCK / pelsInPart : 1;
 
     uint32_t sizeInPU = pic->getNumPartInCUSize() >> (depth);
+    uint32_t shiftFactor = (edge == EDGE_VER) ? cu->getHorzChromaShift() : cu->getVertChromaShift();
     const bool bAlwaysDoChroma = (cu->getChromaFormat() == CHROMA_444);
     for (uint32_t e = 0; e < sizeInPU; e += partIdxIncr)
     {
         xEdgeFilterLuma(cu, absZOrderIdx, depth, dir, e);
-        if (bAlwaysDoChroma || (pelsInPart > DEBLOCK_SMALLEST_BLOCK) || (e % ((DEBLOCK_SMALLEST_BLOCK << 1) / pelsInPart)) == 0)
+        if (bAlwaysDoChroma || (pelsInPart > DEBLOCK_SMALLEST_BLOCK) || (e % ((DEBLOCK_SMALLEST_BLOCK << shiftFactor) / pelsInPart)) == 0)
         {
             xEdgeFilterChroma(cu, absZOrderIdx, depth, dir, e);
         }


More information about the x265-devel mailing list