FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions | Variables
sbcdec.c File Reference

SBC decoder implementation. More...

#include <stdbool.h>
#include "avcodec.h"
#include "internal.h"
#include "libavutil/intreadwrite.h"
#include "sbc.h"
#include "sbcdec_data.h"

Go to the source code of this file.

Data Structures

struct  sbc_decoder_state
 
struct  SBCDecContext
 

Functions

static int sbc_unpack_frame (const uint8_t *data, struct sbc_frame *frame, size_t len)
 
static void sbc_synthesize_four (struct sbc_decoder_state *state, struct sbc_frame *frame, int ch, int blk, AVFrame *output_frame)
 
static void sbc_synthesize_eight (struct sbc_decoder_state *state, struct sbc_frame *frame, int ch, int blk, AVFrame *output_frame)
 
static void sbc_synthesize_audio (struct sbc_decoder_state *state, struct sbc_frame *frame, AVFrame *output_frame)
 
static int sbc_decode_init (AVCodecContext *avctx)
 
static int sbc_decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
 

Variables

AVCodec ff_sbc_decoder
 

Detailed Description

SBC decoder implementation.

Definition in file sbcdec.c.

Function Documentation

static int sbc_unpack_frame ( const uint8_t data,
struct sbc_frame frame,
size_t  len 
)
static

Definition at line 62 of file sbcdec.c.

Referenced by sbc_decode_frame().

static void sbc_synthesize_four ( struct sbc_decoder_state state,
struct sbc_frame frame,
int  ch,
int  blk,
AVFrame output_frame 
)
inlinestatic

Definition at line 212 of file sbcdec.c.

Referenced by sbc_synthesize_audio().

static void sbc_synthesize_eight ( struct sbc_decoder_state state,
struct sbc_frame frame,
int  ch,
int  blk,
AVFrame output_frame 
)
inlinestatic

Definition at line 255 of file sbcdec.c.

Referenced by sbc_synthesize_audio().

static void sbc_synthesize_audio ( struct sbc_decoder_state state,
struct sbc_frame frame,
AVFrame output_frame 
)
static

Definition at line 302 of file sbcdec.c.

Referenced by sbc_decode_frame().

static int sbc_decode_init ( AVCodecContext avctx)
static

Definition at line 322 of file sbcdec.c.

static int sbc_decode_frame ( AVCodecContext avctx,
void data,
int got_frame_ptr,
AVPacket avpkt 
)
static

Definition at line 336 of file sbcdec.c.

Variable Documentation

AVCodec ff_sbc_decoder
Initial value:
= {
.name = "sbc",
.long_name = NULL_IF_CONFIG_SMALL("SBC (low-complexity subband codec)"),
.priv_data_size = sizeof(SBCDecContext),
.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO,
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
.supported_samplerates = (const int[]) { 16000, 32000, 44100, 48000, 0 },
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
#define AV_CH_LAYOUT_STEREO
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:42
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
Definition: internal.h:40
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static int sbc_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
Definition: sbcdec.c:336
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:58
static int sbc_decode_init(AVCodecContext *avctx)
Definition: sbcdec.c:322
static const uint16_t channel_layouts[7]
Definition: dca_lbr.c:113
signed 16 bits, planar
Definition: samplefmt.h:67
#define AV_CH_LAYOUT_MONO
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:968

Definition at line 364 of file sbcdec.c.