#include <config.h>
#include <stdlib.h>
#include "common.h"
#include "huffman.h"
#include "lame.h"
#include "machine.h"
#include "encoder.h"
#include "lame-analysis.h"
#include "decode_i386.h"
Include dependency graph for layer3.c:
Go to the source code of this file.
Classes | |
struct | bandInfoStruct |
Defines | |
#define | MACRO0(v) |
#define | MACRO1(v) |
#define | MACRO2(v) |
#define | DCT12_PART1 |
#define | DCT12_PART2 |
Functions | |
static unsigned int | get1bit (PMPSTR mp) |
void | init_layer3 (int down_sample_sblimit) |
static void | III_get_side_info_1 (PMPSTR mp, struct III_sideinfo *si, int stereo, int ms_stereo, long sfreq, int single) |
static void | III_get_side_info_2 (PMPSTR mp, struct III_sideinfo *si, int stereo, int ms_stereo, long sfreq, int single) |
static int | III_get_scale_factors_1 (PMPSTR mp, int *scf, struct gr_info_s *gr_infos) |
static int | III_get_scale_factors_2 (PMPSTR mp, int *scf, struct gr_info_s *gr_infos, int i_stereo) |
static int | III_dequantize_sample (PMPSTR mp, real xr[SBLIMIT][SSLIMIT], int *scf, struct gr_info_s *gr_infos, int sfreq, int part2bits) |
static void | III_i_stereo (real xr_buf[2][SBLIMIT][SSLIMIT], int *scalefac, struct gr_info_s *gr_infos, int sfreq, int ms_stereo, int lsf) |
static void | III_antialias (real xr[SBLIMIT][SSLIMIT], struct gr_info_s *gr_infos) |
static void | dct36 (real *inbuf, real *o1, real *o2, real *wintab, real *tsbuf) |
static void | dct12 (real *in, real *rawout1, real *rawout2, real *wi, real *ts) |
static void | III_hybrid (PMPSTR mp, real fsIn[SBLIMIT][SSLIMIT], real tsOut[SSLIMIT][SBLIMIT], int ch, struct gr_info_s *gr_infos) |
int | do_layer3_sideinfo (PMPSTR mp) |
int | do_layer3 (PMPSTR mp, unsigned char *pcm_sample, int *pcm_point, int(*synth_1to1_mono_ptr)(PMPSTR, real *, unsigned char *, int *), int(*synth_1to1_ptr)(PMPSTR, real *, int, unsigned char *, int *)) |
Variables | |
static real | ispow [8207] |
static real | aa_ca [8] |
static real | aa_cs [8] |
static real | COS1 [12][6] |
static real | win [4][36] |
static real | win1 [4][36] |
static real | gainpow2 [256+118+4] |
static real | COS9 [9] |
static real | COS6_1 |
static real | COS6_2 |
static real | tfcos36 [9] |
static real | tfcos12 [3] |
static int | longLimit [9][23] |
static int | shortLimit [9][14] |
bandInfoStruct | bandInfo [9] |
static int | mapbuf0 [9][152] |
static int | mapbuf1 [9][156] |
static int | mapbuf2 [9][44] |
static int * | map [9][3] |
static int * | mapend [9][3] |
static unsigned int | n_slen2 [512] |
static unsigned int | i_slen2 [256] |
static real | tan1_1 [16] |
static real | tan2_1 [16] |
static real | tan1_2 [16] |
static real | tan2_2 [16] |
static real | pow1_1 [2][16] |
static real | pow2_1 [2][16] |
static real | pow1_2 [2][16] |
static real | pow2_2 [2][16] |
static const 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 const 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} |
III_sideinfo | sideinfo |
#define DCT12_PART1 |
#define DCT12_PART2 |
#define MACRO0 | ( | v | ) |
#define MACRO1 | ( | v | ) |
#define MACRO2 | ( | v | ) |
static void dct12 | ( | real * | in, | |
real * | rawout1, | |||
real * | rawout2, | |||
real * | wi, | |||
real * | ts | |||
) | [static] |
Definition at line 1347 of file layer3.c.
References DCT12_PART1, DCT12_PART2, real, SBLIMIT, and tfcos12.
Referenced by III_hybrid().
static void dct36 | ( | real * | inbuf, | |
real * | o1, | |||
real * | o2, | |||
real * | wintab, | |||
real * | tsbuf | |||
) | [static] |
int do_layer3 | ( | PMPSTR | mp, | |
unsigned char * | pcm_sample, | |||
int * | pcm_point, | |||
int(*)(PMPSTR, real *, unsigned char *, int *) | synth_1to1_mono_ptr, | |||
int(*)(PMPSTR, real *, int, unsigned char *, int *) | synth_1to1_ptr | |||
) |
Definition at line 1583 of file layer3.c.
References plotting_data::big_values, plotting_data::bitrate, frame::bitrate_index, III_sideinfo::ch, plotting_data::crc, plotting_data::emph, frame::emphasis, frame::error_protection, mpstr_tag::fr, freqs, III_sideinfo::gr, plotting_data::i_stereo, III_antialias(), III_dequantize_sample(), III_get_scale_factors_1(), III_get_scale_factors_2(), III_hybrid(), III_i_stereo(), plotting_data::js, frame::lay, frame::lsf, III_sideinfo::main_data_begin, plotting_data::mainbits, plotting_data::maindata, gr_info_s::maxb, plotting_data::mixed, frame::mode, frame::mode_ext, MP3_ERR, mpg123_pinfo, plotting_data::mpg123blocktype, plotting_data::mpg123xr, MPG_MD_JOINT_STEREO, plotting_data::ms_stereo, plotting_data::padding, frame::padding, plotting_data::preflag, real, plotting_data::sampfreq, frame::sampling_frequency, SBLIMIT, plotting_data::scalefac_scale, plotting_data::scfsi, set_pointer(), plotting_data::sfb, plotting_data::sfb_s, plotting_data::sfbits, sideinfo, frame::single, SSLIMIT, frame::stereo, plotting_data::stereo, plotting_data::sub_gain, and tabsel_123.
Referenced by decode_header(), and decodeMP3_clipchoice().
Here is the call graph for this function:
int do_layer3_sideinfo | ( | PMPSTR | mp | ) |
Definition at line 1541 of file layer3.c.
References III_sideinfo::ch, mpstr_tag::fr, III_sideinfo::gr, III_get_side_info_1(), III_get_side_info_2(), frame::lsf, III_sideinfo::main_data_begin, frame::mode, frame::mode_ext, MPG_MD_JOINT_STEREO, frame::sampling_frequency, sideinfo, frame::single, and frame::stereo.
Referenced by decodeMP3_clipchoice().
Here is the call graph for this function:
static unsigned int get1bit | ( | PMPSTR | mp | ) | [static] |
Definition at line 110 of file layer3.c.
References mpstr_tag::bitindex, and mpstr_tag::wordpointer.
Referenced by III_get_side_info_1(), and III_get_side_info_2().
static void III_antialias | ( | real | xr[SBLIMIT][SSLIMIT], | |
struct gr_info_s * | gr_infos | |||
) | [static] |
Definition at line 1193 of file layer3.c.
References aa_ca, aa_cs, gr_info_s::block_type, ca, cs, gr_info_s::maxb, gr_info_s::mixed_block_flag, and real.
Referenced by do_layer3().
static int III_dequantize_sample | ( | PMPSTR | mp, | |
real | xr[SBLIMIT][SSLIMIT], | |||
int * | scf, | |||
struct gr_info_s * | gr_infos, | |||
int | sfreq, | |||
int | part2bits | |||
) | [static] |
Definition at line 666 of file layer3.c.
References gr_info_s::big_values, gr_info_s::block_type, map, mapend, gr_info_s::mixed_block_flag, gr_info_s::part2_3_length, real, gr_info_s::region1start, gr_info_s::region2start, SBLIMIT, and gr_info_s::scalefac_scale.
Referenced by do_layer3().
Definition at line 521 of file layer3.c.
References gr_info_s::block_type, getbits_fast(), gr_info_s::mixed_block_flag, gr_info_s::scalefac_compress, and gr_info_s::scfsi.
Referenced by do_layer3().
Here is the call graph for this function:
static int III_get_scale_factors_2 | ( | PMPSTR | mp, | |
int * | scf, | |||
struct gr_info_s * | gr_infos, | |||
int | i_stereo | |||
) | [static] |
Definition at line 607 of file layer3.c.
References gr_info_s::block_type, getbits_fast(), i_slen2, gr_info_s::mixed_block_flag, n_slen2, gr_info_s::preflag, and gr_info_s::scalefac_compress.
Referenced by do_layer3().
Here is the call graph for this function:
static void III_get_side_info_1 | ( | PMPSTR | mp, | |
struct III_sideinfo * | si, | |||
int | stereo, | |||
int | ms_stereo, | |||
long | sfreq, | |||
int | single | |||
) | [static] |
Definition at line 324 of file layer3.c.
References bandInfo, III_sideinfo::ch, gainpow2, get1bit(), getbits(), getbits_fast(), III_sideinfo::gr, bandInfoStruct::longIdx, III_sideinfo::main_data_begin, mpg123_pinfo, III_sideinfo::private_bits, plotting_data::qss, gr_info_s::scfsi, and plotting_data::sub_gain.
Referenced by do_layer3_sideinfo().
Here is the call graph for this function:
static void III_get_side_info_2 | ( | PMPSTR | mp, | |
struct III_sideinfo * | si, | |||
int | stereo, | |||
int | ms_stereo, | |||
long | sfreq, | |||
int | single | |||
) | [static] |
Definition at line 420 of file layer3.c.
References III_sideinfo::ch, gainpow2, get1bit(), getbits(), getbits_fast(), III_sideinfo::gr, III_sideinfo::main_data_begin, mpg123_pinfo, III_sideinfo::private_bits, plotting_data::qss, and plotting_data::sub_gain.
Referenced by do_layer3_sideinfo().
Here is the call graph for this function:
static void III_hybrid | ( | PMPSTR | mp, | |
real | fsIn[SBLIMIT][SSLIMIT], | |||
real | tsOut[SSLIMIT][SBLIMIT], | |||
int | ch, | |||
struct gr_info_s * | gr_infos | |||
) | [static] |
Definition at line 1487 of file layer3.c.
References gr_info_s::block_type, dct12(), dct36(), mpstr_tag::hybrid_blc, mpstr_tag::hybrid_block, gr_info_s::maxb, gr_info_s::mixed_block_flag, real, win, and win1.
Referenced by do_layer3().
Here is the call graph for this function:
static void III_i_stereo | ( | real | xr_buf[2][SBLIMIT][SSLIMIT], | |
int * | scalefac, | |||
struct gr_info_s * | gr_infos, | |||
int | sfreq, | |||
int | ms_stereo, | |||
int | lsf | |||
) | [static] |
Definition at line 1049 of file layer3.c.
References bandInfo, gr_info_s::block_type, gr_info_s::maxband, gr_info_s::mixed_block_flag, pow1_1, pow1_2, pow2_1, pow2_2, real, SBLIMIT, gr_info_s::scalefac_compress, bandInfoStruct::shortDiff, bandInfoStruct::shortIdx, tan1_1, tan1_2, tan2_1, and tan2_2.
Referenced by do_layer3().
void init_layer3 | ( | int | down_sample_sblimit | ) |
Definition at line 128 of file layer3.c.
References aa_ca, aa_cs, bandInfo, COS1, COS6_1, COS6_2, COS9, gainpow2, i, i_slen2, ispow, bandInfoStruct::longIdx, longLimit, map, mapbuf0, mapbuf1, mapbuf2, mapend, n_slen2, pow1_1, pow1_2, pow2_1, pow2_2, bandInfoStruct::shortIdx, shortLimit, tan1_1, tan1_2, tan2_1, tan2_2, tfcos12, tfcos36, win, and win1.
Referenced by InitMP3().
real aa_ca[8] [static] |
real aa_cs[8] [static] |
struct bandInfoStruct bandInfo[9] |
Definition at line 50 of file layer3.c.
Referenced by III_get_side_info_1(), III_i_stereo(), and init_layer3().
real COS1[12][6] [static] |
real COS6_1 [static] |
real COS6_2 [static] |
real COS9[9] [static] |
real gainpow2[256+118+4] [static] |
Definition at line 34 of file layer3.c.
Referenced by III_get_side_info_1(), III_get_side_info_2(), and init_layer3().
unsigned int i_slen2[256] [static] |
Definition at line 105 of file layer3.c.
Referenced by III_get_scale_factors_2(), and init_layer3().
real ispow[8207] [static] |
int longLimit[9][23] [static] |
int* map[9][3] [static] |
int mapbuf0[9][152] [static] |
int mapbuf1[9][156] [static] |
int mapbuf2[9][44] [static] |
int* mapend[9][3] [static] |
unsigned int n_slen2[512] [static] |
Definition at line 104 of file layer3.c.
Referenced by III_get_scale_factors_2(), and init_layer3().
real pow1_1[2][16] [static] |
real pow1_2[2][16] [static] |
real pow2_1[2][16] [static] |
real pow2_2[2][16] [static] |
const 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] |
const 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] |
int shortLimit[9][14] [static] |
struct III_sideinfo sideinfo |
real tan1_1[16] [static] |
real tan1_2[16] [static] |
real tan2_1[16] [static] |
real tan2_2[16] [static] |
real tfcos12[3] [static] |
real tfcos36[9] [static] |
real win[4][36] [static] |
Definition at line 32 of file layer3.c.
Referenced by III_hybrid(), init_layer3(), mdct_short(), and mdct_sub48().
real win1[4][36] [static] |