[FFmpeg-devel] [PATCH] avcodec: Pass the HDR10+ metadata to the packet side data in VP9 encoder
James Zern
jzern at google.com
Thu Jun 17 22:57:14 EEST 2021
On Wed, Jun 16, 2021 at 3:53 PM Mohammad Izadi
<izadi-at-google.com at ffmpeg.org> wrote:
>
> HDR10+ metadata is stored in the bit stream for HEVC. The story is different for VP9 and cannot store the metadata in the bit stream. HDR10+ should be passed to packet side data an stored in the container (mkv) for VP9.
>
> This CL is taking HDR10+ from AVFrame side data in libvpxenc and is passing it to the AVPacket side data.
> ---
> doc/APIchanges | 2 +
> libavcodec/avpacket.c | 1 +
> libavcodec/decode.c | 1 +
> libavcodec/libvpxenc.c | 91 ++++++++++++++++++++++++++++++++++++++++++
> libavcodec/packet.h | 8 ++++
> libavcodec/version.h | 4 +-
> 6 files changed, 105 insertions(+), 2 deletions(-)
>
> [...]
> +
> +static av_cold void free_hdr10_plus_fifo(AVFifoBuffer **fifo)
> +{
> + FrameHDR10Plus frame_hdr10_plus;
> + while (av_fifo_size(*fifo) >= sizeof(FrameHDR10Plus)) {
> + av_fifo_generic_read(*fifo, &frame_hdr10_plus, sizeof(FrameHDR10Plus), NULL);
use sizeof(frame_hdr10_plus) in these two cases
More information about the ffmpeg-devel
mailing list