[x265] [PATCH] TComYuv::addAvg, primitive function for luma and chroma loops

chen chenm003 at 163.com
Mon Nov 18 10:47:49 CET 2013


>@@ -640,26 +621,9 @@
>         width  >>= m_hChromaShift;
>         height >>= m_vChromaShift;
> 
>-        for (y = height - 1; y >= 0; y--)
>-        {
>-            for (x = width - 1; x >= 0; )
>-            {
>-                // note: chroma min width is 2
>-                dstU[x] = ClipC((srcU0[x] + srcU1[x] + offset) >> shiftNum);
>-                dstV[x] = ClipC((srcV0[x] + srcV1[x] + offset) >> shiftNum);
>-                x--;
>-                dstU[x] = ClipC((srcU0[x] + srcU1[x] + offset) >> shiftNum);
>-                dstV[x] = ClipC((srcV0[x] + srcV1[x] + offset) >> shiftNum);
>-                x--;
>-            }
>-
>-            srcU0 += src0Stride;
>-            srcU1 += src1Stride;
>-            srcV0 += src0Stride;
>-            srcV1 += src1Stride;
>-            dstU  += dststride;
>-            dstV  += dststride;
>-        }
>+        int part = partitionFromSizes(width, height);
you use Chroma size to get index, I think is error.
 
>+        primitives.chroma_addAvg[part](dstU, dststride, srcU0, src0Stride, srcU1, src1Stride);
>+        primitives.chroma_addAvg[part](dstV, dststride, srcV0, src0Stride, srcV1, src1Stride);
>     }
> }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20131118/9cc2d02c/attachment.html>


More information about the x265-devel mailing list