libavcodec/imc.c File Reference

IMC - Intel Music Coder A mdct based codec using a 256 points large transform divied into 32 bands with some mix of scale factors. More...

#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 "sinewin.h"
#include "imcdata.h"

Go to the source code of this file.

Data Structures

struct  IMCContext

Defines

#define ALT_BITSTREAM_READER
#define IMC_BLOCK_SIZE   64
#define IMC_FRAME_ID   0x21
#define BANDS   32
#define COEFFS   256
#define VLC_TABLES_SIZE   9512

Functions

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, int stream_format_code, int freebits, int flag)
 Perform bit allocation depending on bits available.
static void imc_get_skip_coeff (IMCContext *q)
static void imc_adjust_bit_allocation (IMCContext *q, int summer)
 Increase highest' band coefficient sizes as some bits won't be used.
static void imc_imdct256 (IMCContext *q)
static int inverse_quant_coeff (IMCContext *q, int stream_format_code)
static int imc_get_coeffs (IMCContext *q)
static int imc_decode_frame (AVCodecContext *avctx, void *data, int *data_size, 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]
AVCodec ff_imc_decoder


Detailed Description

IMC - Intel Music Coder A mdct based codec using a 256 points large transform divied into 32 bands with some mix of scale factors.

Only mono is supported.

Definition in file imc.c.


Define Documentation

#define ALT_BITSTREAM_READER

Definition at line 38 of file imc.c.

#define BANDS   32

#define COEFFS   256

Definition at line 51 of file imc.c.

Referenced by imc_decode_frame(), imc_decode_init(), and imc_imdct256().

#define IMC_BLOCK_SIZE   64

Definition at line 48 of file imc.c.

Referenced by imc_decode_frame().

#define IMC_FRAME_ID   0x21

Definition at line 49 of file imc.c.

Referenced by imc_decode_frame().

#define VLC_TABLES_SIZE   9512

Definition at line 97 of file imc.c.


Function Documentation

static int bit_allocation ( IMCContext q,
int  stream_format_code,
int  freebits,
int  flag 
) [static]

Perform bit allocation depending on bits available.

Definition at line 308 of file imc.c.

Referenced by imc_decode_frame().

static void imc_adjust_bit_allocation ( IMCContext q,
int  summer 
) [static]

Increase highest' band coefficient sizes as some bits won't be used.

Definition at line 524 of file imc.c.

Referenced by imc_decode_frame().

static void imc_calculate_coeffs ( IMCContext q,
float *  flcoeffs1,
float *  flcoeffs2,
int *  bandWidthT,
float *  flcoeffs3,
float *  flcoeffs5 
) [static]

Definition at line 174 of file imc.c.

Referenced by imc_decode_frame().

static av_cold int imc_decode_close ( AVCodecContext avctx  )  [static]

Definition at line 825 of file imc.c.

static int imc_decode_frame ( AVCodecContext avctx,
void *  data,
int *  data_size,
AVPacket avpkt 
) [static]

Definition at line 652 of file imc.c.

static av_cold int imc_decode_init ( AVCodecContext avctx  )  [static]

Definition at line 105 of file imc.c.

static void imc_decode_level_coefficients ( IMCContext q,
int *  levlCoeffBuf,
float *  flcoeffs1,
float *  flcoeffs2 
) [static]

Definition at line 254 of file imc.c.

Referenced by imc_decode_frame().

static void imc_decode_level_coefficients2 ( IMCContext q,
int *  levlCoeffBuf,
float *  old_floor,
float *  flcoeffs1,
float *  flcoeffs2 
) [static]

Definition at line 288 of file imc.c.

Referenced by imc_decode_frame().

static int imc_get_coeffs ( IMCContext q  )  [static]

Definition at line 627 of file imc.c.

Referenced by imc_decode_frame().

static void imc_get_skip_coeff ( IMCContext q  )  [static]

Definition at line 470 of file imc.c.

Referenced by imc_decode_frame().

static void imc_imdct256 ( IMCContext q  )  [static]

Definition at line 563 of file imc.c.

Referenced by imc_decode_frame().

static void imc_read_level_coeffs ( IMCContext q,
int  stream_format_code,
int *  levlCoeffs 
) [static]

Definition at line 228 of file imc.c.

Referenced by imc_decode_frame().

static int inverse_quant_coeff ( IMCContext q,
int  stream_format_code 
) [static]

Definition at line 589 of file imc.c.

Referenced by imc_decode_frame().


Variable Documentation

Initial value:

 {
    .name = "imc",
    .type = AVMEDIA_TYPE_AUDIO,
    .id = CODEC_ID_IMC,
    .priv_data_size = sizeof(IMCContext),
    .init = imc_decode_init,
    .close = imc_decode_close,
    .decode = imc_decode_frame,
    .long_name = NULL_IF_CONFIG_SMALL("IMC (Intel Music Coder)"),
}

Definition at line 834 of file imc.c.

VLC huffman_vlc[4][4] [static]

Definition at line 95 of file imc.c.

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 99 of file imc.c.

Referenced by imc_decode_init(), and mpc8_decode_init().

VLC_TYPE vlc_tables[VLC_TABLES_SIZE][2] [static]

Definition at line 103 of file imc.c.

Referenced by imc_decode_init(), and ir2_decode_init().


Generated on Fri Oct 26 02:39:45 2012 for FFmpeg by  doxygen 1.5.8