diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-05-27 19:57:42 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-05-27 19:57:42 +0200 |
commit | 1bbb46ff7126d71256b710645acf6cbfad857a23 (patch) | |
tree | 4987f9ca056e5a41983117fd4b628fe8f44624f5 /libavcodec/j2k_dwt.c | |
parent | ee189701a6f7fec56570ee3728d5d80378cbadd3 (diff) | |
download | ffmpeg-1bbb46ff7126d71256b710645acf6cbfad857a23.tar.gz |
j2k_dwt: fix scaling of 9/7 dwt
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/j2k_dwt.c')
-rw-r--r-- | libavcodec/j2k_dwt.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/j2k_dwt.c b/libavcodec/j2k_dwt.c index 6f1457fc22..8494ecd9fc 100644 --- a/libavcodec/j2k_dwt.c +++ b/libavcodec/j2k_dwt.c @@ -160,9 +160,9 @@ static void dwt_encode97(DWTContext *s, int *t) // copy back and deinterleave for (i = mh; i < lh; i+=2, j++) - t[w*lp + j] = scale97[mh] * l[i] / 2; + t[w*lp + j] = scale97[0] * l[i] / 2; for (i = 1-mh; i < lh; i+=2, j++) - t[w*lp + j] = scale97[mh] * l[i] / 2; + t[w*lp + j] = scale97[1] * l[i] / 2; } // VER_SD @@ -177,9 +177,9 @@ static void dwt_encode97(DWTContext *s, int *t) // copy back and deinterleave for (i = mv; i < lv; i+=2, j++) - t[w*j + lp] = scale97[mv] * l[i] / 2; + t[w*j + lp] = scale97[0] * l[i] / 2; for (i = 1-mv; i < lv; i+=2, j++) - t[w*j + lp] = scale97[mv] * l[i] / 2; + t[w*j + lp] = scale97[1] * l[i] / 2; } } } @@ -288,9 +288,9 @@ static void dwt_decode97(DWTContext *s, int *t) int i, j = 0; // copy with interleaving for (i = mh; i < lh; i+=2, j++) - l[i] = scale97[1-mh] * t[w*lp + j]; + l[i] = scale97[1] * t[w*lp + j]; for (i = 1-mh; i < lh; i+=2, j++) - l[i] = scale97[1-mh] * t[w*lp + j]; + l[i] = scale97[0] * t[w*lp + j]; sr_1d97(line, mh, mh + lh); @@ -304,9 +304,9 @@ static void dwt_decode97(DWTContext *s, int *t) int i, j = 0; // copy with interleaving for (i = mv; i < lv; i+=2, j++) - l[i] = scale97[1-mv] * t[w*j + lp]; + l[i] = scale97[1] * t[w*j + lp]; for (i = 1-mv; i < lv; i+=2, j++) - l[i] = scale97[1-mv] * t[w*j + lp]; + l[i] = scale97[0] * t[w*j + lp]; sr_1d97(line, mv, mv + lv); |