[FFmpeg-devel] Patch to parse H264 SEI Green Metadata

Carl Eugen Hoyos cehoyos at ag.or.at
Tue Jun 30 11:52:18 CEST 2015


On Tuesday 30 June 2015 11:38:03 am Nicolas Derouineau wrote:

> From f7cff28a44adada6761233d59207b4a9c0373960 Mon Sep 17 00:00:00 2001
> From: Nicolas DEROUINEAU <nicolas.derouineau at vitec.com>
> Date: Tue, 30 Jun 2015 10:59:07 +0200
> Subject: [PATCH] Patch to parse SEI GreenMetadata
>
> ---
>  doc/codecs.texi            |    2 ++
>  libavcodec/avcodec.h       |    1 +
>  libavcodec/h264.h          |   21 ++++++++++++++++
>  libavcodec/h264_sei.c      |   59
> ++++++++++++++++++++++++++++++++++++++++++++ libavcodec/options_table.h |  
>  1 +
>  5 files changed, 84 insertions(+)
>
> diff --git a/doc/codecs.texi b/doc/codecs.texi
> index 3c035a5..5b3ec9b 100644
> --- a/doc/codecs.texi
> +++ b/doc/codecs.texi
> @@ -475,6 +475,8 @@ per-block quantization parameter (QP)
>  motion vector
>  @item dct_coeff
>  
> + at item green_metadata
> +

Shouldn't there be some explanation?

>  @item skip
>  
>  @item startcode
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index ddbf0a3..65c9053 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -2610,6 +2610,7 @@ typedef struct AVCodecContext {
>  #define FF_DEBUG_ER          0x00000400
>  #define FF_DEBUG_MMCO        0x00000800
>  #define FF_DEBUG_BUGS        0x00001000
> +#define FF_DEBUG_GREEN_MD    0x00001200

I believe this has to come at the end of the list with value 0x20000.

[...]

> +        if ( h->sei_green_metadata.green_metadata_type == 2){

Please make this "if (h->sei.. == 2) {" to match the coding style around.

Your av_logs could use a linebreak after the string.

Carl Eugen


More information about the ffmpeg-devel mailing list