FFmpeg
Data Structures | Macros | Functions
av1_parse.h File Reference
#include <limits.h>
#include <stdint.h>
#include "libavutil/error.h"
#include "libavutil/intmath.h"
#include "libavutil/macros.h"
#include "av1.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...
 

Macros

#define MAX_OBU_HEADER_SIZE   (2 + 8)
 

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)
 

Macro Definition Documentation

◆ MAX_OBU_HEADER_SIZE

#define MAX_OBU_HEADER_SIZE   (2 + 8)

Definition at line 35 of file av1_parse.h.

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_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 94 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 151 of file av1_parse.h.

Referenced by ff_av1_packet_split(), and parse_sequence_header().