FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
cbs_av1.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/pixfmt.h"
#include "cbs.h"
#include "cbs_internal.h"
#include "cbs_av1.h"
#include "internal.h"
#include "cbs_av1_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_AV1(rw, name)   FUNC_NAME(rw, av1, name)
 
#define FUNC(name)   FUNC_AV1(READWRITE, name)
 
#define SUBSCRIPTS(subs,...)   (subs > 0 ? ((int[subs + 1]){ subs, __VA_ARGS__ }) : NULL)
 
#define fb(width, name)   xf(width, name, current->name, 0, MAX_UINT_BITS(width), 0)
 
#define fc(width, name, range_min, range_max)   xf(width, name, current->name, range_min, range_max, 0)
 
#define flag(name)   fb(1, name)
 
#define su(width, name)   xsu(width, name, current->name, 0)
 
#define fbs(width, name, subs,...)   xf(width, name, current->name, 0, MAX_UINT_BITS(width), subs, __VA_ARGS__)
 
#define fcs(width, name, range_min, range_max, subs,...)   xf(width, name, current->name, range_min, range_max, subs, __VA_ARGS__)
 
#define flags(name, subs,...)   xf(1, name, current->name, 0, 1, subs, __VA_ARGS__)
 
#define sus(width, name, subs,...)   xsu(width, name, current->name, subs, __VA_ARGS__)
 
#define fixed(width, name, value)
 
#define READ
 
#define READWRITE   read
 
#define RWContext   GetBitContext
 
#define xf(width, name, var, range_min, range_max, subs,...)
 
#define xsu(width, name, var, subs,...)
 
#define uvlc(name, range_min, range_max)
 
#define ns(max_value, name, subs,...)
 
#define increment(name, min, max)
 
#define subexp(name, max, subs,...)
 
#define delta_q(name)
 
#define leb128(name)
 
#define infer(name, value)
 
#define byte_alignment(rw)   (get_bits_count(rw) % 8)
 
#define WRITE
 
#define READWRITE   write
 
#define RWContext   PutBitContext
 
#define xf(width, name, var, range_min, range_max, subs,...)
 
#define xsu(width, name, var, subs,...)
 
#define uvlc(name, range_min, range_max)
 
#define ns(max_value, name, subs,...)
 
#define increment(name, min, max)
 
#define subexp(name, max, subs,...)
 
#define delta_q(name)
 
#define leb128(name)
 
#define infer(name, value)
 
#define byte_alignment(rw)   (put_bits_count(rw) % 8)
 

Functions

static int cbs_av1_read_uvlc (CodedBitstreamContext *ctx, GetBitContext *gbc, const char *name, uint32_t *write_to, uint32_t range_min, uint32_t range_max)
 
static int cbs_av1_write_uvlc (CodedBitstreamContext *ctx, PutBitContext *pbc, const char *name, uint32_t value, uint32_t range_min, uint32_t range_max)
 
static int cbs_av1_read_leb128 (CodedBitstreamContext *ctx, GetBitContext *gbc, const char *name, uint64_t *write_to)
 
static int cbs_av1_write_leb128 (CodedBitstreamContext *ctx, PutBitContext *pbc, const char *name, uint64_t value)
 
static int cbs_av1_read_su (CodedBitstreamContext *ctx, GetBitContext *gbc, int width, const char *name, const int *subscripts, int32_t *write_to)
 
static int cbs_av1_write_su (CodedBitstreamContext *ctx, PutBitContext *pbc, int width, const char *name, const int *subscripts, int32_t value)
 
static int cbs_av1_read_ns (CodedBitstreamContext *ctx, GetBitContext *gbc, uint32_t n, const char *name, const int *subscripts, uint32_t *write_to)
 
static int cbs_av1_write_ns (CodedBitstreamContext *ctx, PutBitContext *pbc, uint32_t n, const char *name, const int *subscripts, uint32_t value)
 
static int cbs_av1_read_increment (CodedBitstreamContext *ctx, GetBitContext *gbc, uint32_t range_min, uint32_t range_max, const char *name, uint32_t *write_to)
 
static int cbs_av1_write_increment (CodedBitstreamContext *ctx, PutBitContext *pbc, uint32_t range_min, uint32_t range_max, const char *name, uint32_t value)
 
static int cbs_av1_read_subexp (CodedBitstreamContext *ctx, GetBitContext *gbc, uint32_t range_max, const char *name, const int *subscripts, uint32_t *write_to)
 
