ralf.c File Reference

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

#include "libavutil/channel_layout.h"
#include "avcodec.h"
#include "get_bits.h"
#include "golomb.h"
#include "internal.h"
#include "unary.h"
#include "ralfdata.h"
Include dependency graph for ralf.c:

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
 

Typedefs

typedef struct VLCSet VLCSet
 
typedef struct RALFContext RALFContext
 

Functions

static 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 37 of file ralf.c.

Referenced by decode_channel().

#define FILTER_RAW   642

Definition at line 38 of file ralf.c.

Referenced by decode_block(), and decode_channel().

#define MAX_ELEMS   644

Definition at line 73 of file ralf.c.

Referenced by init_ralf_vlc().

#define RALF_MAX_PKT_SIZE   8192

Definition at line 49 of file ralf.c.

Referenced by decode_frame().

Typedef Documentation

typedef struct RALFContext RALFContext
typedef struct VLCSet VLCSet

Function Documentation

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

Definition at line 313 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 337 of file ralf.c.

Referenced by decode_frame().

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

Definition at line 226 of file ralf.c.

Referenced by decode_block().

static av_cold int decode_close ( AVCodecContext avctx)
static

Definition at line 105 of file ralf.c.

Referenced by decode_init().

static void decode_flush ( AVCodecContext avctx)
static

Definition at line 514 of file ralf.c.

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

Definition at line 420 of file ralf.c.

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 126 of file ralf.c.

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

Definition at line 212 of file ralf.c.

Referenced by decode_channel().

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

Definition at line 75 of file ralf.c.

Referenced by decode_init().

Variable Documentation

AVCodec ff_ralf_decoder
Initial value:
= {
.name = "ralf",
.priv_data_size = sizeof(RALFContext),
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("RealAudio Lossless"),
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
struct RALFContext RALFContext
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
Definition: ralf.c:420
static void decode_flush(AVCodecContext *avctx)
Definition: ralf.c:514
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static av_cold int decode_close(AVCodecContext *avctx)
Definition: ralf.c:105
static void flush(AVCodecContext *avctx)
static void close(AVCodecParserContext *s)
Definition: h264_parser.c:375
AVSampleFormat
Audio Sample Formats.
Definition: samplefmt.h:49
static av_cold int decode_init(AVCodecContext *avctx)
Definition: ralf.c:126
signed 16 bits, planar
Definition: samplefmt.h:58
static int decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: crystalhd.c:868

Definition at line 522 of file ralf.c.