FFmpeg
Data Structures | Functions | Variables
fastaudio.c File Reference
#include "libavutil/mem.h"
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"

Go to the source code of this file.

Data Structures

struct  ChannelItems
 
struct  FastAudioContext
 

Functions

static av_cold int fastaudio_init (AVCodecContext *avctx)
 
static int read_bits (int bits, int *ppos, unsigned *src)
 
static void set_sample (int i, int j, int v, float *result, int *pads, float value)
 
static int fastaudio_decode (AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *pkt)
 
static av_cold int fastaudio_close (AVCodecContext *avctx)
 

Variables

static const uint8_t bits [8] = { 6, 6, 5, 5, 4, 0, 3, 3, }
 
const FFCodec ff_fastaudio_decoder
 

Function Documentation

◆ fastaudio_init()

static av_cold int fastaudio_init ( AVCodecContext avctx)
static

Definition at line 41 of file fastaudio.c.

◆ read_bits()

static int read_bits ( int  bits,
int *  ppos,
unsigned *  src 
)
static

Definition at line 87 of file fastaudio.c.

Referenced by fastaudio_decode().

◆ set_sample()

static void set_sample ( int  i,
int  j,
int  v,
float result,
int *  pads,
float  value 
)
static

Definition at line 101 of file fastaudio.c.

Referenced by fastaudio_decode().

◆ fastaudio_decode()

static int fastaudio_decode ( AVCodecContext avctx,
AVFrame frame,
int *  got_frame,
AVPacket pkt 
)
static

Definition at line 106 of file fastaudio.c.

◆ fastaudio_close()

static av_cold int fastaudio_close ( AVCodecContext avctx)
static

Definition at line 179 of file fastaudio.c.

Variable Documentation

◆ bits

const uint8_t bits[8] = { 6, 6, 5, 5, 4, 0, 3, 3, }
static

Definition at line 99 of file fastaudio.c.

Referenced by fastaudio_decode(), and read_bits().

◆ ff_fastaudio_decoder

const FFCodec ff_fastaudio_decoder
Initial value:
= {
.p.name = "fastaudio",
CODEC_LONG_NAME("MobiClip FastAudio"),
.p.type = AVMEDIA_TYPE_AUDIO,
.priv_data_size = sizeof(FastAudioContext),
.close = fastaudio_close,
.p.capabilities = AV_CODEC_CAP_DR1,
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
}

Definition at line 188 of file fastaudio.c.

AV_SAMPLE_FMT_FLTP
@ AV_SAMPLE_FMT_FLTP
float, planar
Definition: samplefmt.h:66
fastaudio_close
static av_cold int fastaudio_close(AVCodecContext *avctx)
Definition: fastaudio.c:179
AV_CODEC_ID_FASTAUDIO
@ AV_CODEC_ID_FASTAUDIO
Definition: codec_id.h:540
FastAudioContext
Definition: fastaudio.c:35
fastaudio_init
static av_cold int fastaudio_init(AVCodecContext *avctx)
Definition: fastaudio.c:41
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:311
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:296
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:368
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:52
AV_SAMPLE_FMT_NONE
@ AV_SAMPLE_FMT_NONE
Definition: samplefmt.h:56
AVSampleFormat
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:55
fastaudio_decode
static int fastaudio_decode(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *pkt)
Definition: fastaudio.c:106