static int cbs_av1_write_subexp (CodedBitstreamContext *ctx, PutBitContext *pbc, uint32_t range_max, const char *name, const int *subscripts, uint32_t value)
 
static int cbs_av1_tile_log2 (int blksize, int target)
 
static int cbs_av1_get_relative_dist (const AV1RawSequenceHeader *seq, unsigned int a, unsigned int b)
 
static int cbs_av1_split_fragment (CodedBitstreamContext *ctx, CodedBitstreamFragment *frag, int header)
 
static void cbs_av1_free_tile_data (AV1RawTileData *td)
 
static void cbs_av1_free_metadata (AV1RawMetadata *md)
 
static void cbs_av1_free_obu (void *unit, uint8_t *content)
 
static int cbs_av1_ref_tile_data (CodedBitstreamContext *ctx, CodedBitstreamUnit *unit, GetBitContext *gbc, AV1RawTileData *td)
 
static int cbs_av1_read_unit (CodedBitstreamContext *ctx, CodedBitstreamUnit *unit)
 
static int cbs_av1_write_obu (CodedBitstreamContext *ctx, CodedBitstreamUnit *unit, PutBitContext *pbc)
 
static int cbs_av1_write_unit (CodedBitstreamContext *ctx, CodedBitstreamUnit *unit)
 
static int cbs_av1_assemble_fragment (CodedBitstreamContext *ctx, CodedBitstreamFragment *frag)
 
static void cbs_av1_close (CodedBitstreamContext *ctx)
 

Variables

const CodedBitstreamType ff_cbs_type_av1
 

Macro Definition Documentation

#define HEADER (   name)
#define CHECK (   call)
Value:
do { \
err = (call); \
if (err < 0) \
return err; \
} while (0)
return
if(ret< 0)
Definition: vf_mcdeint.c:279

Definition at line 572 of file cbs_av1.c.

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

Definition at line 578 of file cbs_av1.c.

#define FUNC_AV1 (   rw,
  name 
)    FUNC_NAME(rw, av1, name)

Definition at line 579 of file cbs_av1.c.

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

Definition at line 580 of file cbs_av1.c.

#define SUBSCRIPTS (   subs,
  ... 
)    (subs > 0 ? ((int[subs + 1]){ subs, __VA_ARGS__ }) : NULL)

Definition at line 582 of file cbs_av1.c.

#define fb (   width,
  name 
)    xf(width, name, current->name, 0, MAX_UINT_BITS(width), 0)
#define fc (   width,
  name,
  range_min,
  range_max 
)    xf(width, name, current->name, range_min, range_max, 0)
#define flag (   name)    fb(1, name)

Definition at line 588 of file cbs_av1.c.

Referenced by adpcm_decode_frame(), av_opt_flag_is_set(), av_vorbis_parse_frame_flags(), bit_allocation(), cinepak_decode_codebook(), cinepak_decode_vectors(), color_config(), dec_ref_pic_marking(), decode_bmv_frame(), decode_channel_wordlen(), decode_delta_j(), decode_registered_user_data_afd(), decode_registered_user_data_closed_caption(), delta_lf_params(), delta_q_params(), dxv_decompress_opcodes(), epic_decode_run_length(), film_grain_params(), find_and_decode_index(), frame_reference_mode(), hdcd_scan(), hq_decode_mb(), hqa_decode_mb(), hqx_decode_422(), hqx_decode_422a(), hqx_decode_444(), hqx_decode_444a(), hrd_parameters(), imc_decode_block(), initFilter(), interpolation_filter(), loop_filter_params(), main(), mark_ref(), metadata_timecode(), nal_unit_header(), obu_header(), old_codec1(), pps(), pps_range_extension(), pps_scc_extension(), profile_tier_level(), quantization_params(), read_header(), read_high_coeffs(), read_huffman_tables(), read_low_coeffs(), ref_pic_list_modification(), ref_pic_lists_modification(), render_size(), segmentation_params(), sei_display_orientation(), sei_pan_scan_rect(), sei_pic_timestamp(), sei_recovery_point(), sequence_header_obu(), set_af_flag(), set_disposition_bits(), skip_mode_params(), slice_header(), slice_segment_header(), sps(), sps_extension(), sps_range_extension(), sps_scc_extension(), st_ref_pic_set(), superres_params(), sws_init_context(), tile_group_obu(), tile_info(), timing_info(), uncompressed_header(), vorbis_parse_setup_hdr_codebooks(), vps(), vui_parameters(), write_index(), and xan_wc3_decode_frame().

