diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-05-30 19:46:39 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-05-31 02:22:10 +0200 |
commit | 7a2b6342205b77f4b716ca0c4743a2600f242d2a (patch) | |
tree | 890c80aadfa471e97bd3f065d37bcffdb7c73f32 /libavcodec | |
parent | f468325d34899a9b44ac6a38b24c6a9426682a28 (diff) | |
download | ffmpeg-7a2b6342205b77f4b716ca0c4743a2600f242d2a.tar.gz |
jpeg2000dec: simplify init_tile() / merge from j2k
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/jpeg2000dec.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c index 7fc704ba5a..c0bbc09fc5 100644 --- a/libavcodec/jpeg2000dec.c +++ b/libavcodec/jpeg2000dec.c @@ -518,8 +518,6 @@ static int init_tile(Jpeg2000DecoderContext *s, int tileno) int tilex = tileno % s->numXtiles; int tiley = tileno / s->numXtiles; Jpeg2000Tile *tile = s->tile + tileno; - Jpeg2000CodingStyle *codsty; - Jpeg2000QuantStyle *qntsty; if (!tile->comp) return AVERROR(ENOMEM); @@ -527,14 +525,14 @@ static int init_tile(Jpeg2000DecoderContext *s, int tileno) /* copy codsty, qnsty to tile. TODO: Is it the best way? * codsty, qnsty is an array of 4 structs Jpeg2000CodingStyle * and Jpeg2000QuantStyle */ - memcpy(tile->codsty, s->codsty, s->ncomponents * sizeof(*codsty)); - memcpy(tile->qntsty, s->qntsty, s->ncomponents * sizeof(*qntsty)); + memcpy(tile->codsty, s->codsty, s->ncomponents * sizeof(*tile->codsty)); + memcpy(tile->qntsty, s->qntsty, s->ncomponents * sizeof(*tile->qntsty)); for (compno = 0; compno < s->ncomponents; compno++) { Jpeg2000Component *comp = tile->comp + compno; + Jpeg2000CodingStyle *codsty = tile->codsty + compno; + Jpeg2000QuantStyle *qntsty = tile->qntsty + compno; int ret; // global bandno - codsty = tile->codsty + compno; - qntsty = tile->qntsty + compno; comp->coord_o[0][0] = FFMAX(tilex * s->tile_width + s->tile_offset_x, s->image_offset_x); comp->coord_o[0][1] = FFMIN((tilex + 1) * s->tile_width + s->tile_offset_x, s->width); |