mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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>
This commit is contained in:
parent
cafefd889b
commit
036e6c37d3
@ -106,8 +106,8 @@ static int cng_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
float scaling;
|
float scaling;
|
||||||
|
|
||||||
if (avpkt->size) {
|
if (avpkt->size) {
|
||||||
float dbov = -avpkt->data[0] / 10.0;
|
int dbov = -avpkt->data[0];
|
||||||
p->target_energy = 1081109975 * pow(10, dbov) * 0.75;
|
p->target_energy = 1081109975 * pow(10, dbov / 10.0) * 0.75;
|
||||||
memset(p->target_refl_coef, 0, p->order * sizeof(*p->target_refl_coef));
|
memset(p->target_refl_coef, 0, p->order * sizeof(*p->target_refl_coef));
|
||||||
for (i = 0; i < FFMIN(avpkt->size - 1, p->order); i++) {
|
for (i = 0; i < FFMIN(avpkt->size - 1, p->order); i++) {
|
||||||
p->target_refl_coef[i] = (avpkt->data[1 + i] - 127) / 128.0;
|
p->target_refl_coef[i] = (avpkt->data[1 + i] - 127) / 128.0;
|
||||||
|
Loading…
Reference in New Issue
Block a user