FFmpeg
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_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 size_t cbs_av1_get_payload_bytes_left (GetBitContext *gbc)
 
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_padding (AV1RawPadding *pd)
 
static void cbs_av1_free_metadata (AV1RawMetadata *md)
 
static void cbs_av1_free_obu (void *opaque, 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)
if(ret)
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a it should return

Definition at line 537 of file cbs_av1.c.

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

Definition at line 543 of file cbs_av1.c.

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

Definition at line 544 of file cbs_av1.c.

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

Definition at line 545 of file cbs_av1.c.

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

Definition at line 547 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 553 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_intra(), 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(), scalability_structure(), segmentation_params(), sei_active_parameter_sets(), sei_alpha_channel_info(), sei_buffering_period(), sei_display_orientation(), sei_pan_scan_rect(), sei_pic_timestamp(), sei_pic_timing(), 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 554 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 559 of file cbs_av1.c.

Referenced by scalability_structure().

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

Definition at line 561 of file cbs_av1.c.

Referenced by add_index_entry(), amr_read_packet(), ape_tag_read_field(), apply_param_change(), asf_read_stream_properties(), asf_write_packet(), av_bprint_is_complete(), av_buffersrc_add_frame(), av_get_cpu_flags(), av_opt_query_ranges(), av_opt_set_defaults2(), av_parse_cpu_flags(), av_read_image_line2(), av_thread_message_queue_nb_elems(), av_timecode_init(), av_vdpau_bind_context(), av_write_image_line2(), avfilter_graph_queue_command(), avfilter_graph_set_auto_convert(), avi_read_idx1(), avio_check(), bidir_refine(), check(), check_keyboard_interaction(), config_output(), 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(), fbdev_read_header(), fbdev_write_header(), ff_ac3_apply_rematrixing(), ff_alsa_open(), ff_draw_init(), ff_exp2fi(), ff_get_cpu_max_align_aarch64(), ff_get_cpu_max_align_arm(), ff_get_cpu_max_align_ppc(), ff_get_cpu_max_align_x86(), ff_get_unscaled_swscale(), ff_hevc_nal_is_nonref(), 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_rint64_clip(), ff_rtsp_open_transport_ctx(), ff_vc1_b_intfi_loop_filter(), ff_vc1_i_loop_filter(), ff_vc1_p_intfr_loop_filter(), ff_vc1_p_loop_filter(), ff_videotoolbox_uninit(), ffat_init_encoder(), ffio_wfourcc(), file_move(), fileTest(), filter_frame(), find_prev_closest_index(), flush(), 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_header(), gif_read_image(), global_motion_params(), hls_read_seek(), hpel_motion_search(), hrd_parameters(), init_context_defaults(), init_noise(), init_stream(), 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(), is_newline(), 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(), mmf_read_packet(), 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(), opencl_map_frame(), opencl_mem_flags_for_mapping(), opt_cpuflags(), parse_MP4SLDescrTag(), parse_opus_ts_header(), parse_pcr(), parse_pixel_format(), plot_spectrum_column(), 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(), request_frame(), rm_read_dts(), rm_read_header(), rm_read_packet(), rtp_parse_one_packet(), rtp_parse_packet_internal(), rv10_write_header(), scalability_structure(), scaling_list_data(), sdl2_write_header(), sdr2_read_packet(), segmentation_params(), sei_pic_timing(), sei_time_code(), selfTest(), sequence_header_obu(), seqvideo_decode(), set_spdif(), show_help_default(), slice_segment_header(), split_radix_permutation(), sps(), st_ref_pic_set(), sub_layer_hrd_parameters(), swf_write_trailer(), sws_alloc_set_opts(), sws_getCachedContext(), sws_init_context(), swscale(), thread_get_buffer_internal(), thread_main(), txd_decode_frame(), uninit(), url_alloc_for_protocol(), vaapi_map_frame(), vaapi_map_to_memory(), validate_avframe_allocation(), vdpau_transfer_data_to(), 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 563 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)
GLsizei GLboolean const GLfloat * value
Definition: opengl_enc.c:108
#define width
#define xf(width, name, var, range_min, range_max, subs,...)
Definition: cbs_av1.c:664
#define av_unused
Definition: attributes.h:125
const char * name
Definition: opengl_enc.c:102

Definition at line 566 of file cbs_av1.c.

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

#define READ

Definition at line 572 of file cbs_av1.c.

#define READWRITE   read

Definition at line 661 of file cbs_av1.c.

#define RWContext   GetBitContext

Definition at line 662 of file cbs_av1.c.

