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"
#include "leb.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 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)
 
AVRational ff_av1_framerate (int64_t ticks_per_frame, int64_t units_per_tick, int64_t time_scale)
 

Macro Definition Documentation

◆ MAX_OBU_HEADER_SIZE

#define MAX_OBU_HEADER_SIZE   (2 + 8)

Definition at line 36 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 104 of file av1_parse.c.

Referenced by extract_extradata_close().

◆ 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 136 of file av1_parse.h.

Referenced by ff_av1_packet_split(), and parse_sequence_header().

◆ ff_av1_framerate()

AVRational ff_av1_framerate ( int64_t  ticks_per_frame,
int64_t  units_per_tick,
int64_t  time_scale 
)

Definition at line 110 of file av1_parse.c.

Referenced by av1_parser_parse(), libdav1d_init_params(), and set_context_with_sequence().