<div dir="ltr">agreed. I am doing unnecessary initialization for mergeSaoParam. It's not at all required.<div>I am sending the updated patch now.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 20, 2015 at 12:41 AM, chen <span dir="ltr"><<a href="mailto:chenm003@163.com" target="_blank">chenm003@163.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><div>This patch made more one initialize operator on mergeSaoParam<br></div><pre><div><div class="h5"><br>At 2015-11-19 19:45:53,<a href="mailto:ashok@multicorewareinc.com" target="_blank">ashok@multicorewareinc.com</a> wrote:
># HG changeset patch
># User Ashok Kumar Mishra<<a href="mailto:ashok@multicorewareinc.com" target="_blank">ashok@multicorewareinc.com</a>>
># Date 1445505834 -19800
>#      Thu Oct 22 14:53:54 2015 +0530
># Node ID ec452c4fd379d2e4c456722ffc7f7dc49e9c9d37
># Parent  c1575815b250fb02c1fdae803aead10a4997c835
>SAO: remove resetSaoUnit()
>
>diff -r c1575815b250 -r ec452c4fd379 source/encoder/sao.cpp
>--- a/source/encoder/sao.cpp       Thu Oct 29 17:15:15 2015 +0530
>+++ b/source/encoder/sao.cpp       Thu Oct 22 14:53:54 2015 +0530
>@@ -704,15 +704,15 @@
>     std::swap(m_tmpU1[plane], m_tmpU2[plane]);
> }

>-void SAO::resetSaoUnit(SaoCtuParam* saoUnit)
>-{
>-    saoUnit->mergeMode  = SAO_MERGE_NONE;
>-    saoUnit->typeIdx    = -1;
>-    saoUnit->bandPos    = 0;
>-
>-    for (int i = 0; i < SAO_NUM_OFFSET; i++)
>-        saoUnit->offset[i] = 0;
>-}
>+//void SAO::resetSaoUnit(SaoCtuParam* saoUnit)
>+//{
>+//    saoUnit->mergeMode  = SAO_MERGE_NONE;
>+//    saoUnit->typeIdx    = -1;
>+//    saoUnit->bandPos    = 0;
>+//
>+//    for (int i = 0; i < SAO_NUM_OFFSET; i++)
>+//        saoUnit->offset[i] = 0;
>+//}

> void SAO::copySaoUnit(SaoCtuParam* saoUnitDst, const SaoCtuParam* saoUnitSrc)
> {
>@@ -1172,9 +1172,14 @@
>                 }
>             }

>-            saoParam->ctuParam[plane][addr].mergeMode = SAO_MERGE_NONE;
>-            saoParam->ctuParam[plane][addr].typeIdx   = -1;
>-            saoParam->ctuParam[plane][addr].bandPos   = 0;
>+//            saoParam->ctuParam[plane][addr].mergeMode = SAO_MERGE_NONE;
>+//            saoParam->ctuParam[plane][addr].typeIdx   = -1;
>+//            saoParam->ctuParam[plane][addr].bandPos   = 0;
>+
>+            saoParam->ctuParam[plane][addr].reset();
>+
>+            mergeSaoParam[plane][0].reset();
>+            mergeSaoParam[plane][1].reset();
>             if (saoParam->bSaoFlag[plane > 0])
>                 calcSaoStatsCu(addr, plane);
>         }
>@@ -1326,7 +1331,7 @@
>     int    currentDistortionTableBo[MAX_NUM_SAO_CLASS];
>     double currentRdCostTableBo[MAX_NUM_SAO_CLASS];

>-    resetSaoUnit(lclCtuParam);
>+//    resetSaoUnit(lclCtuParam);
>     m_entropyCoder.load(m_rdContexts.temp);
>     m_entropyCoder.resetBits();
>     m_entropyCoder.codeSaoOffset(*lclCtuParam, 0);
>@@ -1413,8 +1418,8 @@

>             mergeDist[mergeIdx + 1] = ((double)estDist / m_lumaLambda);
>         }
>-        else
>-            resetSaoUnit(&mergeSaoParam[mergeIdx]);
>+//        else
>+//            resetSaoUnit(&mergeSaoParam[mergeIdx]);
>     }
> }

>@@ -1428,8 +1433,8 @@
>     int    bestClassTableBo[2] = { 0, 0 };
>     int    currentDistortionTableBo[MAX_NUM_SAO_CLASS];

>-    resetSaoUnit(lclCtuParam[0]);
>-    resetSaoUnit(lclCtuParam[1]);
>+//    resetSaoUnit(lclCtuParam[0]);
>+//    resetSaoUnit(lclCtuParam[1]);
>     m_entropyCoder.load(m_rdContexts.temp);
>     m_entropyCoder.resetBits();
>     m_entropyCoder.codeSaoOffset(*lclCtuParam[0], 1);
>@@ -1536,8 +1541,8 @@
>                 mergeSaoParam[plane][mergeIdx].mergeMode = mergeIdx ? SAO_MERGE_UP : SAO_MERGE_LEFT;
>                 mergeDist[mergeIdx + 1] += ((double)estDist / m_chromaLambda);
>             }
>-            else
>-                resetSaoUnit(&mergeSaoParam[plane][mergeIdx]);
>+//            else
>+//                resetSaoUnit(&mergeSaoParam[</div></div>plane][mergeIdx]);
>         }
>     }
> }
>_______________________________________________
>x265-devel mailing list
><a href="mailto:x265-devel@videolan.org" target="_blank">x265-devel@videolan.org</a>
><a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a>
</pre></div><br>_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
<br></blockquote></div><br></div>