A
download mpegaudiotab.h
Language: C
Copyright: (c) 2000, 2001 Fabrice Bellard.
LOC: 63
Project Info
avidemux
Server: BerliOS
Type: cvs
...emux\avidemux\adm_lavcodec\
   .cvsignore
   4xm.c
   8bps.c
   a52dec.c
   ac3.h
   ac3dec.c
   ac3enc.c
   ac3tab.h
   adpcm.c
   adx.c
   allcodecs.c
   amr.c
   apiexample.c
   asv1.c
   avcodec.c
   avcodec.h
   bitstream.c
   bitstream.h
   bswap.h
   cabac.c
   cabac.h
   cinepak.c
   cljr.c
   common.c
   common.h
   config.mak
   cyuv.c
   dct-test.c
   dpcm.c
   dsputil.c
   dsputil.h
   dtsdec.c
   dv.c
   dvdata.h
   error_resilience.c
   eval.c
   faac.c
   faad.c
   faandct.c
   faandct.h
   fastmemcpy.h
   fdctref.c
   fft-test.c
   fft.c
   ffv1.c
   flac.c
   flicvideo.c
   g726.c
   golomb.c
   golomb.h
   h261.c
   h261data.h
   h263.c
   h263data.h
   h263dec.c
   h264.c
   h264data.h
   h264idct.c
   huffyuv.c
   idcinvideo.c
   imgconvert.c
   imgconvert_template.h
   imgresample.c
   indeo3.c
   indeo3data.h
   integer.c
   integer.h
   interplayvideo.c
   jfdctfst.c
   jfdctint.c
   jrevdct.c
   lcl.c
   mace.c
   Makefile.am
   mdct.c
   mdec.c
   mem.c
   mjpeg.c
   motion_est.c
   motion_est_template.c
   motion_test.c
   mp3lameaudio.c
   mpeg12.c
   mpeg12data.h
   mpeg4data.h
   mpegaudio.c
   mpegaudio.h
   mpegaudiodec.c
   mpegaudiodectab.h
   mpegaudiotab.h
   mpegvideo.c
   mpegvideo.h
   msmpeg4.c
   msmpeg4data.h
   msrle.c
   msvideo1.c
   oggvorbis.c
   oggvorbis.h
   opts.c
   os_support.h
   parser.c
   pcm.c
   pthread.c
   qtrle.c
   ra144.c
   ra144.h
   ra288.c
   ra288.h
   rangecoder.c
   rangecoder.h
   ratecontrol.c
   rational.c
   rational.h
   raw.c
   resample.c
   resample2.c
   roqvideo.c
   rpza.c
   rv10.c
   simple_idct.c
   simple_idct.h
   smc.c
   snow.c
   sonic.c
   sp5x.h
   svq1.c
   svq1_cb.h
   svq1_vlc.h
   svq3.c
   truemotion1.c
   truemotion1data.h
   tscc.c
   utils.c
   vcr1.c
   vmdav.c
   vp3.c
   vp3data.h
   vp3dsp.c
   vqavideo.c
   w32thread.c
   wmadata.h
   wmadec.c
   wmv2.c
   xan.c
   xvmcvideo.c

/*
 * mpeg audio layer 2 tables. Most of them come from the mpeg audio
 * specification.
 * 
 * Copyright (c) 2000, 2001 Fabrice Bellard.
 *
 * The licence of this code is contained in file LICENCE found in the
 * same archive 
 */

/**
 * @file mpegaudiotab.h
 * mpeg audio layer 2 tables. 
 * Most of them come from the mpeg audio specification.
 */
 
#define SQRT2 1.41421356237309514547

static const int costab32[30] = {
    FIX(0.54119610014619701222),
    FIX(1.3065629648763763537),
    
    FIX(0.50979557910415917998),
    FIX(2.5629154477415054814),
    FIX(0.89997622313641556513),
    FIX(0.60134488693504528634),
    
    FIX(0.5024192861881556782),
    FIX(5.1011486186891552563),
    FIX(0.78815462345125020249),
    FIX(0.64682178335999007679),
    FIX(0.56694403481635768927),
    FIX(1.0606776859903470633),
    FIX(1.7224470982383341955),
    FIX(0.52249861493968885462),
    
    FIX(10.19000812354803287),
    FIX(0.674808341455005678),
    FIX(1.1694399334328846596),
    FIX(0.53104259108978413284),
    FIX(2.0577810099534108446),
    FIX(0.58293496820613388554),
    FIX(0.83934964541552681272),
    FIX(0.50547095989754364798),
    FIX(3.4076084184687189804),
    FIX(0.62250412303566482475),
    FIX(0.97256823786196078263),
    FIX(0.51544730992262455249),
    FIX(1.4841646163141661852),
    FIX(0.5531038960344445421),
    FIX(0.74453627100229857749),
    FIX(0.5006029982351962726),
};

static const int bitinv32[32] = {
    0,  16,  8, 24,  4,  20,  12,  28,
    2,  18, 10, 26,  6,  22,  14,  30,
    1,  17,  9, 25,  5,  21,  13,  29,
    3,  19, 11, 27,  7,  23,  15,  31
};


static int16_t filter_bank[512];

static int scale_factor_table[64];
#ifdef USE_FLOATS
static float scale_factor_inv_table[64];
#else
static int8_t scale_factor_shift[64];
static unsigned short scale_factor_mult[64];
#endif
static unsigned char scale_diff_table[128];

/* total number of bits per allocation group */
static unsigned short total_quant_bits[17];

/* signal to noise ratio of each quantification step (could be
   computed from quant_steps[]). The values are dB multiplied by 10 
*/
static unsigned short quant_snr[17] = { 
     70, 110, 160, 208,
    253, 316, 378, 439,
    499, 559, 620, 680, 
    740, 800, 861, 920, 
    980
};

/* fixed psycho acoustic model. Values of SNR taken from the 'toolame'
   project */
static const float fixed_smr[SBLIMIT] =  {
    30, 17, 16, 10, 3, 12, 8, 2.5,
    5, 5, 6, 6, 5, 6, 10, 6,
    -4, -10, -21, -30, -42, -55, -68, -75,
    -75, -75, -75, -75, -91, -107, -110, -108
};

static const unsigned char nb_scale_factors[4] = { 3, 2, 1, 2 };

About Koders | Resources | Downloads | Support | Black Duck | Terms of Service | DMCA | Privacy Policy | Contact Us