[x265] [PATCH] Save intra mode in lowres
Steve Borho
steve at borho.org
Thu Oct 30 17:07:16 CET 2014
On 10/30, Nicolas Morey-Chaisemartin wrote:
> # HG changeset patch
> # User Nicolas Morey-Chaisemartin <nmorey at kalray.eu>
> # Date 1414664871 -3600
> # Thu Oct 30 11:27:51 2014 +0100
>
> Save intra mode in lowres
I assume this is a precursor to a --superfast-intra param. It seems
innocuous enough but I leaning towards uint8_t storage to minimize the
memory impact.
> ---
> source/common/lowres.cpp | 2 ++
> source/common/lowres.h | 1 +
> source/encoder/slicetype.cpp | 1 +
> 3 files changed, 4 insertions(+)
>
> diff --git a/source/common/lowres.cpp b/source/common/lowres.cpp
> index fe4f7b9..125760e 100644
> --- a/source/common/lowres.cpp
> +++ b/source/common/lowres.cpp
> @@ -69,6 +69,7 @@ bool Lowres::create(PicYuv *origPic, int _bframes, bool bAQEnabled)
> lowresPlane[3] = buffer[3] + padoffset;
> CHECKED_MALLOC(intraCost, int32_t, cuCount);
> + CHECKED_MALLOC(intraMode, int32_t, cuCount);
> for (int i = 0; i < bframes + 2; i++)
> {
> @@ -99,6 +100,7 @@ void Lowres::destroy()
> X265_FREE(buffer[i]);
> X265_FREE(intraCost);
> + X265_FREE(intraMode);
> for (int i = 0; i < bframes + 2; i++)
> {
> diff --git a/source/common/lowres.h b/source/common/lowres.h
> index b88ad3e0..605fda9 100644
> --- a/source/common/lowres.h
> +++ b/source/common/lowres.h
> @@ -116,6 +116,7 @@ struct Lowres : public ReferencePlanes
> int32_t* rowSatds[X265_BFRAME_MAX + 2][X265_BFRAME_MAX + 2];
> int intraMbs[X265_BFRAME_MAX + 2];
> int32_t* intraCost;
> + int32_t* intraMode;
> int64_t satdCost;
> uint16_t* lowresCostForRc;
> uint16_t(*lowresCosts[X265_BFRAME_MAX + 2][X265_BFRAME_MAX + 2]);
> diff --git a/source/encoder/slicetype.cpp b/source/encoder/slicetype.cpp
> index cc70c20..3f7a61f 100644
> --- a/source/encoder/slicetype.cpp
> +++ b/source/encoder/slicetype.cpp
> @@ -1701,6 +1701,7 @@ void EstimateRow::estimateCUCost(Lowres **frames, ReferencePlanes *wfref0, int c
> const int intraPenalty = 5 * m_lookAheadLambda;
> icost += intraPenalty + lowresPenalty; /* estimate intra signal cost */
> fenc->intraCost[cuXY] = icost;
> + fenc->intraMode[cuXY] = lowmode;
> int icostAq = icost;
> if (bFrameScoreCU)
> {
> _______________________________________________
> 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