FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
ralf.c File Reference

This is a decoder for Real Audio Lossless format. More...

#include "libavutil/attributes.h"
#include "libavutil/channel_layout.h"
#include "avcodec.h"
#include "get_bits.h"
#include "golomb.h"
#include "internal.h"
#include "unary.h"
#include "ralfdata.h"

Go to the source code of this file.

Data Structures

struct  VLCSet
 
struct  RALFContext
 

Macros

#define FILTER_NONE   0
 
#define FILTER_RAW   642
 
#define RALF_MAX_PKT_SIZE   8192
 
#define MAX_ELEMS   644
 

Functions

static av_cold int init_ralf_vlc (VLC *vlc, const uint8_t *data, int elems)
 
static av_cold int decode_close (AVCodecContext *avctx)
 
static av_cold int decode_init (AVCodecContext *avctx)
 
static int extend_code (GetBitContext *gb, int val, int range, int bits)
 
static int decode_channel (RALFContext *ctx, GetBitContext *gb, int ch, int length, int mode, int bits)
 
static void apply_lpc (RALFContext *ctx, int ch, int length, int bits)
 
static int decode_block (AVCodecContext *avctx, GetBitContext *gb, int16_t *dst0, int16_t *dst1)
 
static int decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
 
static void decode_flush (AVCodecContext *avctx)
 

Variables

AVCodec ff_ralf_decoder
 

Detailed Description

This is a decoder for Real Audio Lossless format.

Dedicated to the mastermind behind it, Ralph Wiggum.

Definition in file ralf.c.

Macro Definition Documentation

#define FILTER_NONE   0

Definition at line 38 of file ralf.c.

Referenced by decode_channel().

#define FILTER_RAW   642

Definition at line 39 of file ralf.c.

Referenced by decode_block(), and decode_channel().

#define RALF_MAX_PKT_SIZE   8192

Definition at line 50 of file ralf.c.

Referenced by decode_frame().

#define MAX_ELEMS   644

Definition at line 74 of file ralf.c.

Referenced by init_ralf_vlc().

Function Documentation

static av_cold int init_ralf_vlc ( VLC vlc,
const uint8_t data,
int  elems 
)
static

Definition at line 76 of file ralf.c.

Referenced by decode_init().

static av_cold int decode_close ( AVCodecContext avctx)
static

Definition at line 106 of file ralf.c.

Referenced by decode_init().

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 127 of file ralf.c.

static int extend_code ( GetBitContext gb,
int  val,
int  range,
int  bits 
)
inlinestatic

Definition at line 213 of file ralf.c.

Referenced by decode_channel().

static int decode_channel ( RALFContext ctx,
GetBitContext gb,
int  ch,
int  length,
int  mode,
int  bits 
)
static

Definition at line 227 of file ralf.c.

Referenced by decode_block().

static void apply_lpc ( RALFContext ctx,
int  ch,
int  length,
int  bits 
)
static

Definition at line 314 of file ralf.c.

Referenced by decode_block().

static int decode_block ( AVCodecContext avctx,
GetBitContext gb,
int16_t *  dst0,
int16_t *  dst1 
)
static

Definition at line 338 of file ralf.c.

Referenced by decode_frame().

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

Definition at line 421 of file ralf.c.

static void decode_flush ( AVCodecContext avctx)
static

Definition at line 515 of file ralf.c.

Variable Documentation

AVCodec ff_ralf_decoder
Initial value:
= {
.name = "ralf",
.long_name = NULL_IF_CONFIG_SMALL("RealAudio Lossless"),
.priv_data_size = sizeof(RALFContext),
.capabilities = CODEC_CAP_DR1,
}

Definition at line 523 of file ralf.c.