FFmpeg  4.0
Macros | Functions | Variables
cbs_h2645.c File Reference
#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "bytestream.h"
#include "cbs.h"
#include "cbs_internal.h"
#include "cbs_h264.h"
#include "cbs_h265.h"
#include "golomb.h"
#include "h264.h"
#include "h264_sei.h"
#include "h2645_parse.h"
#include "hevc.h"
#include "cbs_h264_syntax_template.c"
#include "cbs_h265_syntax_template.c"

Go to the source code of this file.

Macros

#define HEADER(name)
 
#define CHECK(call)
 
#define FUNC_NAME(rw, codec, name)   cbs_ ## codec ## _ ## rw ## _ ## name
 
#define FUNC_H264(rw, name)   FUNC_NAME(rw, h264, name)
 
#define FUNC_H265(rw, name)   FUNC_NAME(rw, h265, name)
 
#define READ
 
#define READWRITE   read
 
#define RWContext   GetBitContext
 
#define xu(width, name, var, range_min, range_max)
 
#define xue(name, var, range_min, range_max)
 
#define xse(name, var, range_min, range_max)
 
#define u(width, name, range_min, range_max)   xu(width, name, current->name, range_min, range_max)
 
#define flag(name)   u(1, name, 0, 1)
 
#define ue(name, range_min, range_max)   xue(name, current->name, range_min, range_max)
 
#define se(name, range_min, range_max)   xse(name, current->name, range_min, range_max)
 
#define infer(name, value)
 
#define more_rbsp_data(var)   ((var) = cbs_h2645_read_more_rbsp_data(rw))
 
#define byte_alignment(rw)   (get_bits_count(rw) % 8)
 
#define allocate(name, size)
 
#define FUNC(name)   FUNC_H264(READWRITE, name)
 
#define FUNC(name)   FUNC_H265(READWRITE, name)
 
#define WRITE
 
#define READWRITE   write
 
#define RWContext   PutBitContext
 
#define xu(width, name, var, range_min, range_max)
 
#define xue(name, var, range_min, range_max)
 
#define xse(name, var, range_min, range_max)
 
#define u(width, name, range_min, range_max)   xu(width, name, current->name, range_min, range_max)
 
#define flag(name)   u(1, name, 0, 1)
 
#define ue(name, range_min, range_max)   xue(name, current->name, range_min, range_max)
 
#define se(name, range_min, range_max)   xse(name, current->name, range_min, range_max)
 
#define infer(name, value)
 
#define more_rbsp_data(var)   (var)
 
#define byte_alignment(rw)   (put_bits_count(rw) % 8)
 
#define allocate(name, size)
 
#define FUNC(name)   FUNC_H264(READWRITE, name)
 
#define FUNC(name)   FUNC_H265(READWRITE, name)
 
#define cbs_h2645_replace_ps(h26n, ps_name, ps_var, id_element)
 

Functions

static int cbs_read_ue_golomb (CodedBitstreamContext *ctx, GetBitContext *gbc, const char *name, uint32_t *write_to, uint32_t range_min, uint32_t range_max)
 
static int cbs_read_se_golomb (CodedBitstreamContext *ctx, GetBitContext *gbc, const char *name, int32_t *write_to, int32_t range_min, int32_t range_max)
 
static int cbs_write_ue_golomb (CodedBitstreamContext *ctx, PutBitContext *pbc, const char *name, uint32_t value, uint32_t range_min, uint32_t range_max)
 
static int cbs_write_se_golomb (CodedBitstreamContext *ctx, PutBitContext *pbc, const char *name, int32_t value, int32_t range_min, int32_t range_max)
 
static int cbs_h2645_read_more_rbsp_data (GetBitContext *gbc)
 
static void cbs_h264_free_pps (void *unit, uint8_t *content)
 
static void cbs_h264_free_sei_payload (H264RawSEIPayload *payload)
 
