[FFmpeg-cvslog] jpeg2000: Speed up jpeg2000_decode_tile()
Michael Niedermayer
git at videolan.org
Wed Jul 3 16:42:40 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Jul 1 10:01:33 2013 +0200| [53d5d89c1b7534205e5f825918701dda56d18896] | committer: Luca Barbato
jpeg2000: Speed up jpeg2000_decode_tile()
Skip processing bands with dimension set to 0.
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=53d5d89c1b7534205e5f825918701dda56d18896
---
libavcodec/jpeg2000dec.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index 08c8c4d..6a300bd 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -1118,6 +1118,10 @@ static int jpeg2000_decode_tile(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile,
int cblkno = 0, bandpos;
bandpos = bandno + (reslevelno > 0);
+ if (band->coord[0][0] == band->coord[0][1] ||
+ band->coord[1][0] == band->coord[1][1])
+ continue;
+
nb_precincts = rlevel->num_precincts_x * rlevel->num_precincts_y;
/* Loop on precincts */
for (precno = 0; precno < nb_precincts; precno++) {
More information about the ffmpeg-cvslog
mailing list