Libav
Data Structures | Macros | Functions | Variables
8svx.c File Reference

8svx audio decoder More...

#include "avcodec.h"
#include "internal.h"
#include "libavutil/common.h"

Go to the source code of this file.

Data Structures

struct  EightSvxContext
 decoder context More...
 

Macros

#define MAX_FRAME_SIZE   32768
 

Functions

static void delta_decode (uint8_t *dst, const uint8_t *src, int src_size, uint8_t *state, const int8_t *table)
 Delta decode the compressed values in src, and put the resulting decoded samples in dst. More...
 
static void raw_decode (uint8_t *dst, const int8_t *src, int src_size)
 
static int eightsvx_decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
 decode a frame More...
 
static av_cold int eightsvx_decode_init (AVCodecContext *avctx)
 initialize 8svx decoder More...
 
static av_cold int eightsvx_decode_close (AVCodecContext *avctx)
 

Variables

static const int8_t fibonacci [16]
 
static const int8_t exponential [16]
 
AVCodec ff_eightsvx_fib_decoder
 
AVCodec ff_eightsvx_exp_decoder
 
AVCodec ff_pcm_s8_planar_decoder
 

Detailed Description

8svx audio decoder

Author
Jaikrishnan Menon

supports: fibonacci delta encoding : exponential encoding

Definition in file 8svx.c.

Macro Definition Documentation

#define MAX_FRAME_SIZE   32768

Definition at line 52 of file 8svx.c.

Referenced by eightsvx_decode_frame(), and ff_opus_parse_packet().

Function Documentation

static void delta_decode ( uint8_t dst,
const uint8_t src,
int  src_size,
uint8_t state,
const int8_t *  table 
)
static

Delta decode the compressed values in src, and put the resulting decoded samples in dst.

Parameters
[in,out]statestarting value. it is saved for use in the next call.

Definition at line 60 of file 8svx.c.

Referenced by eightsvx_decode_frame().

static void raw_decode ( uint8_t dst,
const int8_t *  src,
int  src_size 
)
static

Definition at line 76 of file 8svx.c.

Referenced by eightsvx_decode_frame().

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

decode a frame

Definition at line 83 of file 8svx.c.

static av_cold int eightsvx_decode_init ( AVCodecContext avctx)
static

initialize 8svx decoder

Definition at line 163 of file 8svx.c.

static av_cold int eightsvx_decode_close ( AVCodecContext avctx)
static

Definition at line 189 of file 8svx.c.

Variable Documentation

const int8_t fibonacci[16]
static
Initial value:
= { -34, -21, -13, -8, -5, -3, -2, -1,
0, 1, 2, 3, 5, 8, 13, 21 }

Definition at line 47 of file 8svx.c.

Referenced by eightsvx_decode_init().

const int8_t exponential[16]
static
Initial value:
= { -128, -64, -32, -16, -8, -4, -2, -1,
0, 1, 2, 4, 8, 16, 32, 64 }

Definition at line 49 of file 8svx.c.

Referenced by eightsvx_decode_init().

AVCodec ff_eightsvx_fib_decoder
Initial value:
= {
.name = "8svx_fib",
.long_name = NULL_IF_CONFIG_SMALL("8SVX fibonacci"),
.priv_data_size = sizeof (EightSvxContext),
.capabilities = CODEC_CAP_DELAY | CODEC_CAP_DR1,
}
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
Definition: mimic.c:275
static int eightsvx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
decode a frame
Definition: 8svx.c:83
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:684
static av_cold int eightsvx_decode_close(AVCodecContext *avctx)
Definition: 8svx.c:189
#define CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
Definition: avcodec.h:713
sample_fmts
Definition: avconv_filter.c:68
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:150
unsigned 8 bits, planar
Definition: samplefmt.h:69
AVSampleFormat
Audio Sample Formats.
Definition: samplefmt.h:61
AV_SAMPLE_FMT_NONE
Definition: avconv_filter.c:68
static void close(AVCodecParserContext *s)
Definition: h264_parser.c:490
decoder context
Definition: 8svx.c:36
static av_cold int init(AVCodecParserContext *s)
Definition: h264_parser.c:499
static av_cold int eightsvx_decode_init(AVCodecContext *avctx)
initialize 8svx decoder
Definition: 8svx.c:163

Definition at line 199 of file 8svx.c.

AVCodec ff_eightsvx_exp_decoder
Initial value:
= {
.name = "8svx_exp",
.long_name = NULL_IF_CONFIG_SMALL("8SVX exponential"),
.priv_data_size = sizeof (EightSvxContext),
.capabilities = CODEC_CAP_DELAY | CODEC_CAP_DR1,
}
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
Definition: mimic.c:275
static int eightsvx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
decode a frame
Definition: 8svx.c:83
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:684
static av_cold int eightsvx_decode_close(AVCodecContext *avctx)
Definition: 8svx.c:189
#define CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
Definition: avcodec.h:713
sample_fmts
Definition: avconv_filter.c:68
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:150
unsigned 8 bits, planar
Definition: samplefmt.h:69
AVSampleFormat
Audio Sample Formats.
Definition: samplefmt.h:61
AV_SAMPLE_FMT_NONE
Definition: avconv_filter.c:68
static void close(AVCodecParserContext *s)
Definition: h264_parser.c:490
decoder context
Definition: 8svx.c:36
static av_cold int init(AVCodecParserContext *s)
Definition: h264_parser.c:499
static av_cold int eightsvx_decode_init(AVCodecContext *avctx)
initialize 8svx decoder
Definition: 8svx.c:163

Definition at line 213 of file 8svx.c.

AVCodec ff_pcm_s8_planar_decoder
Initial value:
= {
.name = "pcm_s8_planar",
.long_name = NULL_IF_CONFIG_SMALL("PCM signed 8-bit planar"),
.priv_data_size = sizeof(EightSvxContext),
.capabilities = CODEC_CAP_DELAY | CODEC_CAP_DR1,
}
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
Definition: mimic.c:275
static int eightsvx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
decode a frame
Definition: 8svx.c:83
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:684
static av_cold int eightsvx_decode_close(AVCodecContext *avctx)
Definition: 8svx.c:189
#define CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
Definition: avcodec.h:713
sample_fmts
Definition: avconv_filter.c:68
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:150
unsigned 8 bits, planar
Definition: samplefmt.h:69
AVSampleFormat
Audio Sample Formats.
Definition: samplefmt.h:61
AV_SAMPLE_FMT_NONE
Definition: avconv_filter.c:68
static void close(AVCodecParserContext *s)
Definition: h264_parser.c:490
decoder context
Definition: 8svx.c:36
static av_cold int init(AVCodecParserContext *s)
Definition: h264_parser.c:499
static av_cold int eightsvx_decode_init(AVCodecContext *avctx)
initialize 8svx decoder
Definition: 8svx.c:163

Definition at line 227 of file 8svx.c.