static void cbs_h264_free_sei (void *unit, uint8_t *content)
 
static void cbs_h264_free_slice (void *unit, uint8_t *content)
 
static void cbs_h265_free_vps (void *unit, uint8_t *content)
 
static void cbs_h265_free_sps (void *unit, uint8_t *content)
 
static void cbs_h265_free_pps (void *unit, uint8_t *content)
 
static void cbs_h265_free_slice (void *unit, uint8_t *content)
 
static int cbs_h2645_fragment_add_nals (CodedBitstreamContext *ctx, CodedBitstreamFragment *frag, const H2645Packet *packet)
 
static int cbs_h2645_split_fragment (CodedBitstreamContext *ctx, CodedBitstreamFragment *frag, int header)
 
 cbs_h2645_replace_ps (cbs_h2645_replace_ps(4, cbs_h2645_replace_ps(SPS, cbs_h2645_replace_ps(sps, seq_parameter_set_id)
 
static int cbs_h265_read_nal_unit (CodedBitstreamContext *ctx, CodedBitstreamUnit *unit)
 
static int cbs_h264_write_nal_unit (CodedBitstreamContext *ctx, CodedBitstreamUnit *unit, PutBitContext *pbc)
 
static int cbs_h265_write_nal_unit (CodedBitstreamContext *ctx, CodedBitstreamUnit *unit, PutBitContext *pbc)
 
static int cbs_h2645_write_nal_unit (CodedBitstreamContext *ctx, CodedBitstreamUnit *unit)
 
static int cbs_h2645_assemble_fragment (CodedBitstreamContext *ctx, CodedBitstreamFragment *frag)
 
static void cbs_h264_close (CodedBitstreamContext *ctx)
 
static void cbs_h265_close (CodedBitstreamContext *ctx)
 
int ff_cbs_h264_add_sei_message (CodedBitstreamContext *ctx, CodedBitstreamFragment *au, const H264RawSEIPayload *payload)
 Add an SEI message to an access unit. More...
 
int ff_cbs_h264_delete_sei_message (CodedBitstreamContext *ctx, CodedBitstreamFragment *au, CodedBitstreamUnit *nal, int position)
 Delete an SEI message from an access unit. More...
 

Variables

const CodedBitstreamType ff_cbs_type_h264
 
const CodedBitstreamType ff_cbs_type_h265
 

Macro Definition Documentation

◆ HEADER

#define HEADER (   name)

◆ CHECK

#define CHECK (   call)
Value:
do { \
err = (call); \
if (err < 0) \
return err; \
} while (0)

Definition at line 232 of file cbs_h2645.c.

◆ FUNC_NAME

#define FUNC_NAME (   rw,
  codec,
  name 
)    cbs_ ## codec ## _ ## rw ## _ ## name

Definition at line 238 of file cbs_h2645.c.

◆ FUNC_H264

#define FUNC_H264 (   rw,
  name 
)    FUNC_NAME(rw, h264, name)

Definition at line 239 of file cbs_h2645.c.

◆ FUNC_H265

#define FUNC_H265 (   rw,
  name 
)    FUNC_NAME(rw, h265, name)

Definition at line 240 of file cbs_h2645.c.

◆ READ

#define READ

Definition at line 243 of file cbs_h2645.c.

◆ READWRITE [1/2]

#define READWRITE   read

Definition at line 325 of file cbs_h2645.c.

◆ RWContext [1/2]

#define RWContext   GetBitContext

Definition at line 326 of file cbs_h2645.c.

◆ xu [1/2]

#define xu (   width,
  name,
  var,
  range_min,
  range_max 
)
Value:
do { \
uint32_t value = range_min; \
&value, range_min, range_max)); \
var = value; \
} while (0)
const char * name
Definition: avisynth_c.h:775
uint16_t width
Definition: gdv.c:47
AVFormatContext * ctx
Definition: movenc.c:48
double value
Definition: eval.c:98
int ff_cbs_read_unsigned(CodedBitstreamContext *ctx, GetBitContext *gbc, int width, const char *name, uint32_t *write_to, uint32_t range_min, uint32_t range_max)
Definition: cbs.c:378