#define su (   width,
  name 
)    xsu(width, name, current->name, 0)

Definition at line 589 of file cbs_av1.c.

Referenced by atrac1_decode_frame().

#define fbs (   width,
  name,
  subs,
  ... 
)    xf(width, name, current->name, 0, MAX_UINT_BITS(width), subs, __VA_ARGS__)
#define fcs (   width,
  name,
  range_min,
  range_max,
  subs,
  ... 
)    xf(width, name, current->name, range_min, range_max, subs, __VA_ARGS__)

Definition at line 594 of file cbs_av1.c.

Referenced by metadata_hdr_mdcv().

#define flags (   name,
  subs,
  ... 
)    xf(1, name, current->name, 0, 1, subs, __VA_ARGS__)
Examples:
ffhash.c.

Definition at line 596 of file cbs_av1.c.

Referenced by add_index_entry(), aom_encode(), aom_init(), ape_tag_read_field(), apply_param_change(), asf_read_stream_properties(), asf_write_packet(), av_get_cpu_flags(), av_opt_query_ranges(), av_opt_set_defaults2(), av_parse_cpu_flags(), av_read_image_line2(), av_timecode_init(), av_vdpau_bind_context(), av_write_image_line2(), avfilter_graph_queue_command(), avfilter_graph_set_auto_convert(), avi_add_ientry(), avi_read_idx1(), avi_write_header(), avi_write_packet_internal(), avio_check(), bidir_refine(), check(), crypto_open2(), decode_frame(), decode_frame_header(), decode_header(), decode_hextile(), decode_init(), decode_mb_b(), decode_rle(), decode_subblock(), decode_subblock3(), decode_tile_info(), device_open(), dnxhd_decode_dct_block(), dump_paramchange(), dump_stream_format(), dxa_read_header(), encode_codebook(), encode_frame(), encode_mode(), epzs_motion_search2(), epzs_motion_search4(), fbdev_read_header(), fbdev_write_header(), ff_ac3_apply_rematrixing(), ff_add_index_entry(), ff_alsa_open(), ff_draw_init(), ff_get_cpu_max_align_aarch64(), ff_get_cpu_max_align_ppc(), ff_get_cpu_max_align_x86(), ff_get_unscaled_swscale(), ff_ip_resolve_host(), ff_mediacodec_dec_send(), ff_mms_asf_header_parser(), ff_mp4_parse_es_descr(), ff_parse_mpeg2_descriptor(), ff_rdt_parse_packet(), ff_vc1_b_intfi_loop_filter(), ff_vc1_i_loop_filter(), ff_vc1_p_intfr_loop_filter(), ff_vc1_p_loop_filter(), ffat_init_encoder(), fileTest(), filter_codec_opts(), filter_frame(), find_prev_closest_index(), flush(), flv_read_header(), flv_read_packet(), flv_write_packet(), frame_size_with_refs(), gdv_decode_frame(), get_audio_flags(), get_mb_score(), get_needed_flags(), get_opt_flags_string(), gif_read_image(), global_motion_params(), hls_read_seek(), hpel_motion_search(), hrd_parameters(), init_context_defaults(), init_noise(), ipvideo_decode_block_opcode_0x7(), ipvideo_decode_block_opcode_0x7_16(), ipvideo_decode_block_opcode_0x8(), ipvideo_decode_block_opcode_0x8_16(), ipvideo_decode_block_opcode_0x9(), ipvideo_decode_block_opcode_0x9_16(), ipvideo_decode_block_opcode_0xA(), ipvideo_decode_block_opcode_0xA_16(), is_animated_webp_packet(), loop_filter_params(), lvf_read_packet(), magy_decode_slice(), magy_decode_slice10(), main(), matroska_parse_block(), matroska_parse_wavpack(), mjpeg_decode_app(), mkv_write_vtt_blocks(), mov_fix_index(), mov_parse_stsd_audio(), mov_read_tfhd(), mov_read_timecode_track(), mov_read_tkhd(), mov_read_trun(), mov_write_tfhd_tag(), mov_write_tkhd_tag(), mov_write_trun_tag(), mpeg_decode_user_data(), mpegps_read_pes_header(), mpegts_push_data(), mpegts_write_pes(), mpegts_write_section1(), msvideo1_decode_16bit(), msvideo1_decode_8bit(), mxf_compute_ptses_fake_index(), mxf_parse_physical_source_package(), mxf_parse_structural_metadata(), noise(), nut_write_packet(), nvenc_check_capabilities(), ogg_read_page(), old_codec37(), opt_cpuflags(), opt_loglevel(), parse_MP4SLDescrTag(), parse_opus_ts_header(), parse_pcr(), parse_pixel_format(), pmp_header(), pp_config_props(), pps(), pred_weight_table(), process_command(), profile_tier_level(), qpel_motion_search(), read_desc_chunk(), read_header(), read_moof_duration(), read_packet(), read_part_of_packet(), read_trun_duration(), rm_read_dts(), rm_read_header(), rm_read_packet(), rtp_parse_one_packet(), rtp_parse_packet_internal(), rv10_write_header(), scaling_list_data(), sdl2_write_header(), sdr2_read_packet(), segmentation_params(), sei_pic_timing(), selfTest(), sequence_header_obu(), seqvideo_decode(), show_help_default(), slice_segment_header(), smacker_read_packet(), sps(), st_ref_pic_set(), sub_layer_hrd_parameters(), sws_alloc_set_opts(), sws_getCachedContext(), sws_init_context(), swscale(), thread_get_buffer_internal(), thread_main(), txd_decode_frame(), url_alloc_for_protocol(), vaapi_map_frame(), validate_avframe_allocation(), vmdaudio_decode_frame(), vorbis_packet(), vps(), wmavoice_decode_init(), write_header(), write_sm_data(), and wv_read_block_header().

