[FFmpeg-devel] [PATCH] Support HDR10+ metadata for HEVC

Timo Rothenpieler timo at rothenpieler.org
Thu Jul 23 13:12:16 EEST 2020


On 23/07/2020 10:13, zhilizhao wrote:
> 
> 
>> On Jul 17, 2020, at 5:47 AM, Steinar H. Gunderson <steinar+ffmpeg at gunderson.no> wrote:
>>
>> On Thu, Jul 16, 2020 at 06:34:31PM -0300, James Almer wrote:
>>>> static AVMutex codec_mutex = AV_MUTEX_INITIALIZER;
>>>> +static const uint8_t usa_country_code = 0xB5;
>>>> +static const uint16_t smpte_provider_code = 0x003C;
>>>> +static const uint16_t smpte2094_40_provider_oriented_code = 0x0001;
>>>> +static const uint16_t smpte2094_40_application_identifier = 0x04;
>>>> +static const int64_t luminance_den = 1;
>>>> +static const int32_t peak_luminance_den = 15;
>>>> +static const int64_t rgb_den = 100000;
>>>> +static const int32_t fraction_pixel_den = 1000;
>>>> +static const int32_t knee_point_den = 4095;
>>>> +static const int32_t bezier_anchor_den = 1023;
>>>> +static const int32_t saturation_weight_den = 8;
>>> Same, no global state.
>>
>> It's not state if it can't be changed.
> 
> If there is any chance to reuse these variables, I prefer current style than
> use a literal with comments next to it.

I guess ffmpeg more commonly uses #defines for constants like this, but 
it's still valid and not global state.


More information about the ffmpeg-devel mailing list