Definition at line 328 of file cbs_h2645.c.

Referenced by byte_alignment(), extension_data(), filler(), profile_tier_level(), rbsp_trailing_bits(), sei(), sei_buffering_period(), sei_payload(), sei_user_data_registered(), sei_user_data_unregistered(), slice_header(), and vps().

◆ xue [1/2]

#define xue (   name,
  var,
  range_min,
  range_max 
)
Value:
do { \
uint32_t value = range_min; \
CHECK(cbs_read_ue_golomb(ctx, rw, #name, \
&value, range_min, range_max)); \
var = value; \
} while (0)
const char * name
Definition: avisynth_c.h:775
static int cbs_read_ue_golomb(CodedBitstreamContext *ctx, GetBitContext *gbc, const char *name, uint32_t *write_to, uint32_t range_min, uint32_t range_max)
Definition: cbs_h2645.c:34
AVFormatContext * ctx
Definition: movenc.c:48
double value
Definition: eval.c:98

Definition at line 333 of file cbs_h2645.c.

Referenced by dec_ref_pic_marking(), and ref_pic_list_modification().

◆ xse [1/2]

#define xse (   name,
  var,
  range_min,
  range_max 
)
Value:
do { \
int32_t value = range_min; \
CHECK(cbs_read_se_golomb(ctx, rw, #name, \
&value, range_min, range_max)); \
var = value; \
} while (0)
const char * name
Definition: avisynth_c.h:775
AVFormatContext * ctx
Definition: movenc.c:48
double value
Definition: eval.c:98
static int cbs_read_se_golomb(CodedBitstreamContext *ctx, GetBitContext *gbc, const char *name, int32_t *write_to, int32_t range_min, int32_t range_max)
Definition: cbs_h2645.c:84

Definition at line 338 of file cbs_h2645.c.

Referenced by scaling_list(), and scaling_list_data().

◆ u [1/2]

#define u (   width,
  name,
  range_min,
  range_max 
)    xu(width, name, current->name, range_min, range_max)

Definition at line 344 of file cbs_h2645.c.

