Commit 34121ca1 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/jpeg2000dwt: Fix 9/7 IDWT for small sizes

Fixes Ticket4631
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 8294ec67
......@@ -357,8 +357,11 @@ static void sr_1d97_float(float *p, int i0, int i1)
{
int i;
if (i1 == i0 + 1)
if (i1 <= i0 + 1) {
if (i0 == 1)
p[1] *= F_LFTG_K/2;
return;
}
extend97_float(p, i0, i1);
......@@ -429,8 +432,11 @@ static void sr_1d97_int(int32_t *p, int i0, int i1)
{
int i;
if (i1 == i0 + 1)
if (i1 <= i0 + 1) {
if (i0 == 1)
p[1] = (p[1] * I_LFTG_K + (1<<16)) >> 17;
return;
}
extend97_int(p, i0, i1);
......
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