1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

avcodec/jpeg2000dwt: Fix special cases in sd_1d53()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-06-20 01:40:17 +02:00
parent 0ce918c45b
commit a75ca3ca6a

View File

@ -84,8 +84,11 @@ static void sd_1d53(int *p, int i0, int i1)
{
int i;
if (i1 == i0 + 1)
if (i1 <= i0 + 1) {
if (i0 == 1)
p[1] <<= 1;
return;
}
extend53(p, i0, i1);
@ -110,8 +113,6 @@ static void dwt_encode53(DWTContext *s, int *t)
lp;
int *l;
av_assert1(!mh && !mv);
// VER_SD
l = line + mv;
for (lp = 0; lp < lh; lp++) {
@ -630,7 +631,6 @@ int main(void) {
for (i = 0; i < 40; i++) {
for (j=0; j<4; j++)
border[0][j] = av_lfg_get(&prng) % MAX_W;
border[0][0] = border [1][0] =0;
if (border[0][0] >= border[0][1] || border[1][0] >= border[1][1])
continue;
decomp_levels = av_lfg_get(&prng) % FF_DWT_MAX_DECLVLS;