Referenced by adpcm_compress_trellis(), adpcm_decode_frame(), apply_lut(), aud(), av_gcd(), avui_decode_frame(), aw_pulse_set2(), bitpacked_decode_yuv422p10(), build_diff_map(), build_huff(), build_huff10(), calc_combed_score(), calc_persp_luts(), calculate_codes(), cinepak_decode_codebook(), convert_input(), cpia_decode_frame(), cqt_calc(), create_chrominance_lut(), dash_read_header(), decode_aybr(), decode_aybri(), decode_byry(), decode_byryi(), decode_c82i(), decode_c82p(), decode_ca2i(), decode_ca2p(), decode_ca4i(), decode_ca4p(), decode_frame(), decode_subband_slice_buffered(), decode_ybr(), decode_ybr10(), decode_ybr10i(), decode_ybri(), decode_ybyr(), decode_yry10(), decode_yry10i(), do_chromakey_slice(), dv_decode_ac(), dxv_decompress_cgo(), encode_422_bitstream(), encode_frame(), ff_print_debug_info2(), ff_rtjpeg_decode_frame_yuv420(), ff_sws_alphablendaway(), ff_vorbis_len2vlc(), ff_yuv2rgb_c_init_tables(), fill_in_tongue(), filter_frame(), frame_block_to_cell(), generate_joint_tables(), generate_kernel(), get_bits(), get_s16l(), getutime(), hl_decode_mb_predict_luma(), hls_read_header(), hrd_parameters(), huff_build(), huff_build10(), huff_build12(), init(), intra_predict(), inv_cdf(), jp2_find_codestream(), lcg_random(), main(), mode17(), mode23(), mode24(), model256_update(), model2_update(), model_update(), monochrome_color_location(), mss2_blit_wmv9_template(), nal_unit_header(), pick_color(), pow_m1_4(), pps(), pps_scc_extension(), print_option(), process_slice_uyvy422(), process_slice_yuv420p(), process_slice_yuv422p(), process_slice_yuv444p(), profile_tier_level(), read_high_coeffs(), ref_pic_lists_modification(), render_default_font(), resample_cubic(), resample_linear(), reverse_dc_prediction(), rgb16_32ToUV_c_template(), rgb2yuv_fsb(), rso_write_header(), rv34_pred_4x4_block(), rv40_weak_loop_filter(), sbr_sum_square_c(), scan_float(), scan_int32(), sei_display_orientation(), sei_pic_timestamp(), sei_pic_timing(), sei_recovery_point(), sei_user_data_registered(), sign_extend(), slice_header(), slice_segment_header(), sps(), sps_extension(), sps_scc_extension(), svq3_add_idct_c(), svq3_decode_mb(), sws_scale(), tm2_decode_blocks(), uninit_options(), v308_decode_frame(), v308_encode_frame(), v408_decode_frame(), v408_encode_frame(), v410_decode_frame(), v410_encode_frame(), vp9_handle_packet(), vps(), vui_parameters(), wavpack_encode_block(), wv_get_value_float(), y216_decode_frame(), y41p_decode_frame(), y41p_encode_frame(), yuv2nv12cX_c(), yuv2p010cX_c(), yuv2p016cX_c(), yuv2rgb(), yuv2yuv(), yuv4_decode_frame(), yuv4_encode_frame(), and zero12v_decode_frame().

◆ flag [1/2]

#define flag (   name)    u(1, name, 0, 1)

◆ ue [1/2]

#define ue (   name,
  range_min,
  range_max 
)    xue(name, current->name, range_min, range_max)

◆ se [1/2]

#define se (   name,
  range_min,
  range_max 
)    xse(name, current->name, range_min, range_max)

◆ infer [1/2]

#define infer (   name,
  value 
)
Value:
do { \
current->name = value; \
} while (0)
double value
Definition: eval.c:98

Definition at line 352 of file cbs_h2645.c.

Referenced by hrd_parameters(), pps(), pps_scc_extension(), pred_weight_table(), sei_pic_timestamp(), slice_header(), slice_segment_header(), sps(), st_ref_pic_set(), vps(), and vui_parameters().

◆ more_rbsp_data [1/2]

#define more_rbsp_data (   var)    ((var) = cbs_h2645_read_more_rbsp_data(rw))

Definition at line 361 of file cbs_h2645.c.

Referenced by pps().

◆ byte_alignment [1/2]

#define byte_alignment (   rw)    (get_bits_count(rw) % 8)

Definition at line 363 of file cbs_h2645.c.

Referenced by rbsp_trailing_bits(), sei_payload(), and slice_header().

◆ allocate [1/2]

