adpcm.c File Reference

Include dependency graph for adpcm.c:


Data Structures

struct  decoder_sys_t
struct  adpcm_ms_channel_s
struct  adpcm_ima_wav_channel_s

Defines

#define CLAMP(v, min, max)
#define GetByte(v)   (v) = *p_buffer; p_buffer++;
#define GetWord(v)
#define MAX_CHAN   5

Typedefs

typedef struct adpcm_ms_channel_s adpcm_ms_channel_t
typedef struct
adpcm_ima_wav_channel_s 
adpcm_ima_wav_channel_t

Enumerations

enum  adpcm_codec_e {
  ADPCM_IMA_QT, ADPCM_IMA_WAV, ADPCM_MS, ADPCM_DK3,
  ADPCM_DK4, ADPCM_EA
}

Functions

static int OpenDecoder (vlc_object_t *)
static void CloseDecoder (vlc_object_t *)
static aout_buffer_tDecodeBlock (decoder_t *, block_t **)
int vlc_entry__main (module_t *p_module)
const char * vlc_entry_license__main (void)
static void DecodeAdpcmMs (decoder_t *, int16_t *, uint8_t *)
static void DecodeAdpcmImaWav (decoder_t *, int16_t *, uint8_t *)
static void DecodeAdpcmImaQT (decoder_t *, int16_t *, uint8_t *)
static void DecodeAdpcmDk4 (decoder_t *, int16_t *, uint8_t *)
static void DecodeAdpcmDk3 (decoder_t *, int16_t *, uint8_t *)
static void DecodeAdpcmEA (decoder_t *, int16_t *, uint8_t *)
static int AdpcmMsExpandNibble (adpcm_ms_channel_t *p_channel, int i_nibble)
static int AdpcmImaWavExpandNibble (adpcm_ima_wav_channel_t *p_channel, int i_nibble)

Variables

static const int pi_channels_maps [6]
static const int i_index_table [16]
static const int i_step_table [89]
static const int i_adaptation_table [16]
static const int i_adaptation_coeff1 [7]
static const int i_adaptation_coeff2 [7]

Define Documentation

#define CLAMP ( v,
min,
max   ) 

Value:

if( (v) < (min) ) (v) = (min); \
    if( (v) > (max) ) (v) = (max)

Referenced by AdpcmImaWavExpandNibble(), AdpcmMsExpandNibble(), DecodeAdpcmDk4(), DecodeAdpcmEA(), DecodeAdpcmImaQT(), DecodeAdpcmImaWav(), DecodeAdpcmMs(), and yuv_to_rgb().

#define GetByte (  )     (v) = *p_buffer; p_buffer++;

#define GetWord (  ) 

Value:

(v) = *p_buffer; p_buffer++; \
    (v) |= ( *p_buffer ) << 8; p_buffer++; \
    if( (v)&0x8000 ) (v) -= 0x010000;

Referenced by DecodeAdpcmDk3(), DecodeAdpcmDk4(), DecodeAdpcmImaWav(), and DecodeAdpcmMs().

#define MAX_CHAN   5

Referenced by DecodeAdpcmEA().


Typedef Documentation


Enumeration Type Documentation

Enumerator:
ADPCM_IMA_QT 
ADPCM_IMA_WAV 
ADPCM_MS 
ADPCM_DK3 
ADPCM_DK4 
ADPCM_EA 


Function Documentation

static int AdpcmImaWavExpandNibble ( adpcm_ima_wav_channel_t p_channel,
int  i_nibble 
) [static]

static int AdpcmMsExpandNibble ( adpcm_ms_channel_t p_channel,
int  i_nibble 
) [static]

static void CloseDecoder ( vlc_object_t p_this  )  [static]

static void DecodeAdpcmDk3 ( decoder_t p_dec,
int16_t *  p_sample,
uint8_t *  p_buffer 
) [static]

static void DecodeAdpcmDk4 ( decoder_t p_dec,
int16_t *  p_sample,
uint8_t *  p_buffer 
) [static]

static void DecodeAdpcmEA ( decoder_t p_dec,
int16_t *  p_sample,
uint8_t *  p_buffer 
) [static]

static void DecodeAdpcmImaQT ( decoder_t p_dec,
int16_t *  p_sample,
uint8_t *  p_buffer 
) [static]

static void DecodeAdpcmImaWav ( decoder_t p_dec,
int16_t *  p_sample,
uint8_t *  p_buffer 
) [static]

static void DecodeAdpcmMs ( decoder_t p_dec,
int16_t *  p_sample,
uint8_t *  p_buffer 
) [static]

static aout_buffer_t * DecodeBlock ( decoder_t p_dec,
block_t **  pp_block 
) [static]

static int OpenDecoder ( vlc_object_t p_this  )  [static]

int vlc_entry__main ( module_t p_module  ) 

const char* vlc_entry_license__main ( void   ) 


Variable Documentation

const int i_adaptation_coeff1[7] [static]

Initial value:

{
    256, 512, 0, 192, 240, 460, 392
}

Referenced by DecodeAdpcmMs().

const int i_adaptation_coeff2[7] [static]

Initial value:

{
    0, -256, 0, 64, 0, -208, -232
}

Referenced by DecodeAdpcmMs().

const int i_adaptation_table[16] [static]

Initial value:

{
    230, 230, 230, 230, 307, 409, 512, 614,
    768, 614, 512, 409, 307, 230, 230, 230
}

Referenced by AdpcmMsExpandNibble().

const int i_index_table[16] [static]

Initial value:

{
    -1, -1, -1, -1, 2, 4, 6, 8,
    -1, -1, -1, -1, 2, 4, 6, 8
}

Referenced by AdpcmImaWavExpandNibble().

const int i_step_table[89] [static]

Initial value:

{
    7, 8, 9, 10, 11, 12, 13, 14, 16, 17,
    19, 21, 23, 25, 28, 31, 34, 37, 41, 45,
    50, 55, 60, 66, 73, 80, 88, 97, 107, 118,
    130, 143, 157, 173, 190, 209, 230, 253, 279, 307,
    337, 371, 408, 449, 494, 544, 598, 658, 724, 796,
    876, 963, 1060, 1166, 1282, 1411, 1552, 1707, 1878, 2066,
    2272, 2499, 2749, 3024, 3327, 3660, 4026, 4428, 4871, 5358,
    5894, 6484, 7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899,
    15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767
}

Referenced by AdpcmImaWavExpandNibble().

const int pi_channels_maps[6] [static]

Initial value:

{
    0,
     0x1 ,
     0x2  |  0x4 ,
     0x2  |  0x4  |  0x1 ,
     0x2  |  0x4  |  0x20  |  0x20 ,
     0x2  |  0x4  |  0x1 
     |  0x20  |  0x20 
}


Generated on Tue May 25 08:05:11 2010 for VLC by  doxygen 1.5.6