[FFmpeg-devel] [PATCH WIP 4/5] avcodec/hevc/sei: Add support for alpha channel information

Anton Khirnov anton at khirnov.net
Sat Dec 14 11:50:28 EET 2024


Quoting Zhao Zhili (2024-12-11 05:23:31)
> @@ -95,6 +96,18 @@ typedef struct HEVCSEITDRDI {
>      uint8_t three_dimensional_reference_displays_extension_flag;
>  } HEVCSEITDRDI;
>  
> +typedef struct HEVCSEIAlphaChannelInfo {
> +    bool     has_alpha_channel_info;
> +    uint8_t  alpha_channel_cancel_flag;
> +    uint8_t  alpha_channel_use_idc;
> +    uint8_t  alpha_channel_bit_depth_minus8;
> +    uint16_t alpha_transparent_value;
> +    uint16_t alpha_opaque_value;
> +    uint8_t  alpha_channel_incr_flag;
> +    uint8_t  alpha_channel_clip_flag;
> +    uint8_t  alpha_channel_clip_type_flag;

We generally prefer not to duplicate the bitstream values/spec names
verbatim, because they are optimized for a different purpose.
Specifically
* 'alpha' in names is redundant with the struct name
* _flag is redundant
* store the actual bit depth, not _minus*

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list