Go to the source code of this file.
 | 
| #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  | 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  | fb(width,  name) | 
|   | 
| #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  | fb(width,  name) | 
|   | 
| #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) | 
|   | 
| #define  | OFFSET(x)   offsetof(CodedBitstreamAV1Context, x) | 
|   | 
 | 
| 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, int fixed_length) | 
|   | 
| 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 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_assemble_fragment (CodedBitstreamContext *ctx, CodedBitstreamFragment *frag) | 
|   | 
| static void  | cbs_av1_flush (CodedBitstreamContext *ctx) | 
|   | 
| static void  | cbs_av1_close (CodedBitstreamContext *ctx) | 
|   | 
| static void  | cbs_av1_free_metadata (FFRefStructOpaque unused, void *content) | 
|   | 
◆ HEADER
◆ CHECK
Value:        do { \
        err = (call); \
        if (err < 0) \
            return err; \
    } while (0)
 
Definition at line 452 of file cbs_av1.c.
 
 
◆ FUNC_NAME
      
        
          | #define FUNC_NAME | 
          ( | 
            | 
          rw,  | 
        
        
           | 
           | 
            | 
          codec,  | 
        
        
           | 
           | 
            | 
          name  | 
        
        
           | 
          ) | 
           |    cbs_ ## codec ## _ ## rw ## _ ## name | 
        
      
 
 
◆ FUNC_AV1
◆ FUNC
◆ SUBSCRIPTS
      
        
          | #define SUBSCRIPTS | 
          ( | 
            | 
          subs,  | 
        
        
           | 
           | 
            | 
          ...  | 
        
        
           | 
          ) | 
           |    (subs > 0 ? ((int[subs + 1]){ subs, __VA_ARGS__ }) : NULL) | 
        
      
 
 
◆ fc
◆ flag
◆ su
◆ fbs
◆ fcs
      
        
          | #define fcs | 
          ( | 
            | 
          width,  | 
        
        
           | 
           | 
            | 
          name,  | 
        
        
           | 
           | 
            | 
          range_min,  | 
        
        
           | 
           | 
            | 
          range_max,  | 
        
        
           | 
           | 
            | 
          subs,  | 
        
        
           | 
           | 
            | 
          ...  | 
        
        
           | 
          ) | 
           |    xf(width, name, current->name, range_min, range_max, subs, __VA_ARGS__) | 
        
      
 
 
◆ flags
      
        
          | #define flags | 
          ( | 
            | 
          name,  | 
        
        
           | 
           | 
            | 
          subs,  | 
        
        
           | 
           | 
            | 
          ...  | 
        
        
           | 
          ) | 
           |    xf(1, name, current->name, 0, 1, subs, __VA_ARGS__) | 
        
      
 
 
◆ sus
◆ fixed
Value:        do { \
        av_unused uint32_t fixed_value = 
value; \
 
    } while (0)
 
Definition at line 479 of file cbs_av1.c.
 
 
◆ READ
◆ READWRITE [1/2]
◆ RWContext [1/2]
◆ fb [1/2]
◆ xf [1/2]
      
        
          | #define xf | 
          ( | 
            | 
          width,  | 
        
        
           | 
           | 
            | 
          name,  | 
        
        
           | 
           | 
            | 
          var,  | 
        
        
           | 
           | 
            | 
          range_min,  | 
        
        
           | 
           | 
            | 
          range_max,  | 
        
        
           | 
           | 
            | 
          subs,  | 
        
        
           | 
           | 
            | 
          ...  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Value:        do { \
                                   &
value, range_min, range_max)); \
 
    } while (0)
 
Definition at line 590 of file cbs_av1.c.
 
 
◆ xsu [1/2]
◆ uvlc [1/2]
      
        
          | #define uvlc | 
          ( | 
            | 
          name,  | 
        
        
           | 
           | 
            | 
          range_min,  | 
        
        
           | 
           | 
            | 
          range_max  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Value:        do { \
                                &
value, range_min, range_max)); \
 
    } while (0)
 