#define sus (   width,
  name,
  subs,
  ... 
)    xsu(width, name, current->name, subs, __VA_ARGS__)

Definition at line 598 of file cbs_av1.c.

Referenced by loop_filter_params(), and segmentation_params().

#define fixed (   width,
  name,
  value 
)
Value:
do { \
av_unused uint32_t fixed_value = value; \
xf(width, name, fixed_value, value, value, 0); \
} while (0)
#define width
GLsizei GLboolean const GLfloat * value
Definition: opengl_enc.c:109
#define xf(width, name, var, range_min, range_max, subs,...)
Definition: cbs_av1.c:698
#define av_unused
Definition: attributes.h:125
const char * name
Definition: opengl_enc.c:103

Definition at line 601 of file cbs_av1.c.

Referenced by byte_alignment(), color_config(), filler(), guess_mv(), main(), profile_tier_level(), rbsp_trailing_bits(), sei(), sei_payload(), slice_header(), trailing_bits(), uncompressed_header(), and vps().

#define READ

Definition at line 607 of file cbs_av1.c.

#define READWRITE   read

Definition at line 695 of file cbs_av1.c.

#define RWContext   GetBitContext

Definition at line 696 of file cbs_av1.c.

#define xf (   width,
  name,
  var,
  range_min,
  range_max,
  subs,
  ... 
)
Value:
do { \
uint32_t value = range_min; \
SUBSCRIPTS(subs, __VA_ARGS__), \
&value, range_min, range_max)); \
var = value; \
} while (0)
int ff_cbs_read_unsigned(CodedBitstreamContext *ctx, GetBitContext *gbc, int width, const char *name, const int *subscripts, uint32_t *write_to, uint32_t range_min, uint32_t range_max)
Definition: cbs.c:426
#define width
GLsizei GLboolean const GLfloat * value
Definition: opengl_enc.c:109
AVFormatContext * ctx
Definition: movenc.c:48
#define SUBSCRIPTS(subs,...)
Definition: cbs_av1.c:582
#define CHECK(call)
Definition: cbs_av1.c:572
const char * name
Definition: opengl_enc.c:103

Definition at line 698 of file cbs_av1.c.

Referenced by adpcm_decode_frame(), avpriv_mpegaudio_decode_header(), checkasm_check_nlmeans(), compute_safe_ssd_integral_image_c(), compute_ssd_integral_image(), decode_fixed_sparse(), decode_frame(), decode_i_block(), dv_write_pack(), dvb_encode_rle4(), dvbsub_parse_pixel_data_block(), encode_dvb_subtitles(), evrc_decode_frame(), ff_get_cpu_flags_x86(), ff_mpa_check_header(), ff_yuv2rgb_init_ppc(), frame_header_obu(), frame_sync_code(), gen_vector_table15(), gen_vector_table16(), gen_vector_table24(), h261_probe(), inverse_quant(), metadata_itut_t35(), modplug_read_packet(), mov_write_d263_tag(), mpegps_read_pes_header(), nvenc_load_libraries(), prores_encode_init(), roq_encode_init(), sbc_synthesize_eight(), sbc_synthesize_four(), trailing_bits(), vc1_b_h_intfi_loop_filter(), vc1_b_v_intfi_loop_filter(), vc1_decode_p_mb_intfr(), vc1_p_h_intfr_loop_filter(), vc1_p_h_loop_filter(), vc1_p_v_intfr_loop_filter(), vc1_p_v_loop_filter(), wavpack_decode_block(), and yop_decode_frame().

#define xsu (   width,
  name,
  var,
  subs,
  ... 
)
Value:
do { \
SUBSCRIPTS(subs, __VA_ARGS__), &value)); \
var = value; \
} while (0)
static int cbs_av1_read_su(CodedBitstreamContext *ctx, GetBitContext *gbc, int width, const char *name, const int *subscripts, int32_t *write_to)
Definition: cbs_av1.c:188
#define width
GLsizei GLboolean const GLfloat * value
Definition: opengl_enc.c:109
int32_t
AVFormatContext * ctx
Definition: movenc.c:48
#define SUBSCRIPTS(subs,...)
Definition: cbs_av1.c:582
#define CHECK(call)
Definition: cbs_av1.c:572
const char * name
Definition: opengl_enc.c:103

Definition at line 704 of file cbs_av1.c.

#define uvlc (   name,
  range_min,
  range_max 
)
Value:
do { \
uint32_t value = range_min; \
&value, range_min, range_max)); \
current->name = value; \
} while (0)
static int cbs_av1_read_uvlc(CodedBitstreamContext *ctx, GetBitContext *gbc, const char *name, uint32_t *write_to, uint32_t range_min, uint32_t range_max)
Definition: cbs_av1.c:28
GLsizei GLboolean const GLfloat * value
Definition: opengl_enc.c:109
AVFormatContext * ctx
Definition: movenc.c:48
#define CHECK(call)
Definition: cbs_av1.c:572
const char * name
Definition: opengl_enc.c:103

Definition at line 709 of file cbs_av1.c.

Referenced by timing_info().

#define ns (   max_value,
  name,
  subs,
  ... 
)
Value:
do { \
uint32_t value = 0; \
CHECK(cbs_av1_read_ns(ctx, rw, max_value, #name, \
SUBSCRIPTS(subs, __VA_ARGS__), &value)); \
current->name = value; \
} while (0)
static int cbs_av1_read_ns(CodedBitstreamContext *ctx, GetBitContext *gbc, uint32_t n, const char *name, const int *subscripts, uint32_t *write_to)
Definition: cbs_av1.c:256
GLsizei GLboolean const GLfloat * value
Definition: opengl_enc.c:109
AVFormatContext * ctx
Definition: movenc.c:48
#define SUBSCRIPTS(subs,...)
Definition: cbs_av1.c:582
#define CHECK(call)
Definition: cbs_av1.c:572
const char * name
Definition: opengl_enc.c:103

Definition at line 714 of file cbs_av1.c.

Referenced by analyze_plane(), event_loop(), output_frame(), and tile_info().

#define increment (   name,
  min,
  max 
)
Value:
do { \
uint32_t value = 0; \
CHECK(cbs_av1_read_increment(ctx, rw, min, max, #name, &value)); \
current->name = value; \
} while (0)
GLsizei GLboolean const GLfloat * value
Definition: opengl_enc.c:109
AVFormatContext * ctx
Definition: movenc.c:48
static int cbs_av1_read_increment(CodedBitstreamContext *ctx, GetBitContext *gbc, uint32_t range_min, uint32_t range_max, const char *name, uint32_t *write_to)
Definition: cbs_av1.c:355
float min
#define CHECK(call)
Definition: cbs_av1.c:572
const char * name
Definition: opengl_enc.c:103

Definition at line 720 of file cbs_av1.c.

Referenced by lr_params(), read_tx_mode(), and tile_info().

#define subexp (   name,
  max,
  subs,
  ... 
)
Value:
do { \
uint32_t value = 0; \
SUBSCRIPTS(subs, __VA_ARGS__), &value)); \
current->name = value; \
} while (0)
static int cbs_av1_read_subexp(CodedBitstreamContext *ctx, GetBitContext *gbc, uint32_t range_max, const char *name, const int *subscripts, uint32_t *write_to)
Definition: cbs_av1.c:433
GLsizei GLboolean const GLfloat * value
Definition: opengl_enc.c:109
AVFormatContext * ctx
Definition: movenc.c:48
#define SUBSCRIPTS(subs,...)
Definition: cbs_av1.c:582
#define CHECK(call)
Definition: cbs_av1.c:572
const char * name
Definition: opengl_enc.c:103

