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

SBC decoder implementation. More...

#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"
#include "libavutil/channel_layout.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem_internal.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 av_cold int sbc_decode_init (AVCodecContext *avctx)
 
static int sbc_decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)
 

Variables

const FFCodec ff_sbc_decoder
 

Detailed Description

SBC decoder implementation.

Definition in file sbcdec.c.

Function Documentation

◆ sbc_unpack_frame()

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

Definition at line 63 of file sbcdec.c.

Referenced by sbc_decode_frame().

◆ sbc_synthesize_four()

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 213 of file sbcdec.c.

Referenced by sbc_synthesize_audio().

◆ sbc_synthesize_eight()

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 256 of file sbcdec.c.

Referenced by sbc_synthesize_audio().

◆ sbc_synthesize_audio()

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

Definition at line 303 of file sbcdec.c.

Referenced by sbc_decode_frame().

◆ sbc_decode_init()

static av_cold int sbc_decode_init ( AVCodecContext * avctx)
static

Definition at line 323 of file sbcdec.c.

◆ sbc_decode_frame()

static int sbc_decode_frame ( AVCodecContext * avctx,
AVFrame * frame,
int * got_frame_ptr,
AVPacket * avpkt )
static

Definition at line 339 of file sbcdec.c.

Variable Documentation

◆ ff_sbc_decoder

const FFCodec ff_sbc_decoder
Initial value:
= {
.p.name = "sbc",
CODEC_LONG_NAME("SBC (low-complexity subband codec)"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_SBC,
.priv_data_size = sizeof(SBCDecContext),
}
#define FF_CODEC_DECODE_CB(func)
#define CODEC_LONG_NAME(str)
int(* init)(AVBSFContext *ctx)
Definition dts2pts.c:608
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition codec.h:49
#define AV_CODEC_CAP_CHANNEL_CONF
Codec should fill in channel configuration and samplerate instead of container.
Definition codec.h:94
@ AV_CODEC_ID_SBC
Definition codec_id.h:540
@ AVMEDIA_TYPE_AUDIO
Definition avutil.h:201
static av_cold int sbc_decode_init(AVCodecContext *avctx)
Definition sbcdec.c:323
static int sbc_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)
Definition sbcdec.c:339

Definition at line 364 of file sbcdec.c.