diff options
author | Martin Storsjö <martin@martin.st> | 2012-10-30 11:56:54 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2012-10-30 16:51:21 +0200 |
commit | 036e6c37d31e471447f71decaea55996bde3d9a2 (patch) | |
tree | 57a612c5a83e5bd3ca66a51bb516eaae14293661 /libavcodec/cngdec.c | |
parent | cafefd889b9e9f36814dc4ca13ed169f667b41a4 (diff) | |
download | ffmpeg-036e6c37d31e471447f71decaea55996bde3d9a2.tar.gz |
cngdec: Make the dbov variable have the right unit
Previously the unit of the variable was Bov, not dBov.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/cngdec.c')
-rw-r--r-- | libavcodec/cngdec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/cngdec.c b/libavcodec/cngdec.c index c05bfd9578..fca4b9e94a 100644 --- a/libavcodec/cngdec.c +++ b/libavcodec/cngdec.c @@ -106,8 +106,8 @@ static int cng_decode_frame(AVCodecContext *avctx, void *data, float scaling; if (avpkt->size) { - float dbov = -avpkt->data[0] / 10.0; - p->target_energy = 1081109975 * pow(10, dbov) * 0.75; + int dbov = -avpkt->data[0]; + p->target_energy = 1081109975 * pow(10, dbov / 10.0) * 0.75; memset(p->target_refl_coef, 0, p->order * sizeof(*p->target_refl_coef)); for (i = 0; i < FFMIN(avpkt->size - 1, p->order); i++) { p->target_refl_coef[i] = (avpkt->data[1 + i] - 127) / 128.0; |