📄 mp3dec_layer1_fp.c
字号:
/*////////////////////////////////////////////////////////////////////////////////// INTEL CORPORATION PROPRIETARY INFORMATION// This software is supplied under the terms of a license agreement or// nondisclosure agreement with Intel Corporation and may not be copied// or disclosed except in accordance with the terms of that agreement.// Copyright(c) 2003-2005 Intel Corporation. All Rights Reserved.//*/#include "mp3dec_own_fp.h"static float mp3dec_l1_dequant_table[] = { 0, 2.03450527e-05f, 1.74386169e-05f, 1.62760425e-05f, 1.57510076e-05f, 1.55009930e-05f, 1.53789370e-05f, 1.53186284e-05f, 1.52886496e-05f, 1.52737048e-05f, 1.52662433e-05f, 1.52625162e-05f, 1.52606517e-05f, 1.52597204e-05f, 1.52592547e-05f,};int mp3dec_decode_data_LayerI(MP3Dec *state){ int i, ch, sb; float *pSampl[2]; float scale; int (*sample)[32][36] = state->com.sample; short (*scalefactor)[32] = state->com.scalefactor_l1; short (*allocation)[32] = state->com.allocation; samplefloatrw *smpl_rw = state->smpl_rw; // out of imdct samplefloat *smpl_sb = state->smpl_sb; // out of subband synth int stereo = state->com.stereo; short *m_pOutSamples = state->com.m_pOutSamples; pSampl[0] = (*smpl_sb)[0]; pSampl[1] = (*smpl_sb)[1]; for (ch = 0; ch < stereo; ch++) { for (sb = 0; sb < 32; sb++) { if (allocation[ch][sb] != 0) { int idx = allocation[ch][sb] + 1; int xor_coef; int *sample_ptr = &sample[ch][sb][0]; xor_coef = (1 << (idx - 1)); scale = mp3dec_scale_values[scalefactor[ch][sb]] * mp3dec_l1_dequant_table[allocation[ch][sb]]; for (i = 0; i < 12; i++) { (*smpl_rw)[ch][i][sb] = ((float)(((sample_ptr[i] ^ xor_coef) + 1) << (32 - idx))) * scale; } } else { for (i = 0; i < 12; i++) { (*smpl_rw)[ch][i][sb] = 0; } } } // for sb mp3dec_SubBandSynth(state, ch, 12); } // for ch ippsJoin_32f16s_D2L((const float **)pSampl, stereo, 384, m_pOutSamples); return 1;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -