FFmpeg
Data Structures | Functions | Variables
fastaudio.c File Reference
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "internal.h"
#include "mathops.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 43 of file fastaudio.c.

◆ read_bits()

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

Definition at line 89 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 103 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 108 of file fastaudio.c.

◆ fastaudio_close()

static av_cold int fastaudio_close ( AVCodecContext avctx)
static

Definition at line 181 of file fastaudio.c.

Variable Documentation

◆ bits

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

Definition at line 101 of file fastaudio.c.

Referenced by fastaudio_decode(), and read_bits().

◆ ff_fastaudio_decoder

const FFCodec ff_fastaudio_decoder
Initial value:
= {
.p.name = "fastaudio",
.p.long_name = NULL_IF_CONFIG_SMALL("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,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}

Definition at line 190 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:181
AV_CODEC_ID_FASTAUDIO
@ AV_CODEC_ID_FASTAUDIO
Definition: codec_id.h:519
FastAudioContext
Definition: fastaudio.c:37
init
static int init
Definition: av_tx.c:47
fastaudio_init
static av_cold int fastaudio_init(AVCodecContext *avctx)
Definition: fastaudio.c:43
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:254
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
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
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
AV_SAMPLE_FMT_NONE
@ AV_SAMPLE_FMT_NONE
Definition: samplefmt.h:56
AVSampleFormat
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:55
FF_CODEC_CAP_INIT_THREADSAFE
#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: codec_internal.h:31
fastaudio_decode
static int fastaudio_decode(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *pkt)
Definition: fastaudio.c:108