Definition at line 603 of file cbs_av1.c.
 
 
◆ ns [1/2]
      
        
          | #define ns | 
          ( | 
            | 
          max_value,  | 
        
        
           | 
           | 
            | 
          name,  | 
        
        
           | 
           | 
            | 
          subs,  | 
        
        
           | 
           | 
            | 
          ...  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
◆ increment [1/2]
◆ subexp [1/2]
      
        
          | #define subexp | 
          ( | 
            | 
          name,  | 
        
        
           | 
           | 
            | 
          max,  | 
        
        
           | 
           | 
            | 
          subs,  | 
        
        
           | 
           | 
            | 
          ...  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
◆ delta_q [1/2]
Value:        do { \
        uint8_t delta_coded; \
        xf(1, 
name.delta_coded, delta_coded, 0, 1, 0, ); \
 
        if (delta_coded) \
        else \
            delta_q = 0; \
    } while (0)
 
Definition at line 625 of file cbs_av1.c.
 
 
◆ leb128 [1/2]
◆ infer [1/2]
◆ byte_alignment [1/2]
◆ WRITE
◆ READWRITE [2/2]
◆ RWContext [2/2]
◆ fb [2/2]
Value:        do { \
                                           current->name)); \
    } while (0)
 
Definition at line 585 of file cbs_av1.c.
 
 
◆ xf [2/2]
      
        
          | #define xf | 
          ( | 
            | 
          width,  | 
        
        
           | 
           | 
            | 
          name,  | 
        
        
           | 
           | 
            | 
          var,  | 
        
        
           | 
           | 
            | 
          range_min,  | 
        
        
           | 
           | 
            | 
          range_max,  | 
        
        
           | 
           | 
            | 
          subs,  | 
        
        
           | 
           | 
            | 
          ...  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Value:        do { \
                                    var, range_min, range_max)); \
    } while (0)
 
Definition at line 590 of file cbs_av1.c.
 
 
◆ xsu [2/2]
◆ uvlc [2/2]
      
        
          | #define uvlc | 
          ( | 
            | 
          name,  | 
        
        
           | 
           | 
            | 
          range_min,  | 
        
        
           | 
           | 
            | 
          range_max  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Value:        do { \
                                 range_min, range_max)); \
    } while (0)
 
Definition at line 603 of file cbs_av1.c.
 
 
◆ ns [2/2]
      
        
          | #define ns | 
          ( | 
            | 
          max_value,  | 
        
        
           | 
           | 
            | 
          name,  | 
        
        
           | 
           | 
            | 
          subs,  | 
        
        
           | 
           | 
            | 
          ...  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Value:        do { \
                               current->name)); \
    } while (0)
 
Definition at line 608 of file cbs_av1.c.
 
 
◆ increment [2/2]
Value:        do { \
                                      current->name)); \
    } while (0)
 
Definition at line 614 of file cbs_av1.c.
 
 
◆ subexp [2/2]
      
        
          | #define subexp | 
          ( | 
            | 
          name,  | 
        
        
           | 
           | 
            | 
          max,  | 
        
        
           | 
           | 
            | 
          subs,  | 
        
        
           | 
           | 
            | 
          ...  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Value:        do { \
                                   current->name)); \
    } while (0)
 
Definition at line 619 of file cbs_av1.c.
 
 
◆ delta_q [2/2]
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)
 
Definition at line 625 of file cbs_av1.c.
 
 
◆ leb128 [2/2]
◆ infer [2/2]
Value:        do { \
        if (current->name != (
value)) { \
 
                   "%s does not match inferred value: " \
                   "%"PRId64", but should be %"PRId64".\n", \
                   #
name, (int64_t)current->name, (int64_t)(
value)); \
 
        } \
    } while (0)
 
