[FFmpeg-devel] [PATCH] avformat/matroska: Support HDR10+ metadata in Matroska.
Michael Niedermayer
michael at niedermayer.cc
Wed Aug 18 23:55:38 EEST 2021
On Tue, Aug 17, 2021 at 03:40:28PM -0700, Mohammad Izadi wrote:
> From: Gyan Doshi <ffmpeg at gyani.pro>
>
> The fate test file can be found here: https://drive.google.com/file/d/1jGW3f94rglLfr5WGmMQe3SEnp1YkbMRy/view?usp=drivesdk
> The video file needs to be copied to fate-suite/mkv/
> ---
> libavcodec/dynamic_hdr10_plus.c | 273 +++++++++++++++++---
> libavcodec/dynamic_hdr10_plus.h | 35 ++-
> libavformat/matroska.h | 5 +
> libavformat/matroskadec.c | 30 ++-
> libavformat/matroskaenc.c | 47 ++--
> tests/fate/matroska.mak | 6 +
> tests/ref/fate/matroska-hdr10-plus-metadata | 150 +++++++++++
> 7 files changed, 484 insertions(+), 62 deletions(-)
> create mode 100644 tests/ref/fate/matroska-hdr10-plus-metadata
>
> diff --git a/libavcodec/dynamic_hdr10_plus.c b/libavcodec/dynamic_hdr10_plus.c
> index a602e606ed..df7828a476 100644
> --- a/libavcodec/dynamic_hdr10_plus.c
> +++ b/libavcodec/dynamic_hdr10_plus.c
[...]
> +int ff_write_dynamic_hdr10_plus_to_full_itu_t_t35(const AVDynamicHDRPlus* s, uint8_t** data, size_t* size)
[...]
> diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
> index 899a3388cd..832d837ed7 100644
> --- a/libavformat/matroskaenc.c
> +++ b/libavformat/matroskaenc.c
[...]
> @@ -2084,13 +2086,18 @@ static int mkv_write_block(AVFormatContext *s, AVIOContext *pb,
> (AVRational){1, par->sample_rate},
> (AVRational){1, 1000000000});
> }
> -
> side_data = av_packet_get_side_data(pkt,
> + AV_PKT_DATA_DYNAMIC_HDR10_PLUS,
> + &side_data_size);
> + if (side_data && side_data_size > 0)
> + ff_write_dynamic_hdr10_plus_to_full_itu_t_t35((AVDynamicHDRPlus*)side_data, &hdr10_plus_itu_t_t35, &hdr10_plus_itu_t_t35_size);
This will fail to link with shared libs
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210818/852e0241/attachment.sig>
More information about the ffmpeg-devel
mailing list