[x265] [PATCH] stats: rename fields of FrameStats structure
Steve Borho
steve at borho.org
Tue Jun 9 17:37:25 CEST 2015
On 06/09, Divya Manivannan wrote:
> # HG changeset patch
> # User Divya Manivannan <divya at multicorewareinc.com>
> # Date 1433853948 -19800
> # Tue Jun 09 18:15:48 2015 +0530
> # Node ID 6538cd24ab98e36b2346298237f27198c6e5aad2
> # Parent b252468dde7ffca57da27575388d95ce538945d2
> stats: rename fields of FrameStats structure
sure
> diff -r b252468dde7f -r 6538cd24ab98 source/encoder/frameencoder.cpp
> --- a/source/encoder/frameencoder.cpp Tue Jun 09 10:16:44 2015 +0530
> +++ b/source/encoder/frameencoder.cpp Tue Jun 09 18:15:48 2015 +0530
> @@ -562,14 +562,14 @@
> m_frameStats.mvBits += m_rows[i].rowStats.mvBits;
> m_frameStats.coeffBits += m_rows[i].rowStats.coeffBits;
> m_frameStats.miscBits += m_rows[i].rowStats.miscBits;
> - totalI += m_rows[i].rowStats.iCuCnt;
> - totalP += m_rows[i].rowStats.pCuCnt;
> - totalSkip += m_rows[i].rowStats.skipCuCnt;
> + totalI += m_rows[i].rowStats.intra8x8Cnt;
> + totalP += m_rows[i].rowStats.inter8x8Cnt;
> + totalSkip += m_rows[i].rowStats.skip8x8Cnt;
> }
> int totalCuCount = totalI + totalP + totalSkip;
> - m_frameStats.percentIntra = (double)totalI / totalCuCount;
> - m_frameStats.percentInter = (double)totalP / totalCuCount;
> - m_frameStats.percentSkip = (double)totalSkip / totalCuCount;
> + m_frameStats.percent8x8Intra = (double)totalI / totalCuCount;
> + m_frameStats.percent8x8Inter = (double)totalP / totalCuCount;
> + m_frameStats.percent8x8Skip = (double)totalSkip / totalCuCount;
> }
>
> m_bs.resetBits();
> @@ -920,9 +920,9 @@
> {
> /* 1 << shift == number of 8x8 blocks at current depth */
> int shift = 2 * (g_maxCUDepth - depth);
> - curRow.rowStats.iCuCnt += qTreeIntraCnt[depth] << shift;
> - curRow.rowStats.pCuCnt += qTreeInterCnt[depth] << shift;
> - curRow.rowStats.skipCuCnt += qTreeSkipCnt[depth] << shift;
> + curRow.rowStats.intra8x8Cnt += qTreeIntraCnt[depth] << shift;
> + curRow.rowStats.inter8x8Cnt += qTreeInterCnt[depth] << shift;
> + curRow.rowStats.skip8x8Cnt += qTreeSkipCnt[depth] << shift;
>
> // clear the row cu data from thread local object
> qTreeIntraCnt[depth] = qTreeInterCnt[depth] = qTreeSkipCnt[depth] = 0;
> diff -r b252468dde7f -r 6538cd24ab98 source/encoder/ratecontrol.cpp
> --- a/source/encoder/ratecontrol.cpp Tue Jun 09 10:16:44 2015 +0530
> +++ b/source/encoder/ratecontrol.cpp Tue Jun 09 18:15:48 2015 +0530
> @@ -2220,9 +2220,9 @@
> stats->coeffBits,
> stats->mvBits,
> stats->miscBits,
> - stats->percentIntra * m_ncu,
> - stats->percentInter * m_ncu,
> - stats->percentSkip * m_ncu) < 0)
> + stats->percent8x8Intra * m_ncu,
> + stats->percent8x8Inter * m_ncu,
> + stats->percent8x8Skip * m_ncu) < 0)
> goto writeFailure;
> /* Don't re-write the data in multi-pass mode. */
> if (m_param->rc.cuTree && IS_REFERENCED(curFrame) && !m_param->rc.bStatRead)
> diff -r b252468dde7f -r 6538cd24ab98 source/encoder/ratecontrol.h
> --- a/source/encoder/ratecontrol.h Tue Jun 09 10:16:44 2015 +0530
> +++ b/source/encoder/ratecontrol.h Tue Jun 09 18:15:48 2015 +0530
> @@ -53,14 +53,14 @@
> int coeffBits; /* Texture bits (DCT coefs) */
> int miscBits;
>
> - int iCuCnt;
> - int pCuCnt;
> - int skipCuCnt;
> + int intra8x8Cnt;
> + int inter8x8Cnt;
> + int skip8x8Cnt;
>
> /* CU type counts stored as percentage */
> - double percentIntra;
> - double percentInter;
> - double percentSkip;
> + double percent8x8Intra;
> + double percent8x8Inter;
> + double percent8x8Skip;
> };
>
> struct Predictor
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
--
Steve Borho
More information about the x265-devel
mailing list