[FFmpeg-devel] [PATCH v5 1/2] avcodec/avutil: move dynamic HDR10+ metadata parsing to libavutil
Raphaël Zumer
raphael.zumer at vimeo.com
Tue Mar 14 00:54:17 EET 2023
On 3/13/23 18:19, James Almer wrote:
> On 3/13/2023 6:38 PM, Raphaël Zumer wrote:
>> diff --git a/libavutil/hdr_dynamic_metadata.c b/libavutil/hdr_dynamic_metadata.c
>> index 0fa1ee82de..98f399b032 100644
>> --- a/libavutil/hdr_dynamic_metadata.c
>> +++ b/libavutil/hdr_dynamic_metadata.c
>> @@ -20,6 +20,16 @@
>>
>> #include "hdr_dynamic_metadata.h"
>> #include "mem.h"
>> +#include "libavcodec/get_bits.h"
>> +#include "libavcodec/put_bits.h"
>> +
>> +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;
>>
>> AVDynamicHDRPlus *av_dynamic_hdr_plus_alloc(size_t *size)
>> {
>> @@ -45,3 +55,173 @@ AVDynamicHDRPlus *av_dynamic_hdr_plus_create_side_data(AVFrame *frame)
>>
>> return (AVDynamicHDRPlus *)side_data->data;
>> }
>> +
>> +int av_dynamic_hdr_plus_from_t35(AVDynamicHDRPlus *s, const uint8_t *data,
>> + int size)
> I'll change the signature to use size_t instead of int before pushing if
> you don't mind, so it's in line with the serialization function and
> matching the size type of the AVFrame and AVPacket side data structs.
Sure, sounds good.
Thanks
RZ
More information about the ffmpeg-devel
mailing list