#define xf (   width,
  name,
  var,
  range_min,
  range_max,
  subs,
  ... 
)
Value:
do { \
uint32_t value; \
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:429
GLsizei GLboolean const GLfloat * value
Definition: opengl_enc.c:108
#define width
AVFormatContext * ctx
Definition: movenc.c:48
#define SUBSCRIPTS(subs,...)
Definition: cbs_av1.c:547
#define CHECK(call)
Definition: cbs_av1.c:537
const char * name
Definition: opengl_enc.c:102

Definition at line 664 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_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(), getstr8(), h261_probe(), inverse_quant(), metadata_itut_t35(), modplug_read_packet(), mov_write_d263_tag(), mpegps_read_pes_header(), nvenc_load_libraries(), padding_obu(), 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)
GLsizei GLboolean const GLfloat * value
Definition: opengl_enc.c:108
#define MAX_INT_BITS(length)
Definition: cbs_internal.h:100
int ff_cbs_read_signed(CodedBitstreamContext *ctx, GetBitContext *gbc, int width, const char *name, const int *subscripts, int32_t *write_to, int32_t range_min, int32_t range_max)
Definition: cbs.c:508
#define width
int32_t
AVFormatContext * ctx
Definition: movenc.c:48
#define MIN_INT_BITS(length)
Definition: cbs_internal.h:104
#define SUBSCRIPTS(subs,...)
Definition: cbs_av1.c:547
#define CHECK(call)
Definition: cbs_av1.c:537
const char * name
Definition: opengl_enc.c:102

Definition at line 670 of file cbs_av1.c.

#define uvlc (   name,
  range_min,
  range_max 
)
Value:
do { \
uint32_t value; \
&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:108
AVFormatContext * ctx
Definition: movenc.c:48
#define CHECK(call)
Definition: cbs_av1.c:537
const char * name
Definition: opengl_enc.c:102

Definition at line 677 of file cbs_av1.c.

Referenced by timing_info().

#define ns (   max_value,
  name,
  subs,
  ... 
)
Value:
do { \
uint32_t value; \
CHECK(cbs_av1_read_ns(ctx, rw, max_value, #name, \
SUBSCRIPTS(subs, __VA_ARGS__), &value)); \
current->name = value; \
} while (0)
GLsizei GLboolean const GLfloat * value
Definition: opengl_enc.c:108
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:210
AVFormatContext * ctx
Definition: movenc.c:48
#define SUBSCRIPTS(subs,...)
Definition: cbs_av1.c:547
#define CHECK(call)
Definition: cbs_av1.c:537
const char * name
Definition: opengl_enc.c:102

Definition at line 682 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; \
current->name = value; \
} while (0)
GLsizei GLboolean const GLfloat * value
Definition: opengl_enc.c:108
#define max(a, b)
Definition: cuda_runtime.h:33
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:309
float min
#define CHECK(call)
Definition: cbs_av1.c:537
const char * name
Definition: opengl_enc.c:102

Definition at line 688 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; \
SUBSCRIPTS(subs, __VA_ARGS__), &value)); \
current->name = value; \
} while (0)
GLsizei GLboolean const GLfloat * value
Definition: opengl_enc.c:108
#define max(a, b)
Definition: cuda_runtime.h:33
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:387
AVFormatContext * ctx
Definition: movenc.c:48
#define SUBSCRIPTS(subs,...)
Definition: cbs_av1.c:547
#define CHECK(call)
Definition: cbs_av1.c:537
const char * name
Definition: opengl_enc.c:102

Definition at line 693 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:670
uint8_t
if(ret)
#define delta_q(name)
Definition: cbs_av1.c:699
#define xf(width, name, var, range_min, range_max, subs,...)
Definition: cbs_av1.c:664
const char * name
Definition: opengl_enc.c:102

Definition at line 699 of file cbs_av1.c.

Referenced by quantization_params().

