[FFmpeg-devel] [PATCH v7 1/8] avutil: add AV_FRAME_DATA_USER_DATA_UNREGISTERED side data type

Anton Khirnov anton at khirnov.net
Wed Jan 8 07:07:29 EET 2020


Quoting lance.lmwang at gmail.com (2020-01-07 06:03:48)
> From: Limin Wang <lance.lmwang at gmail.com>
> 
> Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> ---
>  doc/APIchanges      | 3 +++
>  libavutil/frame.c   | 1 +
>  libavutil/frame.h   | 8 ++++++++
>  libavutil/version.h | 2 +-
>  4 files changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/doc/APIchanges b/doc/APIchanges
> index 3c24dc6fbc..6e1673e25e 100644
> --- a/doc/APIchanges
> +++ b/doc/APIchanges
> @@ -15,6 +15,9 @@ libavutil:     2017-10-21
>  
>  API changes, most recent first:
>  
> +2020-01-xx - xxxxxxxxxx - lavu 56.39.100 - frame.h
> +  Add AV_FRAME_DATA_USER_DATA_UNREGISTERED.
> +
>  2019-12-27 - xxxxxxxxxx - lavu 56.38.100 - eval.h
>    Add av_expr_count_func().
>  
> diff --git a/libavutil/frame.c b/libavutil/frame.c
> index e4038096c2..1d0faec687 100644
> --- a/libavutil/frame.c
> +++ b/libavutil/frame.c
> @@ -842,6 +842,7 @@ const char *av_frame_side_data_name(enum AVFrameSideDataType type)
>  #endif
>      case AV_FRAME_DATA_DYNAMIC_HDR_PLUS: return "HDR Dynamic Metadata SMPTE2094-40 (HDR10+)";
>      case AV_FRAME_DATA_REGIONS_OF_INTEREST: return "Regions Of Interest";
> +    case AV_FRAME_DATA_USER_DATA_UNREGISTERED: return "User Data Unregistered";
>      }
>      return NULL;
>  }
> diff --git a/libavutil/frame.h b/libavutil/frame.h
> index b5afb58634..54863c86ce 100644
> --- a/libavutil/frame.h
> +++ b/libavutil/frame.h
> @@ -179,6 +179,14 @@ enum AVFrameSideDataType {
>       * array element is implied by AVFrameSideData.size / AVRegionOfInterest.self_size.
>       */
>      AV_FRAME_DATA_REGIONS_OF_INTEREST,
> +
> +    /**
> +     * User data unregistered metadata associated with a video frame.
> +     * This is the H.26[45] UDU SEI message, and shouldn't be used for any other purpose
> +     * The data is stored as uint8_t in AVFrameSideData.data which is 16 bytes of
> +     * uuid_iso_iec_11578 followed by AVFrameSideData.size-16 bytes of user_data_payload_byte.
> +     */
> +    AV_FRAME_DATA_USER_DATA_UNREGISTERED,

This naming is too generic IMO. Something like
AV_FRAME_DATA_SEI_UNREGISTERED would make it clearer that it refers to
the H.26x concept rather than any other kind of "registration" or "user
data".

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list