[FFmpeg-cvslog] avcodec/jpeg2000: Support 32 decomposition levels

Michael Niedermayer git at videolan.org
Sun Jun 28 04:57:04 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jun 28 03:16:06 2015 +0200| [317be53ca626bc0467aac04245b0d4450e46ef50] | committer: Michael Niedermayer

avcodec/jpeg2000: Support 32 decomposition levels

Fixes Ticket4680

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=317be53ca626bc0467aac04245b0d4450e46ef50
---

 libavcodec/jpeg2000.c |    2 +-
 libavcodec/jpeg2000.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/jpeg2000.c b/libavcodec/jpeg2000.c
index 2a45089..b60e770 100644
--- a/libavcodec/jpeg2000.c
+++ b/libavcodec/jpeg2000.c
@@ -363,7 +363,7 @@ int ff_jpeg2000_init_component(Jpeg2000Component *comp,
                         /* Formula example for tbx_0 = ceildiv((tcx_0 - 2 ^ (declvl - 1) * x0_b) / declvl) */
                         band->coord[i][j] =
                             ff_jpeg2000_ceildivpow2(comp->coord_o[i][j] -
-                                                    (((bandno + 1 >> i) & 1) << declvl - 1),
+                                                    (((bandno + 1 >> i) & 1LL) << declvl - 1),
                                                     declvl);
                 /* TODO: Manage case of 3 band offsets here or
                  * in coding/decoding function? */
diff --git a/libavcodec/jpeg2000.h b/libavcodec/jpeg2000.h
index 541ea5c..7a21c4e 100644
--- a/libavcodec/jpeg2000.h
+++ b/libavcodec/jpeg2000.h
@@ -67,7 +67,7 @@ enum Jpeg2000Quantsty { // quantization style
     JPEG2000_QSTY_SE    // scalar expounded
 };
 
-#define JPEG2000_MAX_DECLEVELS 32
+#define JPEG2000_MAX_DECLEVELS 33
 #define JPEG2000_MAX_RESLEVELS (JPEG2000_MAX_DECLEVELS + 1)
 
 #define JPEG2000_MAX_PASSES 100



More information about the ffmpeg-cvslog mailing list