#define leb128 (   name)
Value:
do { \
uint64_t value; \
CHECK(cbs_av1_read_leb128(ctx, rw, #name, &value)); \
current->name = value; \
} while (0)
GLsizei GLboolean const GLfloat * value
Definition: opengl_enc.c:108
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:150
#define CHECK(call)
Definition: cbs_av1.c:537
const char * name
Definition: opengl_enc.c:102

Definition at line 705 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 718 of file cbs_av1.c.

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

#define WRITE

Definition at line 660 of file cbs_av1.c.

#define READWRITE   write

Definition at line 661 of file cbs_av1.c.

#define RWContext   PutBitContext

Definition at line 662 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:472
#define width
AVFormatContext * ctx
Definition: movenc.c:48
#define SUBSCRIPTS(subs,...)
Definition: cbs_av1.c:547
#define CHECK(call)
Definition: cbs_av1.c:537
const char * name
Definition: opengl_enc.c:102

Definition at line 664 of file cbs_av1.c.

#define xsu (   width,
  name,
  var,
  subs,
  ... 
)
Value:
do { \
SUBSCRIPTS(subs, __VA_ARGS__), var, \
} while (0)
#define MAX_INT_BITS(length)
Definition: cbs_internal.h:100
int ff_cbs_write_signed(CodedBitstreamContext *ctx, PutBitContext *pbc, int width, const char *name, const int *subscripts, int32_t value, int32_t range_min, int32_t range_max)
Definition: cbs.c:551
#define width
AVFormatContext * ctx
Definition: movenc.c:48
#define MIN_INT_BITS(length)
Definition: cbs_internal.h:104
#define SUBSCRIPTS(subs,...)
Definition: cbs_av1.c:547
#define CHECK(call)
Definition: cbs_av1.c:537
const char * name
Definition: opengl_enc.c:102

Definition at line 670 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:106
AVFormatContext * ctx
Definition: movenc.c:48
#define CHECK(call)
Definition: cbs_av1.c:537
const char * name
Definition: opengl_enc.c:102

Definition at line 677 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:260
#define SUBSCRIPTS(subs,...)
Definition: cbs_av1.c:547
#define CHECK(call)
Definition: cbs_av1.c:537
const char * name
Definition: opengl_enc.c:102

Definition at line 682 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:346
#define max(a, b)
Definition: cuda_runtime.h:33
AVFormatContext * ctx
Definition: movenc.c:48
float min
#define CHECK(call)
Definition: cbs_av1.c:537
const char * name
Definition: opengl_enc.c:102

Definition at line 688 of file cbs_av1.c.

#define subexp (   name,
  max,
  subs,
  ... 
)
Value:
do { \
SUBSCRIPTS(subs, __VA_ARGS__), \
current->name)); \
} while (0)
#define max(a, b)
Definition: cuda_runtime.h:33
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:437
#define SUBSCRIPTS(subs,...)
Definition: cbs_av1.c:547
#define CHECK(call)
Definition: cbs_av1.c:537
const char * name
Definition: opengl_enc.c:102

Definition at line 693 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:670
if(ret)
#define xf(width, name, var, range_min, range_max, subs,...)
Definition: cbs_av1.c:664
const char * name
Definition: opengl_enc.c:102

Definition at line 699 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:180
AVFormatContext * ctx
Definition: movenc.c:48
#define CHECK(call)
Definition: cbs_av1.c:537
const char * name
Definition: opengl_enc.c:102

Definition at line 705 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
GLsizei GLboolean const GLfloat * value
Definition: opengl_enc.c:108
#define av_log(a,...)
AVFormatContext * ctx
Definition: movenc.c:48
if(ret)
const char * name
Definition: opengl_enc.c:102

Definition at line 709 of file cbs_av1.c.

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

Definition at line 718 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 106 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 150 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 180 of file cbs_av1.c.

Referenced by cbs_av1_write_obu().

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 210 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 260 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 309 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 346 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 387 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 437 of file cbs_av1.c.

static int cbs_av1_tile_log2 ( int  blksize,
int  target 
)
static

Definition at line 502 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 509 of file cbs_av1.c.

Referenced by skip_mode_params().

static size_t cbs_av1_get_payload_bytes_left ( GetBitContext gbc)
static

Definition at line 521 of file cbs_av1.c.

Referenced by metadata_itut_t35(), and padding_obu().

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

Definition at line 737 of file cbs_av1.c.

static void cbs_av1_free_tile_data ( AV1RawTileData td)
static

Definition at line 813 of file cbs_av1.c.

Referenced by cbs_av1_free_obu().

static void cbs_av1_free_padding ( AV1RawPadding pd)
static

Definition at line 818 of file cbs_av1.c.

Referenced by cbs_av1_free_obu().

static void cbs_av1_free_metadata ( AV1RawMetadata md)
static

Definition at line 823 of file cbs_av1.c.

Referenced by cbs_av1_free_obu().

static void cbs_av1_free_obu ( void opaque,
uint8_t content 
)
static

Definition at line 832 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 857 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 883 of file cbs_av1.c.

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

Definition at line 1055 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 1217 of file cbs_av1.c.

static int cbs_av1_assemble_fragment ( CodedBitstreamContext ctx,
CodedBitstreamFragment frag 
)
static

Definition at line 1267 of file cbs_av1.c.

static void cbs_av1_close ( CodedBitstreamContext ctx)
static

Definition at line 1295 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:1295
static int cbs_av1_read_unit(CodedBitstreamContext *ctx, CodedBitstreamUnit *unit)
Definition: cbs_av1.c:883
static int cbs_av1_assemble_fragment(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag)
Definition: cbs_av1.c:1267
static int cbs_av1_split_fragment(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag, int header)
Definition: cbs_av1.c:737
static int cbs_av1_write_unit(CodedBitstreamContext *ctx, CodedBitstreamUnit *unit)
Definition: cbs_av1.c:1217

Definition at line 1305 of file cbs_av1.c.