Commit 47313bbb authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/dcadec: remove fishy FFMAX()

These where intended to maintain the previous behavior before dca_dmix_code()
but it is unclear (to me) which way is correct and no sample seem to trigger
the case, also they are incomplete for the purprose of error checking
Found-by: 's avatarNiels Möller <nisse@lysator.liu.se>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 6a0f9f27
...@@ -601,7 +601,7 @@ static int dca_parse_audio_coding_header(DCAContext *s, int base_channel, ...@@ -601,7 +601,7 @@ static int dca_parse_audio_coding_header(DCAContext *s, int base_channel,
if (get_bits1(&s->gb)) { if (get_bits1(&s->gb)) {
embedded_downmix = get_bits1(&s->gb); embedded_downmix = get_bits1(&s->gb);
coeff = get_bits(&s->gb, 6); coeff = get_bits(&s->gb, 6);
scale_factor = -1.0f / dca_dmix_code(FFMAX(coeff<<2, 4)-3); scale_factor = -1.0f / dca_dmix_code((coeff<<2)-3);
s->xxch_dmix_sf[s->xxch_chset] = scale_factor; s->xxch_dmix_sf[s->xxch_chset] = scale_factor;
...@@ -622,7 +622,7 @@ static int dca_parse_audio_coding_header(DCAContext *s, int base_channel, ...@@ -622,7 +622,7 @@ static int dca_parse_audio_coding_header(DCAContext *s, int base_channel,
coeff = get_bits(&s->gb, 7); coeff = get_bits(&s->gb, 7);
ichan = dca_xxch2index(s, 1 << i); ichan = dca_xxch2index(s, 1 << i);
s->xxch_dmix_coeff[j][ichan] = dca_dmix_code(FFMAX(coeff<<2, 3)-3); s->xxch_dmix_coeff[j][ichan] = dca_dmix_code((coeff<<2)-3);
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment