FFmpeg
Macros | Functions
h2645_sei.c File Reference
#include "config_components.h"
#include "libavutil/ambient_viewing_environment.h"
#include "libavutil/buffer.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/mem.h"
#include "libavutil/stereo3d.h"
#include "atsc_a53.h"
#include "avcodec.h"
#include "decode.h"
#include "dynamic_hdr_vivid.h"
#include "get_bits.h"
#include "golomb.h"
#include "h2645_sei.h"
#include "itut35.h"
#include "refstruct.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_lcevc (HEVCSEILCEVC *s, GetByteContext *gb)
 
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)
 
static int h2645_sei_to_side_data (AVCodecContext *avctx, H2645SEI *sei, AVFrameSideData ***sd, int *nb_sd)
 
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)
 
int ff_h2645_sei_to_context (AVCodecContext *avctx, H2645SEI *sei)
 
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 47 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 48 of file h2645_sei.c.

Function Documentation

◆ decode_registered_user_data_lcevc()

static int decode_registered_user_data_lcevc ( HEVCSEILCEVC s,
GetByteContext gb 
)
static

Definition at line 104 of file h2645_sei.c.

Referenced by decode_registered_user_data().

◆ decode_registered_user_data_afd()

static int decode_registered_user_data_afd ( H2645SEIAFD h,
GetByteContext gb 
)
static

Definition at line 118 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 137 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 144 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 268 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 306 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 324 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 358 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 370 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 395 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 441 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 470 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 487 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 521 of file h2645_sei.c.

Referenced by ff_h264_update_thread_context().

◆ is_frame_packing_type_valid()

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

Definition at line 568 of file h2645_sei.c.

Referenced by ff_h2645_sei_to_frame().

◆ h2645_sei_to_side_data()

static int h2645_sei_to_side_data ( AVCodecContext avctx,
H2645SEI sei,
AVFrameSideData ***  sd,
int *  nb_sd 
)
static

Definition at line 578 of file h2645_sei.c.

Referenced by ff_h2645_sei_to_context(), and 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 718 of file h2645_sei.c.

Referenced by h264_export_frame_props(), and set_side_data().

◆ ff_h2645_sei_to_context()

int ff_h2645_sei_to_context ( AVCodecContext avctx,
H2645SEI sei 
)

Definition at line 915 of file h2645_sei.c.

Referenced by hevc_decode_init().

◆ ff_h2645_sei_reset()

void ff_h2645_sei_reset ( H2645SEI s)

Definition at line 921 of file h2645_sei.c.

Referenced by ff_h264_sei_uninit(), and ff_hevc_reset_sei().