#define allocate (   name,
  size 
)
Value:
do { \
name ## _ref = av_buffer_allocz(size); \
if (!name ## _ref) \
return AVERROR(ENOMEM); \
name = name ## _ref->data; \
} while (0)
const char * name
Definition: avisynth_c.h:775
int size
#define AVERROR(e)
Definition: error.h:43
AVBufferRef * av_buffer_allocz(int size)
Same as av_buffer_alloc(), except the returned buffer will be initialized to zero.
Definition: buffer.c:83

Definition at line 365 of file cbs_h2645.c.

Referenced by extension_data(), pps(), sei_payload(), sei_user_data_registered(), and sei_user_data_unregistered().

◆ FUNC [1/4]

#define FUNC (   name)    FUNC_H264(READWRITE, name)

Definition at line 377 of file cbs_h2645.c.

◆ FUNC [2/4]

#define FUNC (   name)    FUNC_H265(READWRITE, name)

Definition at line 377 of file cbs_h2645.c.

◆ WRITE

#define WRITE

Definition at line 324 of file cbs_h2645.c.

◆ READWRITE [2/2]

#define READWRITE   write

Definition at line 325 of file cbs_h2645.c.

◆ RWContext [2/2]

#define RWContext   PutBitContext

Definition at line 326 of file cbs_h2645.c.

◆ xu [2/2]

#define xu (   width,
  name,
  var,
  range_min,
  range_max 
)
Value:
do { \
uint32_t value = var; \
value, range_min, range_max)); \
} while (0)
const char * name
Definition: avisynth_c.h:775
int ff_cbs_write_unsigned(CodedBitstreamContext *ctx, PutBitContext *pbc, int width, const char *name, uint32_t value, uint32_t range_min, uint32_t range_max)
Definition: cbs.c:419
uint16_t width
Definition: gdv.c:47
AVFormatContext * ctx
Definition: movenc.c:48
double value
Definition: eval.c:98

Definition at line 328 of file cbs_h2645.c.

◆ xue [2/2]

#define xue (   name,
  var,
  range_min,
  range_max 
)
Value:
do { \
uint32_t value = var; \
CHECK(cbs_write_ue_golomb(ctx, rw, #name, \
value, range_min, range_max)); \
} while (0)
const char * name
Definition: avisynth_c.h:775
AVFormatContext * ctx
Definition: movenc.c:48
static int cbs_write_ue_golomb(CodedBitstreamContext *ctx, PutBitContext *pbc, const char *name, uint32_t value, uint32_t range_min, uint32_t range_max)
Definition: cbs_h2645.c:138
double value
Definition: eval.c:98

Definition at line 333 of file cbs_h2645.c.

◆ xse [2/2]

#define xse (   name,
  var,
  range_min,
  range_max 
)
Value:
do { \
int32_t value = var; \
CHECK(cbs_write_se_golomb(ctx, rw, #name, \
value, range_min, range_max)); \
} while (0)
const char * name
Definition: avisynth_c.h:775
AVFormatContext * ctx
Definition: movenc.c:48
static int cbs_write_se_golomb(CodedBitstreamContext *ctx, PutBitContext *pbc, const char *name, int32_t value, int32_t range_min, int32_t range_max)
Definition: cbs_h2645.c:179
double value
Definition: eval.c:98

Definition at line 338 of file cbs_h2645.c.

◆ u [2/2]

#define u (   width,
  name,
  range_min,
  range_max 
)    xu(width, name, current->name, range_min, range_max)

Definition at line 344 of file cbs_h2645.c.

◆ flag [2/2]

#define flag (   name)    u(1, name, 0, 1)

Definition at line 346 of file cbs_h2645.c.

◆ ue [2/2]

#define ue (   name,
  range_min,
  range_max 
)    xue(name, current->name, range_min, range_max)

Definition at line 347 of file cbs_h2645.c.

◆ se [2/2]

#define se (   name,
  range_min,
  range_max 
)    xse(name, current->name, range_min, range_max)

Definition at line 349 of file cbs_h2645.c.

◆ infer [2/2]

