[FFmpeg-soc] [soc]: r4734 - jpeg2000/j2kdec.c

jai_menon subversion at mplayerhq.hu
Mon Jul 20 15:33:15 CEST 2009


Author: jai_menon
Date: Mon Jul 20 15:33:15 2009
New Revision: 4734

Log:
100l : take component (dx,dy) into account when copying pixels.

Modified:
   jpeg2000/j2kdec.c

Modified: jpeg2000/j2kdec.c
==============================================================================
--- jpeg2000/j2kdec.c	Mon Jul 20 15:08:30 2009	(r4733)
+++ jpeg2000/j2kdec.c	Mon Jul 20 15:33:15 2009	(r4734)
@@ -795,13 +795,13 @@ static int decode_tile(J2kDecoderContext
         for (compno = 0; compno < s->ncomponents; compno++){
             y = tile->comp[compno].coord[1][0] - s->image_offset_y;
             line = s->picture.data[0] + y * s->picture.linesize[0];
-            for (; y < tile->comp[compno].coord[1][1] - s->image_offset_y; y++){
+            for (; y < tile->comp[compno].coord[1][1] - s->image_offset_y; y += s->cdy[compno]){
                 uint8_t *dst;
 
                 x = tile->comp[compno].coord[0][0] - s->image_offset_x;
                 dst = line + x * s->ncomponents + compno;
 
-                for (; x < tile->comp[compno].coord[0][1] - s->image_offset_x; x++) {
+                for (; x < tile->comp[compno].coord[0][1] - s->image_offset_x; x += s->cdx[compno]) {
                     *src[compno] += 1 << (s->cbps[compno]-1);
                     if (*src[compno] < 0)
                         *src[compno] = 0;
@@ -817,11 +817,11 @@ static int decode_tile(J2kDecoderContext
         for (compno = 0; compno < s->ncomponents; compno++) {
             y = tile->comp[compno].coord[1][0] - s->image_offset_y;
             line = s->picture.data[0] + y * s->picture.linesize[0];
-            for (; y < tile->comp[compno].coord[1][1] - s->image_offset_y; y++) {
+            for (; y < tile->comp[compno].coord[1][1] - s->image_offset_y; y += s->cdy[compno]) {
                 uint16_t *dst;
                 x = tile->comp[compno].coord[0][0] - s->image_offset_x;
                 dst = line + (x * s->ncomponents + compno) * 2;
-                for (; x < tile->comp[compno].coord[0][1] - s->image_offset_x; x++) {
+                for (; x < tile->comp[compno].coord[0][1] - s->image_offset_x; x += s-> cdx[compno]) {
                     int32_t val;
                     val = *src[compno]++ << (16 - s->cbps[compno]);
                     val += 1 << 15;


More information about the FFmpeg-soc mailing list