FFmpeg
Data Structures | Functions | Variables
wavarc.c File Reference
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.h"
#include "bytestream.h"
#include "mathops.h"
#include "unary.h"

Go to the source code of this file.

Data Structures

struct  WavArcContext
 

Functions

static av_cold int wavarc_init (AVCodecContext *avctx)
 
static unsigned get_urice (GetBitContext *gb, int k)
 
static int get_srice (GetBitContext *gb, int k)
 
static void do_stereo (WavArcContext *s, int ch, int correlated, int len)
 
static int decode_0cpy (AVCodecContext *avctx, WavArcContext *s, GetBitContext *gb)
 
static int decode_1dif (AVCodecContext *avctx, WavArcContext *s, GetBitContext *gb)
 
static int decode_2slp (AVCodecContext *avctx, WavArcContext *s, GetBitContext *gb)
 
static int ac_init (AVCodecContext *avctx, WavArcContext *s, GetBitContext *gb)
 
static uint16_t ac_get_prob (WavArcContext *s)
 
static uint8_t ac_map_symbol (WavArcContext *s, uint16_t prob)
 
static int ac_normalize (AVCodecContext *avctx, WavArcContext *s, GetBitContext *gb)
 
static void ac_init_model (WavArcContext *s)
 
static int ac_read_model (AVCodecContext *avctx, WavArcContext *s, GetBitContext *gb)
 
static int decode_5elp (AVCodecContext *avctx, WavArcContext *s, GetBitContext *gb)
 
static int wavarc_decode (AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *pkt)
 
static av_cold int wavarc_close (AVCodecContext *avctx)
 

Variables

const FFCodec ff_wavarc_decoder
 

Function Documentation

◆ wavarc_init()

static av_cold int wavarc_init ( AVCodecContext avctx)
static

Definition at line 64 of file wavarc.c.

◆ get_urice()

static unsigned get_urice ( GetBitContext gb,
int  k 
)
static

Definition at line 121 of file wavarc.c.

Referenced by decode_1dif(), decode_2slp(), decode_5elp(), and get_srice().

◆ get_srice()

static int get_srice ( GetBitContext gb,
int  k 
)
static

Definition at line 130 of file wavarc.c.

Referenced by decode_1dif(), decode_2slp(), and decode_5elp().

◆ do_stereo()

static void do_stereo ( WavArcContext s,
int  ch,
int  correlated,
int  len 
)
static

Definition at line 137 of file wavarc.c.

Referenced by decode_1dif(), decode_2slp(), and decode_5elp().

◆ decode_0cpy()

static int decode_0cpy ( AVCodecContext avctx,
WavArcContext s,
GetBitContext gb 
)
static

Definition at line 166 of file wavarc.c.

Referenced by wavarc_decode().

◆ decode_1dif()

static int decode_1dif ( AVCodecContext avctx,
WavArcContext s,
GetBitContext gb 
)
static

Definition at line 190 of file wavarc.c.

Referenced by wavarc_decode().

◆ decode_2slp()

static int decode_2slp ( AVCodecContext avctx,
WavArcContext s,
GetBitContext gb 
)
static

Definition at line 286 of file wavarc.c.

Referenced by wavarc_decode().

◆ ac_init()

static int ac_init ( AVCodecContext avctx,
WavArcContext s,
GetBitContext gb 
)
static

Definition at line 402 of file wavarc.c.

Referenced by decode_5elp().

◆ ac_get_prob()

static uint16_t ac_get_prob ( WavArcContext s)
static

Definition at line 415 of file wavarc.c.

Referenced by decode_5elp().

◆ ac_map_symbol()

static uint8_t ac_map_symbol ( WavArcContext s,
uint16_t  prob 
)
static

Definition at line 421 of file wavarc.c.

Referenced by decode_5elp().

◆ ac_normalize()

static int ac_normalize ( AVCodecContext avctx,
WavArcContext s,
GetBitContext gb 
)
static

Definition at line 434 of file wavarc.c.

Referenced by decode_5elp().

◆ ac_init_model()

static void ac_init_model ( WavArcContext s)
static

Definition at line 477 of file wavarc.c.

Referenced by ac_read_model().

◆ ac_read_model()

static int ac_read_model ( AVCodecContext avctx,
WavArcContext s,
GetBitContext gb 
)
static

Definition at line 485 of file wavarc.c.

Referenced by decode_5elp().

◆ decode_5elp()

static int decode_5elp ( AVCodecContext avctx,
WavArcContext s,
GetBitContext gb 
)
static

Definition at line 518 of file wavarc.c.

Referenced by wavarc_decode().

◆ wavarc_decode()

static int wavarc_decode ( AVCodecContext avctx,
AVFrame frame,
int got_frame_ptr,
AVPacket pkt 
)
static

Definition at line 761 of file wavarc.c.

◆ wavarc_close()

static av_cold int wavarc_close ( AVCodecContext avctx)
static

Definition at line 865 of file wavarc.c.

Variable Documentation

◆ ff_wavarc_decoder

const FFCodec ff_wavarc_decoder
Initial value:
= {
.p.name = "wavarc",
CODEC_LONG_NAME("Waveform Archiver"),
.p.type = AVMEDIA_TYPE_AUDIO,
.priv_data_size = sizeof(WavArcContext),
.close = wavarc_close,
.p.capabilities = AV_CODEC_CAP_DR1 |
AV_CODEC_CAP_SUBFRAMES |
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
}

Definition at line 875 of file wavarc.c.

AV_CODEC_ID_WAVARC
@ AV_CODEC_ID_WAVARC
Definition: codec_id.h:544
wavarc_decode
static int wavarc_decode(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *pkt)
Definition: wavarc.c:761
WavArcContext
Definition: wavarc.c:32
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:306
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:365
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_U8P
@ AV_SAMPLE_FMT_U8P
unsigned 8 bits, planar
Definition: samplefmt.h:63
AV_SAMPLE_FMT_NONE
@ AV_SAMPLE_FMT_NONE
Definition: samplefmt.h:56
AV_SAMPLE_FMT_S16P
@ AV_SAMPLE_FMT_S16P
signed 16 bits, planar
Definition: samplefmt.h:64
AVSampleFormat
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:55
wavarc_close
static av_cold int wavarc_close(AVCodecContext *avctx)
Definition: wavarc.c:865
AV_CODEC_CAP_DELAY
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
Definition: codec.h:76
wavarc_init
static av_cold int wavarc_init(AVCodecContext *avctx)
Definition: wavarc.c:64