[x265] [PATCH] move rc stats out of csv-log-level

Pradeep Ramachandran pradeep at multicorewareinc.com
Tue Jun 27 18:45:58 CEST 2017


On Tue, Jun 27, 2017 at 6:26 PM, <bhavna at multicorewareinc.com> wrote:

> # HG changeset patch
> # User Bhavna Hariharan <bhavna at multicorewareinc.com>
> # Date 1498561871 -19800
> #      Tue Jun 27 16:41:11 2017 +0530
> # Node ID fa076d29d6191699e314484a94dcae472e9c102a
> # Parent  81037290f79061cadb55bf59708e83fbb6069193
> move rc stats out of csv-log-level
>

Pushed to default branch


>
> diff -r 81037290f790 -r fa076d29d619 source/common/picyuv.cpp
> --- a/source/common/picyuv.cpp  Mon Jun 26 14:51:00 2017 +0530
> +++ b/source/common/picyuv.cpp  Tue Jun 27 16:41:11 2017 +0530
> @@ -340,24 +340,24 @@
>      pixel *U = m_picOrg[1];
>      pixel *V = m_picOrg[2];
>
> +    pixel *yPic = m_picOrg[0];
> +    pixel *uPic = m_picOrg[1];
> +    pixel *vPic = m_picOrg[2];
> +
> +    for (int r = 0; r < height; r++)
> +    {
> +        for (int c = 0; c < width; c++)
> +        {
> +            m_maxLumaLevel = X265_MAX(yPic[c], m_maxLumaLevel);
> +            m_minLumaLevel = X265_MIN(yPic[c], m_minLumaLevel);
> +            lumaSum += yPic[c];
> +        }
> +        yPic += m_stride;
> +    }
> +    m_avgLumaLevel = (double)lumaSum / (m_picHeight * m_picWidth);
> +
>      if (param.csvLogLevel >= 2)
>      {
> -        pixel *yPic = m_picOrg[0];
> -        pixel *uPic = m_picOrg[1];
> -        pixel *vPic = m_picOrg[2];
> -
> -        for (int r = 0; r < height; r++)
> -        {
> -            for (int c = 0; c < width; c++)
> -            {
> -                m_maxLumaLevel = X265_MAX(yPic[c], m_maxLumaLevel);
> -                m_minLumaLevel = X265_MIN(yPic[c], m_minLumaLevel);
> -                lumaSum += yPic[c];
> -            }
> -            yPic += m_stride;
> -        }
> -        m_avgLumaLevel = (double)lumaSum / (m_picHeight * m_picWidth);
> -
>          if (param.internalCsp != X265_CSP_I400)
>          {
>              for (int r = 0; r < height >> m_vChromaShift; r++)
> diff -r 81037290f790 -r fa076d29d619 source/encoder/encoder.cpp
> --- a/source/encoder/encoder.cpp        Mon Jun 26 14:51:00 2017 +0530
> +++ b/source/encoder/encoder.cpp        Tue Jun 27 16:41:11 2017 +0530
> @@ -1742,6 +1742,10 @@
>
>  #define ELAPSED_MSEC(start, end) (((double)(end) - (start)) / 1000)
>
> +        frameStats->maxLumaLevel = curFrame->m_fencPic->m_maxLumaLevel;
> +        frameStats->minLumaLevel = curFrame->m_fencPic->m_minLumaLevel;
> +        frameStats->avgLumaLevel = curFrame->m_fencPic->m_avgLumaLevel;
> +
>          if (m_param->csvLogLevel >= 2)
>          {
>              frameStats->decideWaitTime = ELAPSED_MSEC(0, curEncoder->m_
> slicetypeWaitTime);
> @@ -1761,9 +1765,6 @@
>              frameStats->avgLumaDistortion = curFrame->m_encData->m_
> frameStats.avgLumaDistortion;
>              frameStats->avgPsyEnergy = curFrame->m_encData->m_
> frameStats.avgPsyEnergy;
>              frameStats->avgResEnergy = curFrame->m_encData->m_
> frameStats.avgResEnergy;
> -            frameStats->avgLumaLevel = curFrame->m_fencPic->m_
> avgLumaLevel;
> -            frameStats->maxLumaLevel = curFrame->m_fencPic->m_
> maxLumaLevel;
> -            frameStats->minLumaLevel = curFrame->m_fencPic->m_
> minLumaLevel;
>
>              frameStats->maxChromaULevel = curFrame->m_fencPic->m_
> maxChromaULevel;
>              frameStats->minChromaULevel = curFrame->m_fencPic->m_
> minChromaULevel;
> diff -r 81037290f790 -r fa076d29d619 source/encoder/frameencoder.cpp
> --- a/source/encoder/frameencoder.cpp   Mon Jun 26 14:51:00 2017 +0530
> +++ b/source/encoder/frameencoder.cpp   Tue Jun 27 16:41:11 2017 +0530
> @@ -1798,7 +1798,7 @@
>          totQP += ctu.m_qp[absPartIdx] * (ctu.m_numPartitions >> (depth *
> 2));
>      }
>
> -    if (m_param->csvLogLevel >= 1)
> +    if (m_param->csvLogLevel >= 1 || m_param->rc.bStatWrite)
>      {
>          if (ctu.m_slice->m_sliceType == I_SLICE)
>          {
> _______________________________________________
> 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/20170627/5b07a5e6/attachment.html>


More information about the x265-devel mailing list