Definition at line 725 of file cbs_av1.c.

Referenced by global_motion_param().

#define delta_q (   name)
Value:
do { \
uint8_t delta_coded; \
int8_t delta_q; \
xf(1, name.delta_coded, delta_coded, 0, 1, 0); \
if (delta_coded) \
xsu(1 + 6, name.delta_q, delta_q, 0); \
delta_q = 0; \
current->name = delta_q; \
} while (0)
#define xsu(width, name, var, subs,...)
Definition: cbs_av1.c:704
uint8_t
#define delta_q(name)
Definition: cbs_av1.c:731
if(ret< 0)
Definition: vf_mcdeint.c:279
#define xf(width, name, var, range_min, range_max, subs,...)
Definition: cbs_av1.c:698
const char * name
Definition: opengl_enc.c:103

Definition at line 731 of file cbs_av1.c.

Referenced by quantization_params().

#define leb128 (   name)
Value:
do { \
uint64_t value = 0; \
CHECK(cbs_av1_read_leb128(ctx, rw, #name, &value)); \
current->name = value; \
} while (0)
GLsizei GLboolean const GLfloat * value
Definition: opengl_enc.c:109
AVFormatContext * ctx
Definition: movenc.c:48
static int cbs_av1_read_leb128(CodedBitstreamContext *ctx, GetBitContext *gbc, const char *name, uint64_t *write_to)
Definition: cbs_av1.c:128
#define CHECK(call)
Definition: cbs_av1.c:572
const char * name
Definition: opengl_enc.c:103

Definition at line 737 of file cbs_av1.c.

Referenced by metadata_obu().

#define infer (   name,
  value 
)
#define byte_alignment (   rw)    (get_bits_count(rw) % 8)

Definition at line 750 of file cbs_av1.c.

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

#define WRITE

Definition at line 694 of file cbs_av1.c.

#define READWRITE   write

Definition at line 695 of file cbs_av1.c.

#define RWContext   PutBitContext

Definition at line 696 of file cbs_av1.c.

#define xf (   width,
  name,
  var,
  range_min,
  range_max,
  subs,
  ... 
)
Value:
do { \
SUBSCRIPTS(subs, __VA_ARGS__), \
var, range_min, range_max)); \
} while (0)
int ff_cbs_write_unsigned(CodedBitstreamContext *ctx, PutBitContext *pbc, int width, const char *name, const int *subscripts, uint32_t value, uint32_t range_min, uint32_t range_max)
Definition: cbs.c:469
#define width
AVFormatContext * ctx
Definition: movenc.c:48
#define SUBSCRIPTS(subs,...)
Definition: cbs_av1.c:582
#define CHECK(call)
Definition: cbs_av1.c:572
const char * name
Definition: opengl_enc.c:103

Definition at line 698 of file cbs_av1.c.

#define xsu (   width,
  name,
  var,
  subs,
  ... 
)
Value:
do { \
SUBSCRIPTS(subs, __VA_ARGS__), var)); \
} while (0)
static int cbs_av1_write_su(CodedBitstreamContext *ctx, PutBitContext *pbc, int width, const char *name, const int *subscripts, int32_t value)
Definition: cbs_av1.c:225
#define width
AVFormatContext * ctx
Definition: movenc.c:48
#define SUBSCRIPTS(subs,...)
Definition: cbs_av1.c:582
#define CHECK(call)
Definition: cbs_av1.c:572
const char * name
Definition: opengl_enc.c:103

Definition at line 704 of file cbs_av1.c.

#define uvlc (   name,
  range_min,
  range_max 
)
Value:
do { \
CHECK(cbs_av1_write_uvlc(ctx, rw, #name, current->name, \
range_min, range_max)); \
} while (0)
static int cbs_av1_write_uvlc(CodedBitstreamContext *ctx, PutBitContext *pbc, const char *name, uint32_t value, uint32_t range_min, uint32_t range_max)
Definition: cbs_av1.c:84
AVFormatContext * ctx
Definition: movenc.c:48
#define CHECK(call)
Definition: cbs_av1.c:572
const char * name
Definition: opengl_enc.c:103

Definition at line 709 of file cbs_av1.c.

