<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><DIV>>@@ -641,26 +629,8 @@<BR>> width >>= m_hChromaShift;<BR>> height >>= m_vChromaShift;<BR>> <BR>>- for (y = height - 1; y >= 0; y--)<BR>>- {<BR>>- for (x = width - 1; x >= 0; )<BR>>- {<BR>>- // note: chroma min width is 2<BR>>- dstU[x] = ClipC((srcU0[x] + srcU1[x] + offset) >> shiftNum);<BR>>- dstV[x] = ClipC((srcV0[x] + srcV1[x] + offset) >> shiftNum);<BR>>- x--;<BR>>- dstU[x] = ClipC((srcU0[x] + srcU1[x] + offset) >> shiftNum);<BR>>- dstV[x] = ClipC((srcV0[x] + srcV1[x] + offset) >> shiftNum);<BR>>- x--;<BR>>- }<BR>>-<BR>>- srcU0 += src0Stride;<BR>>- srcU1 += src1Stride;<BR>>- srcV0 += src0Stride;<BR>>- srcV1 += src1Stride;<BR>>- dstU += dststride;<BR>>- dstV += dststride;<BR>>- }<BR>>+ primitives.addAvg_c[part](dstU, dststride, srcU0, src0Stride, srcU1, src1Stride);<BR>>+ primitives.addAvg_c[part](dstV, dststride, srcV0, src0Stride, srcV1, src1Stride);<BR></DIV>
<BLOCKQUOTE id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV dir="ltr">
<DIV class="gmail_extra">
<DIV class="gmail_quote">
<BLOCKQUOTE class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV style="FONT-SIZE: 14px; LINE-HEIGHT: 1.7; FONT-FAMILY: arial">
<DIV>I guess you use luma index here will be wrong size for chroma</DIV></DIV></BLOCKQUOTE>
<DIV> </DIV>
<DIV><BR></DIV>
<DIV>No, it is correct to use the luma partition enum here.</DIV>
<DIV> </DIV>
<DIV>They old code not split into luma_addAvg[] and chroma_addAvg[], so reuse index is right, but really size wrong</DIV>
<DIV> </DIV>
<BLOCKQUOTE class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV style="FONT-SIZE: 14px; LINE-HEIGHT: 1.7; FONT-FAMILY: arial">
<DIV>
<DIV class="h5">
<DIV>>+<BR>>+ addAvg_t addAvg_c[NUM_LUMA_PARTITIONS];<BR></DIV></DIV></DIV>
<DIV>name addAvg_c is for C reference code, here use addAvg is better</DIV></DIV></BLOCKQUOTE>
<DIV><BR></DIV>
<DIV>agreed </DIV></DIV></DIV></DIV></BLOCKQUOTE></div>