#define infer (   name,
  value 
)
Value:
do { \
if (current->name != (value)) { \
av_log(ctx->log_ctx, AV_LOG_WARNING, "Warning: " \
"%s does not match inferred value: " \
"%"PRId64", but should be %"PRId64".\n", \
#name, (int64_t)current->name, (int64_t)(value)); \
} \
} while (0)
const char * name
Definition: avisynth_c.h:775
#define AV_LOG_WARNING
Something somehow does not look correct.
Definition: log.h:182
AVFormatContext * ctx
Definition: movenc.c:48
double value
Definition: eval.c:98

Definition at line 352 of file cbs_h2645.c.

◆ more_rbsp_data [2/2]

#define more_rbsp_data (   var)    (var)

Definition at line 361 of file cbs_h2645.c.

◆ byte_alignment [2/2]

#define byte_alignment (   rw)    (put_bits_count(rw) % 8)

Definition at line 363 of file cbs_h2645.c.

◆ allocate [2/2]

#define allocate (   name,
  size 
)
Value:
do { \
if (!name) { \
av_log(ctx->log_ctx, AV_LOG_ERROR, "%s must be set " \
"for writing.\n", #name); \
} \
} while (0)
const char * name
Definition: avisynth_c.h:775
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:59
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:176
AVFormatContext * ctx
Definition: movenc.c:48

Definition at line 365 of file cbs_h2645.c.

◆ FUNC [3/4]

#define FUNC (   name)    FUNC_H264(READWRITE, name)

Definition at line 377 of file cbs_h2645.c.

◆ FUNC [4/4]

#define FUNC (   name)    FUNC_H265(READWRITE, name)

Definition at line 377 of file cbs_h2645.c.

◆ cbs_h2645_replace_ps

#define cbs_h2645_replace_ps (   h26n,
  ps_name,
  ps_var,
  id_element 
)
Value:
static int cbs_h26 ## h26n ## _replace_ ## ps_var(CodedBitstreamContext *ctx, \
const H26 ## h26n ## Raw ## ps_name *ps_var) \
{ \
CodedBitstreamH26 ## h26n ## Context *priv = ctx->priv_data; \
unsigned int id = ps_var->id_element; \
if (id > FF_ARRAY_ELEMS(priv->ps_var)) { \
av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid " #ps_name \
" id : %d.\n", id); \
} \
if (priv->ps_var[id] == priv->active_ ## ps_var) \
priv->active_ ## ps_var = NULL ; \
av_freep(&priv->ps_var[id]); \
priv->ps_var[id] = av_malloc(sizeof(*ps_var)); \
if (!priv->ps_var[id]) \
return AVERROR(ENOMEM); \
memcpy(priv->ps_var[id], ps_var, sizeof(*ps_var)); \
return 0; \
}
Definition: async.c:56
#define NULL
Definition: coverity.c:32
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:59
#define av_malloc(s)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:176
#define AVERROR(e)
Definition: error.h:43
AVFormatContext * ctx
Definition: movenc.c:48
#define FF_ARRAY_ELEMS(a)
Context structure for coded bitstream operations.
Definition: cbs.h:156
void * priv_data
Format private data.
Definition: avformat.h:1370
enum AVCodecID id

Definition at line 660 of file cbs_h2645.c.

Function Documentation

◆ cbs_read_ue_golomb()

static int cbs_read_ue_golomb ( CodedBitstreamContext ctx,
GetBitContext gbc,
const char *  name,
uint32_t *  write_to,
uint32_t  range_min,
uint32_t  range_max 
)
static

Definition at line 34 of file cbs_h2645.c.

◆ cbs_read_se_golomb()

static int cbs_read_se_golomb ( CodedBitstreamContext ctx,
GetBitContext gbc,
const char *  name,
int32_t write_to,
int32_t  range_min,
int32_t  range_max 
)
static

Definition at line 84 of file cbs_h2645.c.

◆ cbs_write_ue_golomb()

static int cbs_write_ue_golomb ( CodedBitstreamContext ctx,
PutBitContext pbc,
const char *  name,
uint32_t  value,
uint32_t  range_min,
uint32_t  range_max 
)
static

Definition at line 138 of file cbs_h2645.c.

◆ cbs_write_se_golomb()

static int cbs_write_se_golomb ( CodedBitstreamContext ctx,
PutBitContext pbc,
const char *  name,
int32_t  value,
int32_t  range_min,
int32_t  range_max 
)
static

Definition at line 179 of file cbs_h2645.c.

◆ cbs_h2645_read_more_rbsp_data()

static int cbs_h2645_read_more_rbsp_data ( GetBitContext gbc)
static

Definition at line 279 of file cbs_h2645.c.

Referenced by extension_data(), and sei().

◆ cbs_h264_free_pps()

static void cbs_h264_free_pps ( void unit,
uint8_t content 
)
static

Definition at line 397 of file cbs_h2645.c.

Referenced by cbs_h2645_replace_ps().

◆ cbs_h264_free_sei_payload()

static void cbs_h264_free_sei_payload ( H264RawSEIPayload payload)
static

Definition at line 404 of file cbs_h2645.c.

Referenced by cbs_h264_free_sei(), and ff_cbs_h264_delete_sei_message().

◆ cbs_h264_free_sei()

static void cbs_h264_free_sei ( void unit,
uint8_t content 
)
static

Definition at line 424 of file cbs_h2645.c.

Referenced by cbs_h2645_replace_ps(), and ff_cbs_h264_add_sei_message().

◆ cbs_h264_free_slice()

static void cbs_h264_free_slice ( void unit,
uint8_t content 
)
static

Definition at line 433 of file cbs_h2645.c.

Referenced by cbs_h2645_replace_ps().

◆ cbs_h265_free_vps()

static void cbs_h265_free_vps ( void unit,
uint8_t content 
)
static

Definition at line 440 of file cbs_h2645.c.

Referenced by cbs_h265_read_nal_unit().

◆ cbs_h265_free_sps()

static void cbs_h265_free_sps ( void unit,
uint8_t content 
)
static

Definition at line 447 of file cbs_h2645.c.

Referenced by cbs_h265_read_nal_unit().

◆ cbs_h265_free_pps()

static void cbs_h265_free_pps ( void unit,
uint8_t content 
)
static

Definition at line 454 of file cbs_h2645.c.

Referenced by cbs_h265_read_nal_unit().

◆ cbs_h265_free_slice()

static void cbs_h265_free_slice ( void unit,
uint8_t content 
)
static

Definition at line 461 of file cbs_h2645.c.

Referenced by cbs_h265_read_nal_unit().

◆ cbs_h2645_fragment_add_nals()

static int cbs_h2645_fragment_add_nals ( CodedBitstreamContext ctx,
CodedBitstreamFragment frag,
const H2645Packet packet 
)
static

Definition at line 468 of file cbs_h2645.c.

Referenced by cbs_h2645_split_fragment().

◆ cbs_h2645_split_fragment()

static int cbs_h2645_split_fragment ( CodedBitstreamContext ctx,
CodedBitstreamFragment frag,
int  header 
)
static

Definition at line 501 of file cbs_h2645.c.

◆ cbs_h2645_replace_ps()

cbs_h2645_replace_ps ( cbs_h2645_replace_ps(  4,
cbs_h2645_replace_ps(  SPS,
cbs_h2645_replace_ps(  sps,
seq_parameter_set_id   
)

Definition at line 681 of file cbs_h2645.c.

◆ cbs_h265_read_nal_unit()

static int cbs_h265_read_nal_unit ( CodedBitstreamContext ctx,
CodedBitstreamUnit unit 
)
static

Definition at line 838 of file cbs_h2645.c.

◆ cbs_h264_write_nal_unit()

static int cbs_h264_write_nal_unit ( CodedBitstreamContext ctx,
CodedBitstreamUnit unit,
PutBitContext pbc 
)
static

Definition at line 982 of file cbs_h2645.c.

Referenced by cbs_h2645_write_nal_unit().

◆ cbs_h265_write_nal_unit()

static int cbs_h265_write_nal_unit ( CodedBitstreamContext ctx,
CodedBitstreamUnit unit,
PutBitContext pbc 
)
static

Definition at line 1103 of file cbs_h2645.c.

Referenced by cbs_h2645_write_nal_unit().

◆ cbs_h2645_write_nal_unit()

static int cbs_h2645_write_nal_unit ( CodedBitstreamContext ctx,
CodedBitstreamUnit unit 
)
static

Definition at line 1224 of file cbs_h2645.c.

◆ cbs_h2645_assemble_fragment()

static int cbs_h2645_assemble_fragment ( CodedBitstreamContext ctx,
CodedBitstreamFragment frag 
)
static

Definition at line 1283 of file cbs_h2645.c.

◆ cbs_h264_close()

static void cbs_h264_close ( CodedBitstreamContext ctx)
static

Definition at line 1370 of file cbs_h2645.c.

◆ cbs_h265_close()

static void cbs_h265_close ( CodedBitstreamContext ctx)
static

Definition at line 1385 of file cbs_h2645.c.

◆ ff_cbs_h264_add_sei_message()

int ff_cbs_h264_add_sei_message ( CodedBitstreamContext ctx,
CodedBitstreamFragment au,
const H264RawSEIPayload payload 
)

Add an SEI message to an access unit.

Definition at line 1428 of file cbs_h2645.c.

Referenced by h264_metadata_filter().

◆ ff_cbs_h264_delete_sei_message()

int ff_cbs_h264_delete_sei_message ( CodedBitstreamContext ctx,
CodedBitstreamFragment access_unit,
CodedBitstreamUnit nal_unit,
int  position 
)

Delete an SEI message from an access unit.

Deletes from nal_unit, which must be an SEI NAL unit. If this is the last message in nal_unit, also deletes it from access_unit.

Definition at line 1490 of file cbs_h2645.c.

Referenced by h264_metadata_filter().

Variable Documentation

◆ ff_cbs_type_h264

const CodedBitstreamType ff_cbs_type_h264
Initial value:
= {
.codec_id = AV_CODEC_ID_H264,
.priv_data_size = sizeof(CodedBitstreamH264Context),
.split_fragment = &cbs_h2645_split_fragment,
.read_unit = &cbs_h264_read_nal_unit,
.write_unit = &cbs_h2645_write_nal_unit,
.assemble_fragment = &cbs_h2645_assemble_fragment,
.close = &cbs_h264_close,
}
static int cbs_h2645_write_nal_unit(CodedBitstreamContext *ctx, CodedBitstreamUnit *unit)
Definition: cbs_h2645.c:1224
static int cbs_h2645_assemble_fragment(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag)
Definition: cbs_h2645.c:1283
static void cbs_h264_close(CodedBitstreamContext *ctx)
Definition: cbs_h2645.c:1370
static int cbs_h2645_split_fragment(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag, int header)
Definition: cbs_h2645.c:501

Definition at line 1402 of file cbs_h2645.c.

◆ ff_cbs_type_h265

const CodedBitstreamType ff_cbs_type_h265
Initial value:
= {
.codec_id = AV_CODEC_ID_HEVC,
.priv_data_size = sizeof(CodedBitstreamH265Context),
.split_fragment = &cbs_h2645_split_fragment,
.read_unit = &cbs_h265_read_nal_unit,
.write_unit = &cbs_h2645_write_nal_unit,
.assemble_fragment = &cbs_h2645_assemble_fragment,
.close = &cbs_h265_close,
}
static int cbs_h2645_write_nal_unit(CodedBitstreamContext *ctx, CodedBitstreamUnit *unit)
Definition: cbs_h2645.c:1224
static int cbs_h265_read_nal_unit(CodedBitstreamContext *ctx, CodedBitstreamUnit *unit)
Definition: cbs_h2645.c:838
static int cbs_h2645_assemble_fragment(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag)
Definition: cbs_h2645.c:1283
static void cbs_h265_close(CodedBitstreamContext *ctx)
Definition: cbs_h2645.c:1385
static int cbs_h2645_split_fragment(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag, int header)
Definition: cbs_h2645.c:501

Definition at line 1415 of file cbs_h2645.c.