#define ns (   max_value,
  name,
  subs,
  ... 
)
Value:
do { \
CHECK(cbs_av1_write_ns(ctx, rw, max_value, #name, \
SUBSCRIPTS(subs, __VA_ARGS__), \
current->name)); \
} while (0)
AVFormatContext * ctx
Definition: movenc.c:48
static int cbs_av1_write_ns(CodedBitstreamContext *ctx, PutBitContext *pbc, uint32_t n, const char *name, const int *subscripts, uint32_t value)
Definition: cbs_av1.c:306
#define SUBSCRIPTS(subs,...)
Definition: cbs_av1.c:582
#define CHECK(call)
Definition: cbs_av1.c:572
const char * name
Definition: opengl_enc.c:103

Definition at line 714 of file cbs_av1.c.

#define increment (   name,
  min,
  max 
)
Value:
do { \
current->name)); \
} while (0)
static int cbs_av1_write_increment(CodedBitstreamContext *ctx, PutBitContext *pbc, uint32_t range_min, uint32_t range_max, const char *name, uint32_t value)
Definition: cbs_av1.c:392
AVFormatContext * ctx
Definition: movenc.c:48
float min
#define CHECK(call)
Definition: cbs_av1.c:572
const char * name
Definition: opengl_enc.c:103

Definition at line 720 of file cbs_av1.c.

#define subexp (   name,
  max,
  subs,
  ... 
)
Value:
do { \
SUBSCRIPTS(subs, __VA_ARGS__), \
current->name)); \
} while (0)
AVFormatContext * ctx
Definition: movenc.c:48
static int cbs_av1_write_subexp(CodedBitstreamContext *ctx, PutBitContext *pbc, uint32_t range_max, const char *name, const int *subscripts, uint32_t value)
Definition: cbs_av1.c:483
#define SUBSCRIPTS(subs,...)
Definition: cbs_av1.c:582
#define CHECK(call)
Definition: cbs_av1.c:572
const char * name
Definition: opengl_enc.c:103

Definition at line 725 of file cbs_av1.c.

#define delta_q (   name)
Value:
do { \
xf(1, name.delta_coded, current->name != 0, 0, 1, 0); \
if (current->name) \
xsu(1 + 6, name.delta_q, current->name, 0); \
} while (0)
#define xsu(width, name, var, subs,...)
Definition: cbs_av1.c:704
if(ret< 0)
Definition: vf_mcdeint.c:279
#define xf(width, name, var, range_min, range_max, subs,...)
Definition: cbs_av1.c:698
const char * name
Definition: opengl_enc.c:103

Definition at line 731 of file cbs_av1.c.

