FFmpeg
Loading...
Searching...
No Matches
parse.c File Reference

Opus decoder/parser shared code. More...

#include "libavutil/attributes.h"
#include "libavutil/channel_layout.h"
#include "libavutil/error.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/log.h"
#include "libavutil/mem.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/internal.h"
#include "libavcodec/mathops.h"
#include "libavcodec/vorbis_data.h"
#include "opus.h"
#include "parse.h"
#include "tab.h"

Go to the source code of this file.

Functions

static int xiph_lacing_16bit (const uint8_t **ptr, const uint8_t *end)
 Read a 1- or 2-byte frame length.
 
static int xiph_lacing_full (const uint8_t **ptr, const uint8_t *end)
 Read a multi-byte length (used for code 3 packet padding size)
 
int ff_opus_parse_packet (OpusPacket *pkt, const uint8_t *buf, int buf_size, int self_delimiting)
 Parse Opus packet info from raw packet data.
 
static int channel_reorder_vorbis (int nb_channels, int channel_idx)
 
static int channel_reorder_unknown (int nb_channels, int channel_idx)
 
av_cold int ff_opus_parse_extradata (AVCodecContext *avctx, OpusParseContext *s)
 

Detailed Description

Opus decoder/parser shared code.

Definition in file parse.c.

Function Documentation

◆ xiph_lacing_16bit()

static int xiph_lacing_16bit ( const uint8_t ** ptr,
const uint8_t * end )
inlinestatic

Read a 1- or 2-byte frame length.

Definition at line 46 of file parse.c.

Referenced by ff_opus_parse_packet().

◆ xiph_lacing_full()

static int xiph_lacing_full ( const uint8_t ** ptr,
const uint8_t * end )
inlinestatic

Read a multi-byte length (used for code 3 packet padding size)

Definition at line 64 of file parse.c.

Referenced by ff_opus_parse_packet().

◆ ff_opus_parse_packet()

int ff_opus_parse_packet ( OpusPacket * pkt,
const uint8_t * buf,
int buf_size,
int self_delimiting )

Parse Opus packet info from raw packet data.

Definition at line 85 of file parse.c.

Referenced by opus_decode_packet(), and set_frame_duration().

◆ channel_reorder_vorbis()

static int channel_reorder_vorbis ( int nb_channels,
int channel_idx )
static

Definition at line 276 of file parse.c.

Referenced by ff_opus_parse_extradata().

◆ channel_reorder_unknown()

static int channel_reorder_unknown ( int nb_channels,
int channel_idx )
static

Definition at line 281 of file parse.c.

Referenced by ff_opus_parse_extradata().

◆ ff_opus_parse_extradata()

av_cold int ff_opus_parse_extradata ( AVCodecContext * avctx,
OpusParseContext * s )

Definition at line 286 of file parse.c.

Referenced by opus_decode_init(), and opus_parse().