comparison libopenjpeg.c @ 9714:5df11d49abb7 libavcodec

Use dimensions stored in AVCodecContext instead of local variables.
author jai_menon
date Tue, 26 May 2009 16:59:05 +0000
parents 54bc8a2727b0
children 997d2de9cd84
comparison
equal deleted inserted replaced
9713:d762f9979193 9714:5df11d49abb7
142 142
143 for(x = 0; x < image->numcomps; x++) { 143 for(x = 0; x < image->numcomps; x++) {
144 adjust[x] = FFMAX(image->comps[x].prec - 8, 0); 144 adjust[x] = FFMAX(image->comps[x].prec - 8, 0);
145 } 145 }
146 146
147 for(y = 0; y < height; y++) { 147 for(y = 0; y < avctx->height; y++) {
148 index = y*width; 148 index = y*avctx->width;
149 img_ptr = picture->data[0] + y*picture->linesize[0]; 149 img_ptr = picture->data[0] + y*picture->linesize[0];
150 for(x = 0; x < width; x++, index++) { 150 for(x = 0; x < avctx->width; x++, index++) {
151 *img_ptr++ = image->comps[0].data[index] >> adjust[0]; 151 *img_ptr++ = image->comps[0].data[index] >> adjust[0];
152 if(image->numcomps > 2 && check_image_attributes(image)) { 152 if(image->numcomps > 2 && check_image_attributes(image)) {
153 *img_ptr++ = image->comps[1].data[index] >> adjust[1]; 153 *img_ptr++ = image->comps[1].data[index] >> adjust[1];
154 *img_ptr++ = image->comps[2].data[index] >> adjust[2]; 154 *img_ptr++ = image->comps[2].data[index] >> adjust[2];
155 if(has_alpha) 155 if(has_alpha)