[FFmpeg-soc] [soc]: r1545 - amr/amrnbfloatdec.c
superdump
subversion at mplayerhq.hu
Mon Dec 10 17:14:15 CET 2007
Author: superdump
Date: Mon Dec 10 17:14:14 2007
New Revision: 1545
Log:
The original values were Q15 so convert them to float properly.
Modified:
amr/amrnbfloatdec.c
Modified: amr/amrnbfloatdec.c
==============================================================================
--- amr/amrnbfloatdec.c (original)
+++ amr/amrnbfloatdec.c Mon Dec 10 17:14:14 2007
@@ -93,30 +93,30 @@ static void reset_state(AMRContext *p) {
// initialise values for the lsp vector from the 4th subframe of the
// previous subframe values
- // taken from Decoder_amr_reset using (val<<10)/16777216.0
- p->prev_lsp_sub4[0] = 1.8310546875;
- p->prev_lsp_sub4[1] = 1.5869140625;
- p->prev_lsp_sub4[2] = 1.28173828125;
- p->prev_lsp_sub4[3] = 0.91552734375;
- p->prev_lsp_sub4[4] = 0.48828125;
- p->prev_lsp_sub4[5] = 0;
- p->prev_lsp_sub4[6] = -0.48828125;
- p->prev_lsp_sub4[7] = -0.91552734375;
- p->prev_lsp_sub4[8] = -1.28173828125;
- p->prev_lsp_sub4[9] = -1.5869140625;
+ // taken from Decoder_amr_reset using val/(float)(1<<15)
+ p->prev_lsp_sub4[0] = 0.91552734375;
+ p->prev_lsp_sub4[1] = 0.79345703125;
+ p->prev_lsp_sub4[2] = 0.640869140625;
+ p->prev_lsp_sub4[3] = 0.457763671875;
+ p->prev_lsp_sub4[4] = 0.244140625;
+ p->prev_lsp_sub4[5] = 0.0;
+ p->prev_lsp_sub4[6] = -0.244140625;
+ p->prev_lsp_sub4[7] = -0.457763671875;
+ p->prev_lsp_sub4[8] = -0.640869140625;
+ p->prev_lsp_sub4[9] = -0.79345703125;
// initialise mean lsp values
- // taken from Decoder_amr_reset using (val<<10)/16777216.0
- p->lsp_avg[0] = 0.08447265625;
- p->lsp_avg[1] = 0.12677001953125;
- p->lsp_avg[2] = 0.208740234375;
- p->lsp_avg[3] = 0.311767578125;
- p->lsp_avg[4] = 0.4114990234375;
- p->lsp_avg[5] = 0.4957275390625;
- p->lsp_avg[6] = 0.60198974609375;
- p->lsp_avg[7] = 0.677001953125;
- p->lsp_avg[8] = 0.7760009765625;
- p->lsp_avg[9] = 0.83624267578125;
+ // taken from Decoder_amr_reset using val/(float)(1<<15)
+ p->lsp_avg[0] = 0.042236328125;
+ p->lsp_avg[1] = 0.063385009765625;
+ p->lsp_avg[2] = 0.1043701171875;
+ p->lsp_avg[3] = 0.1558837890625;
+ p->lsp_avg[4] = 0.20574951171875;
+ p->lsp_avg[5] = 0.24786376953125;
+ p->lsp_avg[6] = 0.300994873046875;
+ p->lsp_avg[7] = 0.3385009765625;
+ p->lsp_avg[8] = 0.38800048828125;
+ p->lsp_avg[9] = 0.418121337890625;
for(i=0; i<4; i++) {
p->prediction_error[i] = MIN_ENERGY;
More information about the FFmpeg-soc
mailing list