[FFmpeg-cvslog] avcodec/jpeg2000dwt: Fix special cases in sd_1d53()
Michael Niedermayer
git at videolan.org
Sat Jun 20 02:33:53 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Jun 20 01:40:17 2015 +0200| [a75ca3ca6a0dcafbd201216597f512e3ba59b652] | committer: Michael Niedermayer
avcodec/jpeg2000dwt: Fix special cases in sd_1d53()
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a75ca3ca6a0dcafbd201216597f512e3ba59b652
---
libavcodec/jpeg2000dwt.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libavcodec/jpeg2000dwt.c b/libavcodec/jpeg2000dwt.c
index d0cfc9a..e15f00e 100644
--- a/libavcodec/jpeg2000dwt.c
+++ b/libavcodec/jpeg2000dwt.c
@@ -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;
More information about the ffmpeg-cvslog
mailing list