[FFmpeg-cvslog] avcodec/jpeg2000: Fix regression with multiple tiles

Michael Niedermayer git at videolan.org
Sun Jun 14 23:00:54 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jun 14 21:05:38 2015 +0200| [ec5164aa310ebcdb5ddb513d56cb72b847a84cda] | committer: Michael Niedermayer

avcodec/jpeg2000: Fix regression with multiple tiles

Fixes Ticket 4624

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

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

 libavcodec/jpeg2000.c |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/libavcodec/jpeg2000.c b/libavcodec/jpeg2000.c
index d2dbffa..427f6f7 100644
--- a/libavcodec/jpeg2000.c
+++ b/libavcodec/jpeg2000.c
@@ -402,13 +402,14 @@ int ff_jpeg2000_init_component(Jpeg2000Component *comp,
                 prec->coord[1][1] = FFMIN(prec->coord[1][1], band->coord[1][1]);
 
                 prec->nb_codeblocks_width =
-                    ff_jpeg2000_ceildivpow2(prec->coord[0][1] -
-                                            prec->coord[0][0],
-                                            band->log2_cblk_width);
+                    ff_jpeg2000_ceildivpow2(prec->coord[0][1],
+                                            band->log2_cblk_width)
+                    - (prec->coord[0][0] >> band->log2_cblk_width);
                 prec->nb_codeblocks_height =
-                    ff_jpeg2000_ceildivpow2(prec->coord[1][1] -
-                                            prec->coord[1][0],
-                                            band->log2_cblk_height);
+                    ff_jpeg2000_ceildivpow2(prec->coord[1][1],
+                                            band->log2_cblk_height)
+                    - (prec->coord[1][0] >> band->log2_cblk_height);
+
 
                 /* Tag trees initialization */
                 prec->cblkincl =



More information about the ffmpeg-cvslog mailing list