FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
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 "internal.h"
#include "wma_freqs.h"
#include "libavutil/intfloat.h"

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

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 BITSTREAM_READER_LE

Definition at line 33 of file binkaudio.c.

#define MAX_CHANNELS   2

Definition at line 43 of file binkaudio.c.

Referenced by decode_init().

#define BINK_BLOCK_MAX_SIZE   (MAX_CHANNELS << 11)

Definition at line 44 of file binkaudio.c.

Function Documentation

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 67 of file binkaudio.c.

static float get_float ( GetBitContext gb)
static

Definition at line 145 of file binkaudio.c.

Referenced by decode_block().

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 163 of file binkaudio.c.

Referenced by decode_frame().

static av_cold int decode_end ( AVCodecContext avctx)
static

Definition at line 267 of file binkaudio.c.

static void get_bits_align32 ( GetBitContext s)
static

Definition at line 280 of file binkaudio.c.

Referenced by decode_frame().

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

Definition at line 286 of file binkaudio.c.

Variable Documentation

float quant_table[96]
static

Definition at line 41 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 154 of file binkaudio.c.

Referenced by decode_block().

AVCodec ff_binkaudio_rdft_decoder
Initial value:
= {
.name = "binkaudio_rdft",
.long_name = NULL_IF_CONFIG_SMALL("Bink Audio (RDFT)"),
.priv_data_size = sizeof(BinkAudioContext),
.close = decode_end,
}
static av_cold int decode_end(AVCodecContext *avctx)
Definition: binkaudio.c:267
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
#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: avcodec.h:882
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:175
static av_cold int decode_init(AVCodecContext *avctx)
Definition: binkaudio.c:67
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
Definition: binkaudio.c:286
static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avpkt)
Definition: ccaption_dec.c:523
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:857

Definition at line 337 of file binkaudio.c.

AVCodec ff_binkaudio_dct_decoder
Initial value:
= {
.name = "binkaudio_dct",
.long_name = NULL_IF_CONFIG_SMALL("Bink Audio (DCT)"),
.priv_data_size = sizeof(BinkAudioContext),
.close = decode_end,
}
static av_cold int decode_end(AVCodecContext *avctx)
Definition: binkaudio.c:267
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
#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: avcodec.h:882
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:175
static av_cold int decode_init(AVCodecContext *avctx)
Definition: binkaudio.c:67
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
Definition: binkaudio.c:286
static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avpkt)
Definition: ccaption_dec.c:523
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:857

Definition at line 349 of file binkaudio.c.