32 int start_pos,
type, temporal_id, spatial_id;
36 &type, &temporal_id, &spatial_id);
44 obu->
data = buf + start_pos;
50 "obu_type: %d, temporal_id: %d, spatial_id: %d, payload size: %d\n",
Memory handling functions.
static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size)
int ff_av1_extract_obu(AV1OBU *obu, const uint8_t *buf, int length, void *logctx)
Extract an OBU from a raw bitstream.
void * av_realloc_array(void *ptr, size_t nmemb, size_t size)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static av_always_inline void bytestream2_skip(GetByteContext *g, unsigned int size)
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
static av_always_inline unsigned int bytestream2_get_bytes_left(GetByteContext *g)
GetBitContext gb
GetBitContext initialized to the start of the payload.
static int parse_obu_header(const uint8_t *buf, int buf_size, int64_t *obu_size, int *start_pos, int *type, int *temporal_id, int *spatial_id)
int ff_av1_packet_split(AV1Packet *pkt, const uint8_t *buf, int length, void *logctx)
Split an input packet into OBUs.
void ff_av1_packet_uninit(AV1Packet *pkt)
Free all the allocated memory in the packet.
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
int size_bits
Size, in bits, of just the data, excluding the trailing_one_bit and any trailing padding.
An input packet split into OBUs.
int raw_size
Size of entire OBU, including header.
static int get_obu_bit_length(const uint8_t *buf, int size, int type)