[x265] [PATCH] param: update calculated maxCLL, maxFALL values to contentLightLevelInfo
Steve Borho
steve at borho.org
Wed Aug 26 13:23:12 CEST 2015
On 08/26, kavitha at multicorewareinc.com wrote:
> # HG changeset patch
> # User Kavitha Sampath <kavitha at multicorewareinc.com>
> # Date 1440572877 -19800
> # Wed Aug 26 12:37:57 2015 +0530
> # Node ID 73b94b3431f98bc94c2113d98f7788783453197e
> # Parent a28a863393994d8fb1d58c721352d9b4ec8c46ee
> param: update calculated maxCLL, maxFALL values to contentLightLevelInfo
the encoder is generally supposed to treat the param structure as
read-only (the encoder keeps a seperate copy from what the cli/user
passed into the encoder creation function).
> diff -r a28a86339399 -r 73b94b3431f9 source/encoder/encoder.cpp
> --- a/source/encoder/encoder.cpp Mon Aug 24 14:04:32 2015 +0530
> +++ b/source/encoder/encoder.cpp Wed Aug 26 12:37:57 2015 +0530
> @@ -39,6 +39,10 @@
>
> #include "x265.h"
>
> +#if _MSC_VER
> +#pragma warning(disable: 4996) // POSIX functions are just fine, thanks
> +#endif
> +
> namespace X265_NS {
> const char g_sliceTypeToChar[] = {'B', 'P', 'I'};
> }
> @@ -1046,6 +1050,14 @@
>
> stats->maxCLL = m_analyzeAll.m_maxCLL;
> stats->maxFALL = (uint16_t)(m_analyzeAll.m_maxFALL / m_analyzeAll.m_numPics);
> + if (m_param->contentLightLevelInfo)
> + {
> + free((char*)m_param->contentLightLevelInfo);
> +
> + char value[16];
> + sprintf(value, "%hu,%hu", stats->maxCLL, stats->maxFALL);
> + m_param->contentLightLevelInfo = strdup(value);
> + }
> }
>
> /* If new statistics are added to x265_stats, we must check here whether the
> _______________________________________________
> 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