#include <math.h>
#include <stddef.h>
#include <stdio.h>
#include "avcodec.h"
#include "get_bits.h"
#include "dsputil.h"
#include "fft.h"
#include "libavutil/audioconvert.h"
#include "libavutil/libm.h"
#include "sinewin.h"
#include "imcdata.h"
Go to the source code of this file.
Data Structures | |
struct | IMCChannel |
struct | IMCContext |
Defines | |
#define | IMC_BLOCK_SIZE 64 |
#define | IMC_FRAME_ID 0x21 |
#define | BANDS 32 |
#define | COEFFS 256 |
#define | VLC_TABLES_SIZE 9512 |
Functions | |
static double | freq2bark (double freq) |
static av_cold void | iac_generate_tabs (IMCContext *q, int sampling_rate) |
static av_cold int | imc_decode_init (AVCodecContext *avctx) |
static void | imc_calculate_coeffs (IMCContext *q, float *flcoeffs1, float *flcoeffs2, int *bandWidthT, float *flcoeffs3, float *flcoeffs5) |
static void | imc_read_level_coeffs (IMCContext *q, int stream_format_code, int *levlCoeffs) |
static void | imc_decode_level_coefficients (IMCContext *q, int *levlCoeffBuf, float *flcoeffs1, float *flcoeffs2) |
static void | imc_decode_level_coefficients2 (IMCContext *q, int *levlCoeffBuf, float *old_floor, float *flcoeffs1, float *flcoeffs2) |
static int | bit_allocation (IMCContext *q, IMCChannel *chctx, int stream_format_code, int freebits, int flag) |
Perform bit allocation depending on bits available. | |
static void | imc_get_skip_coeff (IMCContext *q, IMCChannel *chctx) |
static void | imc_adjust_bit_allocation (IMCContext *q, IMCChannel *chctx, int summer) |
Increase highest' band coefficient sizes as some bits won't be used. | |
static void | imc_imdct256 (IMCContext *q, IMCChannel *chctx, int channels) |
static int | inverse_quant_coeff (IMCContext *q, IMCChannel *chctx, int stream_format_code) |
static int | imc_get_coeffs (IMCContext *q, IMCChannel *chctx) |
static int | imc_decode_block (AVCodecContext *avctx, IMCContext *q, int ch) |
static int | imc_decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) |
static av_cold int | imc_decode_close (AVCodecContext *avctx) |
Variables | |
static VLC | huffman_vlc [4][4] |
static const int | vlc_offsets [17] |
static VLC_TYPE | vlc_tables [VLC_TABLES_SIZE][2] |
Only mono is supported.
Definition in file imc.c.
#define BANDS 32 |
Definition at line 50 of file imc.c.
Referenced by bit_allocation(), imc_adjust_bit_allocation(), imc_calculate_coeffs(), imc_decode_block(), imc_decode_init(), imc_decode_level_coefficients(), imc_decode_level_coefficients2(), imc_get_coeffs(), imc_get_skip_coeff(), imc_read_level_coeffs(), inverse_quant_coeff(), mpc7_decode_frame(), mpc7_decode_init(), and mpc8_decode_init().
#define COEFFS 256 |
Definition at line 51 of file imc.c.
Referenced by imc_decode_block(), imc_decode_frame(), imc_decode_init(), and imc_imdct256().
#define IMC_BLOCK_SIZE 64 |
static int bit_allocation | ( | IMCContext * | q, | |
IMCChannel * | chctx, | |||
int | stream_format_code, | |||
int | freebits, | |||
int | flag | |||
) | [static] |
Perform bit allocation depending on bits available.
Definition at line 395 of file imc.c.
Referenced by imc_decode_block().
static double freq2bark | ( | double | freq | ) | [inline, static] |
static av_cold void iac_generate_tabs | ( | IMCContext * | q, | |
int | sampling_rate | |||
) | [static] |
static void imc_adjust_bit_allocation | ( | IMCContext * | q, | |
IMCChannel * | chctx, | |||
int | summer | |||
) | [static] |
Increase highest' band coefficient sizes as some bits won't be used.
Definition at line 618 of file imc.c.
Referenced by imc_decode_block().
static void imc_calculate_coeffs | ( | IMCContext * | q, | |
float * | flcoeffs1, | |||
float * | flcoeffs2, | |||
int * | bandWidthT, | |||
float * | flcoeffs3, | |||
float * | flcoeffs5 | |||
) | [static] |
static int imc_decode_block | ( | AVCodecContext * | avctx, | |
IMCContext * | q, | |||
int | ch | |||
) | [static] |
static av_cold int imc_decode_close | ( | AVCodecContext * | avctx | ) | [static] |
static int imc_decode_frame | ( | AVCodecContext * | avctx, | |
void * | data, | |||
int * | got_frame_ptr, | |||
AVPacket * | avpkt | |||
) | [static] |
static av_cold int imc_decode_init | ( | AVCodecContext * | avctx | ) | [static] |
static void imc_decode_level_coefficients | ( | IMCContext * | q, | |
int * | levlCoeffBuf, | |||
float * | flcoeffs1, | |||
float * | flcoeffs2 | |||
) | [static] |
static void imc_decode_level_coefficients2 | ( | IMCContext * | q, | |
int * | levlCoeffBuf, | |||
float * | old_floor, | |||
float * | flcoeffs1, | |||
float * | flcoeffs2 | |||
) | [static] |
static int imc_get_coeffs | ( | IMCContext * | q, | |
IMCChannel * | chctx | |||
) | [static] |
static void imc_get_skip_coeff | ( | IMCContext * | q, | |
IMCChannel * | chctx | |||
) | [static] |
static void imc_imdct256 | ( | IMCContext * | q, | |
IMCChannel * | chctx, | |||
int | channels | |||
) | [static] |
static void imc_read_level_coeffs | ( | IMCContext * | q, | |
int | stream_format_code, | |||
int * | levlCoeffs | |||
) | [static] |
static int inverse_quant_coeff | ( | IMCContext * | q, | |
IMCChannel * | chctx, | |||
int | stream_format_code | |||
) | [static] |
VLC huffman_vlc[4][4] [static] |
const int vlc_offsets[17] [static] |
Initial value:
{ 0, 640, 1156, 1732, 2308, 2852, 3396, 3924, 4452, 5220, 5860, 6628, 7268, 7908, 8424, 8936, VLC_TABLES_SIZE }
Definition at line 110 of file imc.c.
Referenced by imc_decode_init(), and mpc8_decode_init().
VLC_TYPE vlc_tables[VLC_TABLES_SIZE][2] [static] |