binkaudio.c File Reference

Bink Audio decoder. More...

#include "libavutil/channel_layout.h"
#include "avcodec.h"
#include "get_bits.h"
#include "dct.h"
#include "rdft.h"
#include "fmtconvert.h"
#include "internal.h"
#include "libavutil/intfloat.h"
Include dependency graph for binkaudio.c:

Go to the source code of this file.

Data Structures

struct  BinkAudioContext
 

Macros

#define BITSTREAM_READER_LE
 
#define MAX_CHANNELS   2
 
#define BINK_BLOCK_MAX_SIZE   (MAX_CHANNELS << 11)
 

Functions

static av_cold int decode_init (AVCodecContext *avctx)
 
static float get_float (GetBitContext *gb)
 
static int decode_block (BinkAudioContext *s, float **out, int use_dct)
 Decode Bink Audio block. More...
 
static av_cold int decode_end (AVCodecContext *avctx)
 
static void get_bits_align32 (GetBitContext *s)
 
static int decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
 

Variables

const uint16_t ff_wma_critical_freqs [25]
 
static float quant_table [96]
 
static const uint8_t rle_length_tab [16]
 
AVCodec ff_binkaudio_rdft_decoder
 
AVCodec ff_binkaudio_dct_decoder
 

Detailed Description

Bink Audio decoder.

Technical details here: http://wiki.multimedia.cx/index.php?title=Bink_Audio

Definition in file binkaudio.c.

Macro Definition Documentation

#define BINK_BLOCK_MAX_SIZE   (MAX_CHANNELS << 11)

Definition at line 46 of file binkaudio.c.

#define BITSTREAM_READER_LE

Definition at line 33 of file binkaudio.c.

#define MAX_CHANNELS   2

Definition at line 45 of file binkaudio.c.

Referenced by decode_init().

Function Documentation

static int decode_block ( BinkAudioContext s,
float **  out,
int  use_dct 
)
static

Decode Bink Audio block.

Parameters
[out]outOutput buffer (must contain s->block_size elements)
Returns
0 on success, negative error code on failure

Definition at line 165 of file binkaudio.c.

Referenced by decode_frame().

static av_cold int decode_end ( AVCodecContext avctx)
static

Definition at line 269 of file binkaudio.c.

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

Definition at line 288 of file binkaudio.c.

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 69 of file binkaudio.c.

static void get_bits_align32 ( GetBitContext s)
static

Definition at line 282 of file binkaudio.c.

Referenced by decode_frame().

static float get_float ( GetBitContext gb)
static

Definition at line 147 of file binkaudio.c.

Referenced by decode_block().

Variable Documentation

AVCodec ff_binkaudio_dct_decoder
Initial value:
= {
.name = "binkaudio_dct",
.priv_data_size = sizeof(BinkAudioContext),
.capabilities = CODEC_CAP_DELAY | CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Bink Audio (DCT)")
}
static av_cold int decode_end(AVCodecContext *avctx)
Definition: binkaudio.c:269
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.
#define CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static av_cold int decode_init(AVCodecContext *avctx)
Definition: binkaudio.c:69
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
Definition: binkaudio.c:288
static void close(AVCodecParserContext *s)
Definition: h264_parser.c:375
static int decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: crystalhd.c:868

Definition at line 349 of file binkaudio.c.

AVCodec ff_binkaudio_rdft_decoder
Initial value:
= {
.name = "binkaudio_rdft",
.priv_data_size = sizeof(BinkAudioContext),
.capabilities = CODEC_CAP_DELAY | CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Bink Audio (RDFT)")
}
static av_cold int decode_end(AVCodecContext *avctx)
Definition: binkaudio.c:269
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.
#define CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static av_cold int decode_init(AVCodecContext *avctx)
Definition: binkaudio.c:69
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
Definition: binkaudio.c:288
static void close(AVCodecParserContext *s)
Definition: h264_parser.c:375
static int decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: crystalhd.c:868

Definition at line 337 of file binkaudio.c.

const uint16_t ff_wma_critical_freqs[25]

Definition at line 33 of file wmadata.h.

Referenced by decode_init(), and ff_wma_init().

float quant_table[96]
static

Definition at line 43 of file binkaudio.c.

Referenced by decode_block(), decode_init(), read_quant_tables(), and write_quant_tables().

const uint8_t rle_length_tab[16]
static
Initial value:
= {
2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 32, 64
}

Definition at line 156 of file binkaudio.c.

Referenced by decode_block().