FFmpeg
Macros | Functions
h2645_sei.c File Reference
#include "config_components.h"
#include "libavutil/ambient_viewing_environment.h"
#include "libavutil/display.h"
#include "libavutil/hdr_dynamic_metadata.h"
#include "libavutil/film_grain_params.h"
#include "libavutil/mastering_display_metadata.h"
#include "libavutil/pixdesc.h"
#include "libavutil/stereo3d.h"
#include "atsc_a53.h"
#include "avcodec.h"
#include "dynamic_hdr_vivid.h"
#include "get_bits.h"
#include "golomb.h"
#include "h2645_sei.h"

Go to the source code of this file.

Macros

#define IS_H264(codec_id)   (CONFIG_H264_SEI && CONFIG_HEVC_SEI ? codec_id == AV_CODEC_ID_H264 : CONFIG_H264_SEI)
 
#define IS_HEVC(codec_id)   (CONFIG_H264_SEI && CONFIG_HEVC_SEI ? codec_id == AV_CODEC_ID_HEVC : CONFIG_HEVC_SEI)
 

Functions

static int decode_registered_user_data_afd (H2645SEIAFD *h, GetByteContext *gb)
 
static int decode_registered_user_data_closed_caption (H2645SEIA53Caption *h, GetByteContext *gb)
 
static int decode_registered_user_data (H2645SEI *h, GetByteContext *gb, enum AVCodecID codec_id, void *logctx)
 
static int decode_unregistered_user_data (H2645SEIUnregistered *h, GetByteContext *gb, enum AVCodecID codec_id)
 
static int decode_display_orientation (H2645SEIDisplayOrientation *h, GetBitContext *gb)
 
static int decode_frame_packing_arrangement (H2645SEIFramePacking *h, GetBitContext *gb, enum AVCodecID codec_id)
 
static int decode_alternative_transfer (H2645SEIAlternativeTransfer *s, GetByteContext *gb)
 
static int decode_ambient_viewing_environment (H2645SEIAmbientViewingEnvironment *s, GetByteContext *gb)
 
static int decode_film_grain_characteristics (H2645SEIFilmGrainCharacteristics *h, enum AVCodecID codec_id, GetBitContext *gb)
 
static int decode_nal_sei_mastering_display_info (H2645SEIMasteringDisplay *s, GetByteContext *gb)
 
static int decode_nal_sei_content_light_info (H2645SEIContentLight *s, GetByteContext *gb)
 
int ff_h2645_sei_message_decode (H2645SEI *h, enum SEIType type, enum AVCodecID codec_id, GetBitContext *gb, GetByteContext *gbyte, void *logctx)
 Decode a single SEI message. More...
 
int ff_h2645_sei_ctx_replace (H2645SEI *dst, const H2645SEI *src)
 
static int is_frame_packing_type_valid (SEIFpaType type, enum AVCodecID codec_id)
 
int ff_h2645_sei_to_frame (AVFrame *frame, H2645SEI *sei, enum AVCodecID codec_id, AVCodecContext *avctx, const H2645VUI *vui, unsigned bit_depth_luma, unsigned bit_depth_chroma, int seed)
 
void ff_h2645_sei_reset (H2645SEI *s)
 

Macro Definition Documentation

◆ IS_H264

#define IS_H264 (   codec_id)    (CONFIG_H264_SEI && CONFIG_HEVC_SEI ? codec_id == AV_CODEC_ID_H264 : CONFIG_H264_SEI)

Definition at line 43 of file h2645_sei.c.

◆ IS_HEVC

#define IS_HEVC (   codec_id)    (CONFIG_H264_SEI && CONFIG_HEVC_SEI ? codec_id == AV_CODEC_ID_HEVC : CONFIG_HEVC_SEI)

Definition at line 44 of file h2645_sei.c.

Function Documentation

◆ decode_registered_user_data_afd()

static int decode_registered_user_data_afd ( H2645SEIAFD h,
GetByteContext gb 
)
static

Definition at line 100 of file h2645_sei.c.

Referenced by decode_registered_user_data().

◆ decode_registered_user_data_closed_caption()

static int decode_registered_user_data_closed_caption ( H2645SEIA53Caption h,
GetByteContext gb 
)
static

Definition at line 119 of file h2645_sei.c.

Referenced by decode_registered_user_data().

◆ decode_registered_user_data()

static int decode_registered_user_data ( H2645SEI h,
GetByteContext gb,
enum AVCodecID  codec_id,
void *  logctx 
)
static