Definition at line 635 of file cbs_av1.c.
 
 
◆ byte_alignment [2/2]
◆ OFFSET
◆ cbs_av1_read_uvlc()
◆ cbs_av1_write_uvlc()
◆ cbs_av1_read_leb128()
◆ cbs_av1_write_leb128()
◆ cbs_av1_read_ns()
◆ cbs_av1_write_ns()
◆ cbs_av1_read_increment()
◆ cbs_av1_write_increment()
◆ cbs_av1_read_subexp()
◆ cbs_av1_write_subexp()
◆ cbs_av1_tile_log2()
  
  
      
        
          | static int cbs_av1_tile_log2  | 
          ( | 
          int  | 
          blksize,  | 
         
        
           | 
           | 
          int  | 
          target  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
 
◆ cbs_av1_get_relative_dist()
◆ cbs_av1_get_payload_bytes_left()
  
  
      
        
          | static size_t cbs_av1_get_payload_bytes_left  | 
          ( | 
          GetBitContext *  | 
          gbc | ) | 
           | 
         
       
   | 
  
static   | 
  
 
 
◆ cbs_av1_split_fragment()
◆ cbs_av1_ref_tile_data()
◆ cbs_av1_read_unit()
◆ cbs_av1_write_obu()
◆ cbs_av1_assemble_fragment()
◆ cbs_av1_flush()
◆ cbs_av1_close()
◆ cbs_av1_free_metadata()
◆ cbs_av1_unit_types
◆ cbs_av1_options
Initial value:= {
    { "operating_point",  "Set operating point to select layers to parse from a scalable bitstream",
    { "fixed_obu_size_length", "Set fixed length of the obu_size field",
}
 
Definition at line 1270 of file cbs_av1.c.
 
 
◆ cbs_av1_class
Initial value:= {
    .class_name = "cbs_av1",
}
 
Definition at line 1278 of file cbs_av1.c.
 
 
◆ ff_cbs_type_av1
 
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
 
#define CBS_UNIT_TYPE_COMPLEX(type, structure, free_func)
 
@ AV1_OBU_REDUNDANT_FRAME_HEADER
 
static const AVClass cbs_av1_class
 
static const CodedBitstreamUnitTypeDescriptor cbs_av1_unit_types[]
 
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_increment(CodedBitstreamContext *ctx, GetBitContext *gbc, uint32_t range_min, uint32_t range_max, const char *name, uint32_t *write_to)
 
#define MAX_INT_BITS(length)
 
static int cbs_av1_read_leb128(CodedBitstreamContext *ctx, GetBitContext *gbc, const char *name, uint64_t *write_to)
 
static int cbs_av1_read_ns(CodedBitstreamContext *ctx, GetBitContext *gbc, uint32_t n, const char *name, const int *subscripts, uint32_t *write_to)
 
@ AV1_OBU_TEMPORAL_DELIMITER
 
static int cbs_av1_read_subexp(CodedBitstreamContext *ctx, GetBitContext *gbc, uint32_t range_max, const char *name, const int *subscripts, uint32_t *write_to)
 
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)
 
#define CBS_UNIT_TYPE_INTERNAL_REF(type, structure, ref_field)
 
static void cbs_av1_close(CodedBitstreamContext *ctx)
 
@ AV1_MAX_OPERATING_POINTS
 
static int cbs_av1_write_obu(CodedBitstreamContext *ctx, CodedBitstreamUnit *unit, PutBitContext *pbc)
 
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
 
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 void cbs_av1_free_metadata(FFRefStructOpaque unused, void *content)
 
static int cbs_av1_split_fragment(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag, int header)
 
static int cbs_av1_write_uvlc(CodedBitstreamContext *ctx, PutBitContext *pbc, const char *name, uint32_t value, uint32_t range_min, uint32_t range_max)
 
#define LIBAVUTIL_VERSION_INT
 
static int cbs_av1_read_unit(CodedBitstreamContext *ctx, CodedBitstreamUnit *unit)
 
static const AVOption cbs_av1_options[]
 
const char * av_default_item_name(void *ptr)
Return the context name.
 
static int cbs_av1_write_subexp(CodedBitstreamContext *ctx, PutBitContext *pbc, uint32_t range_max, const char *name, const int *subscripts, uint32_t value)
 
int ff_cbs_read_simple_unsigned(CodedBitstreamContext *ctx, GetBitContext *gbc, int width, const char *name, uint32_t *write_to)
 
static void cbs_av1_flush(CodedBitstreamContext *ctx)
 
@ AV1_OBU_SEQUENCE_HEADER
 
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)
 
#define CBS_UNIT_TYPE_POD(type_, structure)
 
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)
 
static int cbs_av1_assemble_fragment(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag)
 
static int cbs_av1_write_leb128(CodedBitstreamContext *ctx, PutBitContext *pbc, const char *name, uint64_t value, int fixed_length)
 
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default value
 
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)
 
AV1RawTileGroup tile_group
 
#define CBS_UNIT_TYPE_END_OF_LIST
 
#define SUBSCRIPTS(subs,...)
 
int ff_cbs_write_simple_unsigned(CodedBitstreamContext *ctx, PutBitContext *pbc, int width, const char *name, uint32_t value)
 
#define MIN_INT_BITS(length)
 
void(* flush)(AVBSFContext *ctx)
 
AV1RawTileGroup tile_group
 
static int cbs_av1_write_ns(CodedBitstreamContext *ctx, PutBitContext *pbc, uint32_t n, const char *name, const int *subscripts, uint32_t value)
 
#define AVERROR_INVALIDDATA
Invalid data found when processing input.