[FFmpeg-cvslog] avcodec/nellymoserenc: use log2 instead of log()/M_LN2
Ganesh Ajjanagadde
git at videolan.org
Thu Oct 29 23:46:40 CET 2015
ffmpeg | branch: master | Ganesh Ajjanagadde <gajjanagadde at gmail.com> | Thu Oct 29 00:06:00 2015 -0400| [68ba63ebd5fa4e42423def1d8b0d38b5b8593e7f] | committer: Ganesh Ajjanagadde
avcodec/nellymoserenc: use log2 instead of log()/M_LN2
This is likely more precise and conveys the intent better.
Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=68ba63ebd5fa4e42423def1d8b0d38b5b8593e7f
---
libavcodec/nellymoserenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/nellymoserenc.c b/libavcodec/nellymoserenc.c
index d7368d0..d998dba 100644
--- a/libavcodec/nellymoserenc.c
+++ b/libavcodec/nellymoserenc.c
@@ -318,7 +318,7 @@ static void encode_block(NellyMoserEncodeContext *s, unsigned char *output, int
+ s->mdct_out[i + NELLY_BUF_LEN] * s->mdct_out[i + NELLY_BUF_LEN];
}
cand[band] =
- log(FFMAX(1.0, coeff_sum / (ff_nelly_band_sizes_table[band] << 7))) * 1024.0 / M_LN2;
+ log2(FFMAX(1.0, coeff_sum / (ff_nelly_band_sizes_table[band] << 7))) * 1024.0;
}
if (s->avctx->trellis) {
More information about the ffmpeg-cvslog
mailing list