[FFmpeg-devel] [PATCH 1/4] avutil: add support for CUVA HDR Vivid metadata

lance.lmwang at gmail.com lance.lmwang at gmail.com
Sat Feb 26 08:11:50 EET 2022


On Tue, Feb 15, 2022 at 08:08:51AM +0100, Andreas Rheinhardt wrote:
> lance.lmwang at gmail.com:
> > From: Limin Wang <lance.lmwang at gmail.com>
> > 
> > Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> > ---
> >  libavutil/Makefile                     |   2 +
> >  libavutil/frame.c                      |   1 +
> >  libavutil/frame.h                      |   7 +
> >  libavutil/hdr_dynamic_vivid_metadata.c |  47 ++++++
> >  libavutil/hdr_dynamic_vivid_metadata.h | 285 +++++++++++++++++++++++++++++++++
> >  libavutil/version.h                    |   2 +-
> >  6 files changed, 343 insertions(+), 1 deletion(-)
> >  create mode 100644 libavutil/hdr_dynamic_vivid_metadata.c
> >  create mode 100644 libavutil/hdr_dynamic_vivid_metadata.h
> > 
> > diff --git a/libavutil/Makefile b/libavutil/Makefile
> > index d17876d..a8d7587 100644
> > --- a/libavutil/Makefile
> > +++ b/libavutil/Makefile
> > @@ -34,6 +34,7 @@ HEADERS = adler32.h                                                     \
> >            frame.h                                                       \
> >            hash.h                                                        \
> >            hdr_dynamic_metadata.h                                        \
> > +          hdr_dynamic_vivid_metadata.h                                  \
> >            hmac.h                                                        \
> >            hwcontext.h                                                   \
> >            hwcontext_cuda.h                                              \
> > @@ -130,6 +131,7 @@ OBJS = adler32.o                                                        \
> >         frame.o                                                          \
> >         hash.o                                                           \
> >         hdr_dynamic_metadata.o                                           \
> > +       hdr_dynamic_vivid_metadata.o                                     \
> >         hmac.o                                                           \
> >         hwcontext.o                                                      \
> >         imgutils.o                                                       \
> > diff --git a/libavutil/frame.c b/libavutil/frame.c
> > index 8997c85..b035e28 100644
> > --- a/libavutil/frame.c
> > +++ b/libavutil/frame.c
> > @@ -723,6 +723,7 @@ const char *av_frame_side_data_name(enum AVFrameSideDataType type)
> >      case AV_FRAME_DATA_SPHERICAL:                   return "Spherical Mapping";
> >      case AV_FRAME_DATA_ICC_PROFILE:                 return "ICC profile";
> >      case AV_FRAME_DATA_DYNAMIC_HDR_PLUS: return "HDR Dynamic Metadata SMPTE2094-40 (HDR10+)";
> > +    case AV_FRAME_DATA_DYNAMIC_HDR_VIVID: return "HDR Dynamic Metadata CUVA 005.1 2021 (Vivid)";
> >      case AV_FRAME_DATA_REGIONS_OF_INTEREST: return "Regions Of Interest";
> >      case AV_FRAME_DATA_VIDEO_ENC_PARAMS:            return "Video encoding parameters";
> >      case AV_FRAME_DATA_SEI_UNREGISTERED:            return "H.26[45] User Data Unregistered SEI message";
> > diff --git a/libavutil/frame.h b/libavutil/frame.h
> > index 18e239f..32cde3c 100644
> > --- a/libavutil/frame.h
> > +++ b/libavutil/frame.h
> > @@ -158,6 +158,13 @@ enum AVFrameSideDataType {
> >      AV_FRAME_DATA_DYNAMIC_HDR_PLUS,
> >  
> >      /**
> > +     * HDR Vivid dynamic metadata associated with a video frame. The payload is
> > +     * an AVDynamicHDRVivid type and contains information for color
> > +     * volume transform - CUVA 005.1-2021.
> > +     */
> > +    AV_FRAME_DATA_DYNAMIC_HDR_VIVID,
> > +
> 
> Always add at the end. You are breaking ABI otherwise.

plan to push the patchset(including of moving the type at the end) in the next two day if no other more comments 

> 
> > +    /**
> >       * Regions Of Interest, the data is an array of AVRegionOfInterest type, the number of
> >       * array element is implied by AVFrameSideData.size / AVRegionOfInterest.self_size.
> >       */
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".

-- 
Thanks,
Limin Wang


More information about the ffmpeg-devel mailing list