#define leb128 (   name)
Value:
do { \
CHECK(cbs_av1_write_leb128(ctx, rw, #name, current->name)); \
} while (0)
static int cbs_av1_write_leb128(CodedBitstreamContext *ctx, PutBitContext *pbc, const char *name, uint64_t value)
Definition: cbs_av1.c:158
AVFormatContext * ctx
Definition: movenc.c:48
#define CHECK(call)
Definition: cbs_av1.c:572
const char * name
Definition: opengl_enc.c:103

Definition at line 737 of file cbs_av1.c.

#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)
#define AV_LOG_WARNING
Something somehow does not look correct.
Definition: log.h:182
#define av_log(a,...)
GLsizei GLboolean const GLfloat * value
Definition: opengl_enc.c:109
AVFormatContext * ctx
Definition: movenc.c:48
if(ret< 0)
Definition: vf_mcdeint.c:279
const char * name
Definition: opengl_enc.c:103

Definition at line 741 of file cbs_av1.c.

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

Definition at line 750 of file cbs_av1.c.

Function Documentation

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

Definition at line 28 of file cbs_av1.c.

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

Definition at line 84 of file cbs_av1.c.

static int cbs_av1_read_leb128 ( CodedBitstreamContext ctx,
GetBitContext gbc,
const char *  name,
uint64_t *  write_to 
)
static

Definition at line 128 of file cbs_av1.c.

Referenced by cbs_av1_read_unit(), and cbs_av1_split_fragment().

static int cbs_av1_write_leb128 ( CodedBitstreamContext ctx,
PutBitContext pbc,
const char *  name,
uint64_t  value 
)
static

Definition at line 158 of file cbs_av1.c.

Referenced by cbs_av1_write_obu().

static int cbs_av1_read_su ( CodedBitstreamContext ctx,
GetBitContext gbc,
int  width,
const char *  name,
const int subscripts,
int32_t write_to 
)
static

Definition at line 188 of file cbs_av1.c.

static int cbs_av1_write_su ( CodedBitstreamContext ctx,
PutBitContext pbc,
int  width,
const char *  name,
const int subscripts,
int32_t  value 
)
static

Definition at line 225 of file cbs_av1.c.

static int cbs_av1_read_ns ( CodedBitstreamContext ctx,
GetBitContext gbc,
uint32_t  n,
const char *  name,
const int subscripts,
uint32_t *  write_to 
)
static

Definition at line 256 of file cbs_av1.c.

Referenced by cbs_av1_read_subexp().

static int cbs_av1_write_ns ( CodedBitstreamContext ctx,
PutBitContext pbc,
uint32_t  n,
const char *  name,
const int subscripts,
uint32_t  value 
)
static

Definition at line 306 of file cbs_av1.c.

Referenced by cbs_av1_write_subexp().

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

Definition at line 355 of file cbs_av1.c.

Referenced by cbs_av1_read_subexp().

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

Definition at line 392 of file cbs_av1.c.

Referenced by cbs_av1_write_subexp().

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

Definition at line 433 of file cbs_av1.c.

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

Definition at line 483 of file cbs_av1.c.

static int cbs_av1_tile_log2 ( int  blksize,
int  target 
)
static

Definition at line 548 of file cbs_av1.c.

Referenced by tile_group_obu(), and tile_info().

static int cbs_av1_get_relative_dist ( const AV1RawSequenceHeader seq,
unsigned int  a,
unsigned int  b 
)
static

Definition at line 555 of file cbs_av1.c.

Referenced by skip_mode_params().

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

Definition at line 769 of file cbs_av1.c.

static void cbs_av1_free_tile_data ( AV1RawTileData td)
static

Definition at line 849 of file cbs_av1.c.

Referenced by cbs_av1_free_obu().

static void cbs_av1_free_metadata ( AV1RawMetadata md)
static

Definition at line 854 of file cbs_av1.c.

Referenced by cbs_av1_free_obu().

static void cbs_av1_free_obu ( void unit,
uint8_t content 
)
static

Definition at line 863 of file cbs_av1.c.

Referenced by cbs_av1_read_unit().

static int cbs_av1_ref_tile_data ( CodedBitstreamContext ctx,
CodedBitstreamUnit unit,
GetBitContext gbc,
AV1RawTileData td 
)
static

Definition at line 885 of file cbs_av1.c.

Referenced by cbs_av1_read_unit().

static int cbs_av1_read_unit ( CodedBitstreamContext ctx,
CodedBitstreamUnit unit 
)
static

Definition at line 911 of file cbs_av1.c.

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

Definition at line 1073 of file cbs_av1.c.

Referenced by cbs_av1_write_unit().

static int cbs_av1_write_unit ( CodedBitstreamContext ctx,
CodedBitstreamUnit unit 
)
static

Definition at line 1229 of file cbs_av1.c.

static int cbs_av1_assemble_fragment ( CodedBitstreamContext ctx,
CodedBitstreamFragment frag 
)
static

Definition at line 1279 of file cbs_av1.c.

static void cbs_av1_close ( CodedBitstreamContext ctx)
static

Definition at line 1307 of file cbs_av1.c.

Variable Documentation

const CodedBitstreamType ff_cbs_type_av1
Initial value:
= {
.codec_id = AV_CODEC_ID_AV1,
.priv_data_size = sizeof(CodedBitstreamAV1Context),
.split_fragment = &cbs_av1_split_fragment,
.read_unit = &cbs_av1_read_unit,
.write_unit = &cbs_av1_write_unit,
.assemble_fragment = &cbs_av1_assemble_fragment,
.close = &cbs_av1_close,
}
static void cbs_av1_close(CodedBitstreamContext *ctx)
Definition: cbs_av1.c:1307
static int cbs_av1_read_unit(CodedBitstreamContext *ctx, CodedBitstreamUnit *unit)
Definition: cbs_av1.c:911
static int cbs_av1_assemble_fragment(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag)
Definition: cbs_av1.c:1279
static int cbs_av1_split_fragment(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag, int header)
Definition: cbs_av1.c:769
static int cbs_av1_write_unit(CodedBitstreamContext *ctx, CodedBitstreamUnit *unit)
Definition: cbs_av1.c:1229

Definition at line 1317 of file cbs_av1.c.