[x265] [PATCH 2 of 3] compress: save inter sa8d costs also in m_sa8dCost

Sumalatha Polureddy sumalatha at multicorewareinc.com
Mon Jul 14 12:24:18 CEST 2014


On Sun, Jul 13, 2014 at 6:51 PM, <deepthi at multicorewareinc.com> wrote:

> # HG changeset patch
> # User Deepthi Nandakumar <deepthi at multicorewareinc.com>
> # Date 1405255779 -19800
> #      Sun Jul 13 18:19:39 2014 +0530
> # Node ID 1bdad29895e601ec5b72d330158bb0ed550d3fb0
> # Parent  0fe178bf1f2d53636eb84cd0848e95b9b9cc4292
> compress: save inter sa8d costs also in m_sa8dCost
>
> diff -r 0fe178bf1f2d -r 1bdad29895e6 source/encoder/compress.cpp
> --- a/source/encoder/compress.cpp       Sun Jul 13 18:14:05 2014 +0530
> +++ b/source/encoder/compress.cpp       Sun Jul 13 18:19:39 2014 +0530
> @@ -220,7 +220,7 @@
>          uint32_t distortion =
> primitives.sa8d[sizeIdx](m_origYuv[depth]->getLumaAddr(),
> m_origYuv[depth]->getStride(),
>
> outPredYuv->getLumaAddr(), outPredYuv->getStride());
>          outTempCU->m_totalDistortion = distortion;
> -        outTempCU->m_totalRDCost = m_rdCost.calcRdSADCost(distortion,
> outTempCU->m_totalBits);
> +        outTempCU->m_sa8dCost = m_rdCost.calcRdSADCost(distortion,
> outTempCU->m_totalBits);
>      }
>      else
>      {
> @@ -442,12 +442,12 @@
>                  {
>                      xComputeCostInter(m_interCU_Nx2N[depth],
> m_modePredYuv[1][depth], SIZE_Nx2N);
>                      xComputeCostInter(m_interCU_2NxN[depth],
> m_modePredYuv[2][depth], SIZE_2NxN);
> -                    if (m_interCU_Nx2N[depth]->m_totalRDCost <
> outBestCU->m_totalRDCost)
> +                    if (m_interCU_Nx2N[depth]->m_sa8dCost <
> outBestCU->m_totalRDCost)
>
 m_interCU_Nx2N->m_sa8dCost should be compared with outBestCU->m_sa8dCost.

                     {
>                          outBestCU = m_interCU_Nx2N[depth];
>                          std::swap(m_bestPredYuv[depth],
> m_modePredYuv[1][depth]);
>                      }
> -                    if (m_interCU_2NxN[depth]->m_totalRDCost <
> outBestCU->m_totalRDCost)
> +                    if (m_interCU_2NxN[depth]->m_sa8dCost <
> outBestCU->m_totalRDCost)
>
m_interCU_2NxN->m_sa8dCost should be compared with outBestCU->m_sa8dCost.

>                      {
>                          outBestCU = m_interCU_2NxN[depth];
>                          std::swap(m_bestPredYuv[depth],
> m_modePredYuv[2][depth]);
> @@ -519,7 +519,7 @@
>                  }
>                  if (m_param->rdLevel == 2)
>                  {
> -                    if (m_bestMergeCU[depth]->m_sa8dCost <
> outBestCU->m_totalRDCost)
> +                    if (m_bestMergeCU[depth]->m_sa8dCost <
> outBestCU->m_sa8dCost)
>                      {
>                          outBestCU = m_bestMergeCU[depth];
>                          std::swap(m_bestPredYuv[depth],
> m_modePredYuv[3][depth]);
> @@ -541,7 +541,7 @@
>                  }
>                  else if (m_param->rdLevel == 1)
>                  {
> -                    if (m_bestMergeCU[depth]->m_sa8dCost <
> outBestCU->m_totalRDCost)
> +                    if (m_bestMergeCU[depth]->m_sa8dCost <
> outBestCU->m_sa8dCost)
>                      {
>                          outBestCU = m_bestMergeCU[depth];
>                          std::swap(m_bestPredYuv[depth],
> m_modePredYuv[3][depth]);
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20140714/a77031ca/attachment.html>


More information about the x265-devel mailing list