Definition at line 126 of file h2645_sei.c.

Referenced by ff_h2645_sei_message_decode().

◆ decode_unregistered_user_data()

static int decode_unregistered_user_data ( H2645SEIUnregistered h,
GetByteContext gb,
enum AVCodecID  codec_id 
)
static

Definition at line 223 of file h2645_sei.c.

Referenced by ff_h2645_sei_message_decode().

◆ decode_display_orientation()

static int decode_display_orientation ( H2645SEIDisplayOrientation h,
GetBitContext gb 
)
static

Definition at line 261 of file h2645_sei.c.

Referenced by ff_h2645_sei_message_decode().

◆ decode_frame_packing_arrangement()

static int decode_frame_packing_arrangement ( H2645SEIFramePacking h,
GetBitContext gb,
enum AVCodecID  codec_id 
)
static

Definition at line 279 of file h2645_sei.c.

Referenced by ff_h2645_sei_message_decode().

◆ decode_alternative_transfer()

static int decode_alternative_transfer ( H2645SEIAlternativeTransfer s,
GetByteContext gb 
)
static

Definition at line 313 of file h2645_sei.c.

Referenced by ff_h2645_sei_message_decode().

◆ decode_ambient_viewing_environment()

static int decode_ambient_viewing_environment ( H2645SEIAmbientViewingEnvironment s,
GetByteContext gb 
)
static

Definition at line 325 of file h2645_sei.c.

Referenced by ff_h2645_sei_message_decode().

◆ decode_film_grain_characteristics()

static int decode_film_grain_characteristics ( H2645SEIFilmGrainCharacteristics h,
enum AVCodecID  codec_id,
GetBitContext gb 
)
static

Definition at line 350 of file h2645_sei.c.

Referenced by ff_h2645_sei_message_decode().

◆ decode_nal_sei_mastering_display_info()

static int decode_nal_sei_mastering_display_info ( H2645SEIMasteringDisplay s,
GetByteContext gb 
)
static

Definition at line 396 of file h2645_sei.c.

Referenced by ff_h2645_sei_message_decode().

◆ decode_nal_sei_content_light_info()

static int decode_nal_sei_content_light_info ( H2645SEIContentLight s,
GetByteContext gb 
)
static

Definition at line 425 of file h2645_sei.c.

Referenced by ff_h2645_sei_message_decode().

◆ ff_h2645_sei_message_decode()

int ff_h2645_sei_message_decode ( H2645SEI h,
enum SEIType  type,
enum AVCodecID  codec_id,
GetBitContext gb,
GetByteContext gbyte,
void *  logctx 
)

Decode a single SEI message.

This function may either use gb or gbyte to decode the SEI message.

Parameters
[in,out]gbGetBitContext that needs to be at the start of the payload (i.e. after the payload_size bytes); it needs to be initially byte-aligned
[in,out]gbytea GetByteContext for the same data as gb
Returns
< 0 on error, FF_H2645_SEI_MESSAGE_HANDLED if the SEI message has been handled or FF_H2645_SEI_MESSAGE_UNHANDLED if not.

Definition at line 442 of file h2645_sei.c.

Referenced by decode_nal_sei_prefix(), and ff_h264_sei_decode().

◆ ff_h2645_sei_ctx_replace()

int ff_h2645_sei_ctx_replace ( H2645SEI dst,
const H2645SEI src 
)

Definition at line 472 of file h2645_sei.c.

Referenced by ff_h264_sei_ctx_replace(), and ff_hevc_sei_ctx_replace().

◆ is_frame_packing_type_valid()

static int is_frame_packing_type_valid ( SEIFpaType  type,
enum AVCodecID  codec_id 
)
static

Definition at line 501 of file h2645_sei.c.

Referenced by ff_h2645_sei_to_frame().

◆ ff_h2645_sei_to_frame()

int ff_h2645_sei_to_frame ( AVFrame frame,
H2645SEI sei,
enum AVCodecID  codec_id,
AVCodecContext avctx,
const H2645VUI vui,
unsigned  bit_depth_luma,
unsigned  bit_depth_chroma,
int  seed 
)

Definition at line 511 of file h2645_sei.c.

Referenced by h264_export_frame_props(), and set_side_data().

◆ ff_h2645_sei_reset()

void ff_h2645_sei_reset ( H2645SEI s)

Definition at line 768 of file h2645_sei.c.

Referenced by ff_h264_sei_uninit(), and ff_hevc_reset_sei().