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

k.nowosad subversion at mplayerhq.hu
Sat Aug 25 12:54:06 CEST 2007


Author: k.nowosad
Date: Sat Aug 25 12:54:06 2007
New Revision: 1186

Log:
renamed p and q variables in init_tile


Modified:
   jpeg2000/j2kdec.c

Modified: jpeg2000/j2kdec.c
==============================================================================
--- jpeg2000/j2kdec.c	(original)
+++ jpeg2000/j2kdec.c	Sat Aug 25 12:54:06 2007
@@ -386,12 +386,11 @@ static uint8_t get_sot(J2kDecoderContext
 
 static int init_tile(J2kDecoderContext *s, int tileno)
 {
-    int compno, p, q;
+    int compno,
+        tilex = tileno % s->numXtiles,
+        tiley = tileno / s->numXtiles;
     J2kTile *tile = s->tile + tileno;
 
-    p = tileno % s->numXtiles;
-    q = tileno / s->numXtiles;
-
     if (!tile->comp)
         return AVERROR(ENOMEM);
     for (compno = 0; compno < s->ncomponents; compno++){
@@ -400,10 +399,10 @@ static int init_tile(J2kDecoderContext *
         J2kQuantStyle  *qntsty = tile->qntsty + compno;
         int gbandno = 0, ret; // global bandno
 
-        comp->x0 = FFMAX(p * s->tile_width + s->tile_offset_x, s->image_offset_x);
-        comp->x1 = FFMIN((p+1)*s->tile_width + s->tile_offset_x, s->width);
-        comp->y0 = FFMAX(q * s->tile_height + s->tile_offset_y, s->image_offset_y);
-        comp->y1 = FFMIN((q+1)*s->tile_height + s->tile_offset_y, s->height);
+        comp->x0 = FFMAX(tilex * s->tile_width + s->tile_offset_x, s->image_offset_x);
+        comp->x1 = FFMIN((tilex+1)*s->tile_width + s->tile_offset_x, s->width);
+        comp->y0 = FFMAX(tiley * s->tile_height + s->tile_offset_y, s->image_offset_y);
+        comp->y1 = FFMIN((tiley+1)*s->tile_height + s->tile_offset_y, s->height);
 
         if (ret = ff_j2k_init_component(comp, codsty, qntsty, s->cbps[compno]))
             return ret;



More information about the FFmpeg-soc mailing list