hvirtual/libmpeg3/audio/layer3.c File Reference

#include "huffman.h"
#include "mpeg3private.h"
#include "mpeg3protos.h"
#include "tables.h"
#include <stdio.h>
#include <string.h>

Include dependency graph for layer3.c:

Go to the source code of this file.

Data Structures

struct  gr_info_s
struct  sideinfo_s

Defines

#define BITSHIFT   ((sizeof(int32_t) - 1) * 8)
#define REFRESH_MASK

Functions

static int get_scale_factors_1 (mpeg3_layer_t *audio, int *scf, struct gr_info_s *gr_info, int ch, int gr)
static int get_scale_factors_2 (mpeg3_layer_t *audio, int *scf, struct gr_info_s *gr_info, int i_stereo)
static int dequantize_sample (mpeg3_layer_t *audio, float xr[SBLIMIT][SSLIMIT], int *scf, struct gr_info_s *gr_info, int sfreq, int part2bits)
static int get_side_info (mpeg3_layer_t *audio, struct sideinfo_s *si, int channels, int ms_stereo, long sfreq, int single, int lsf)
static int hybrid (mpeg3_layer_t *audio, float fsIn[SBLIMIT][SSLIMIT], float tsOut[SSLIMIT][SBLIMIT], int ch, struct gr_info_s *gr_info)
static int antialias (mpeg3_layer_t *audio, float xr[SBLIMIT][SSLIMIT], struct gr_info_s *gr_info)
static int calc_i_stereo (mpeg3_layer_t *audio, float xr_buf[2][SBLIMIT][SSLIMIT], int *scalefac, struct gr_info_s *gr_info, int sfreq, int ms_stereo, int lsf)
int mpeg3audio_dolayer3 (mpeg3_layer_t *audio, char *frame, int frame_size, float **output, int render)
void mpeg3_layer_reset (mpeg3_layer_t *audio)
int mpeg3_layer_check (unsigned char *data)
int mpeg3_layer_header (mpeg3_layer_t *audio, unsigned char *data)
mpeg3_layer_tmpeg3_new_layer ()
void mpeg3_delete_layer (mpeg3_layer_t *audio)

Variables

static int pretab1 [22] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,3,3,3,2,0}
static int pretab2 [22] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}


Define Documentation

#define BITSHIFT   ((sizeof(int32_t) - 1) * 8)

Definition at line 223 of file layer3.c.

Referenced by dequantize_sample().

#define REFRESH_MASK

Value:

while(num < BITSHIFT) \
        { \
                mask |= mpeg3bits_getbits(audio->stream, 8) << (BITSHIFT - num); \
                num += 8; \
                part2remain -= 8; \
        }

Definition at line 224 of file layer3.c.

Referenced by dequantize_sample().


Function Documentation

static int antialias ( mpeg3_layer_t audio,
float  xr[SBLIMIT][SSLIMIT],
struct gr_info_s gr_info 
) [static]

static int calc_i_stereo ( mpeg3_layer_t audio,
float  xr_buf[2][SBLIMIT][SSLIMIT],
int *  scalefac,
struct gr_info_s gr_info,
int  sfreq,
int  ms_stereo,
int  lsf 
) [static]

static int dequantize_sample ( mpeg3_layer_t audio,
float  xr[SBLIMIT][SSLIMIT],
int *  scf,
struct gr_info_s gr_info,
int  sfreq,
int  part2bits 
) [static]

static int get_scale_factors_1 ( mpeg3_layer_t audio,
int *  scf,
struct gr_info_s gr_info,
int  ch,
int  gr 
) [static]

Definition at line 49 of file layer3.c.

References gr_info_s::block_type, gr_info_s::mixed_block_flag, mpeg3bits_getbits(), gr_info_s::scalefac_compress, gr_info_s::scfsi, and mpeg3_layer_t::stream.

Referenced by mpeg3audio_dolayer3().

Here is the call graph for this function:

static int get_scale_factors_2 ( mpeg3_layer_t audio,
int *  scf,
struct gr_info_s gr_info,
int  i_stereo 
) [static]

static int get_side_info ( mpeg3_layer_t audio,
struct sideinfo_s si,
int  channels,
int  ms_stereo,
long  sfreq,
int  single,
int  lsf 
) [static]

static int hybrid ( mpeg3_layer_t audio,
float  fsIn[SBLIMIT][SSLIMIT],
float  tsOut[SSLIMIT][SBLIMIT],
int  ch,
struct gr_info_s gr_info 
) [static]

void mpeg3_delete_layer ( mpeg3_layer_t audio  ) 

Definition at line 1546 of file layer3.c.

References mpeg3bits_delete_stream(), and mpeg3_layer_t::stream.

Referenced by delete_codec(), and delete_struct().

Here is the call graph for this function:

int mpeg3_layer_check ( unsigned char *  data  ) 

Definition at line 1363 of file layer3.c.

Referenced by mpeg3_layer_header().

int mpeg3_layer_header ( mpeg3_layer_t audio,
unsigned char *  data 
)

void mpeg3_layer_reset ( mpeg3_layer_t audio  ) 

Definition at line 1346 of file layer3.c.

References mpeg3_layer_t::first_frame, mpeg3_layer_t::mp3_blc, mpeg3_layer_t::mp3_block, and mpeg3audio_reset_synths().

Referenced by mpeg3audio_dolayer3(), and seek().

Here is the call graph for this function:

mpeg3_layer_t* mpeg3_new_layer (  ) 

int mpeg3audio_dolayer3 ( mpeg3_layer_t audio,
char *  frame,
int  frame_size,
float **  output,
int  render 
)


Variable Documentation

int pretab1[22] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,3,3,3,2,0} [static]

Definition at line 214 of file layer3.c.

Referenced by dequantize_sample().

int pretab2[22] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} [static]

Definition at line 215 of file layer3.c.

Referenced by dequantize_sample().


Generated on Mon Apr 28 13:58:37 2008 for Cinelerra by  doxygen 1.5.5