[FFmpeg-soc] [soc]: r2980 - nellyenc/nellymoserenc.c
bwolowiec
subversion at mplayerhq.hu
Sat Aug 2 00:23:38 CEST 2008
Author: bwolowiec
Date: Sat Aug 2 00:23:38 2008
New Revision: 2980
Log:
change use of precalculated values in pow_table
Modified:
nellyenc/nellymoserenc.c
Modified: nellyenc/nellymoserenc.c
==============================================================================
--- nellyenc/nellymoserenc.c (original)
+++ nellyenc/nellymoserenc.c Sat Aug 2 00:23:38 2008
@@ -24,7 +24,7 @@
#include "avcodec.h"
#include "dsputil.h"
-#define MAX_POW_CACHED (1<<15)
+#define MAX_POW_CACHED (1<<11)
/*
* FIXME: Bitstream from vorbis_enc.c (move to seperate file?)
@@ -207,8 +207,8 @@ static void encode_block(NellyMoserEncod
val = ff_nelly_init_table[bk];
}
- if(val >= 0 && val < MAX_POW_CACHED){
- pval = s->pow_table[val];
+ if(val >= 0){
+ pval = s->pow_table[val&0x7FF] / (1<<(val>>11)) ;
}else{
pval = -pow(2, -val/2048.0 - 3.0);
}
More information about the FFmpeg-soc
mailing list