FFmpeg
Data Structures | Functions
av1_parse.h File Reference
#include <stdint.h>
#include "av1.h"
#include "avcodec.h"
#include "get_bits.h"

Go to the source code of this file.

Data Structures

struct  AV1OBU
 
struct  AV1Packet
 An input packet split into OBUs. More...
 

Functions

int ff_av1_extract_obu (AV1OBU *obu, const uint8_t *buf, int length, void *logctx)
 Extract an OBU from a raw bitstream. More...
 
int ff_av1_packet_split (AV1Packet *pkt, const uint8_t *buf, int length, void *logctx)
 Split an input packet into OBUs. More...
 
void ff_av1_packet_uninit (AV1Packet *pkt)
 Free all the allocated memory in the packet. More...
 
static int64_t leb128 (GetBitContext *gb)
 
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)
 
static int get_obu_bit_length (const uint8_t *buf, int size, int type)
 

Function Documentation

◆ ff_av1_extract_obu()

int ff_av1_extract_obu ( AV1OBU obu,
const uint8_t buf,
int  length,
void *  logctx 
)

Extract an OBU from a raw bitstream.

Note
This function does not copy or store any bitstream data. All the pointers in the AV1OBU structure will be valid as long as the input buffer also is.

Definition at line 29 of file av1_parse.c.

Referenced by av1_parser_split(), and ff_av1_packet_split().

◆ ff_av1_packet_split()

int ff_av1_packet_split ( AV1Packet pkt,
const uint8_t buf,
int  length,
void *  logctx 
)

Split an input packet into OBUs.

Note
This function does not copy or store any bitstream data. All the pointers in the AV1Packet structure will be valid as long as the input buffer also is.

Definition at line 56 of file av1_parse.c.

Referenced by extract_extradata_av1().

◆ ff_av1_packet_uninit()

void ff_av1_packet_uninit ( AV1Packet pkt)

Free all the allocated memory in the packet.

Definition at line 106 of file av1_parse.c.

Referenced by extract_extradata_close().

◆ leb128()

static int64_t leb128 ( GetBitContext gb)
inlinestatic

Definition at line 87 of file av1_parse.h.

Referenced by parse_obu_header().

◆ parse_obu_header()

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 
)
inlinestatic

◆ get_obu_bit_length()

static int get_obu_bit_length ( const uint8_t buf,
int  size,
int  type 
)
inlinestatic

Definition at line 144 of file av1_parse.h.

Referenced by ff_av1_packet_split(), and parse_sequence_header().