mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-04 10:57:48 +00:00
Use dimensions stored in AVCodecContext instead of local variables.
Originally committed as revision 18954 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
34d11b875f
commit
d95545166c
1 changed files with 3 additions and 3 deletions
|
@ -144,10 +144,10 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx,
|
||||||
adjust[x] = FFMAX(image->comps[x].prec - 8, 0);
|
adjust[x] = FFMAX(image->comps[x].prec - 8, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(y = 0; y < height; y++) {
|
for(y = 0; y < avctx->height; y++) {
|
||||||
index = y*width;
|
index = y*avctx->width;
|
||||||
img_ptr = picture->data[0] + y*picture->linesize[0];
|
img_ptr = picture->data[0] + y*picture->linesize[0];
|
||||||
for(x = 0; x < width; x++, index++) {
|
for(x = 0; x < avctx->width; x++, index++) {
|
||||||
*img_ptr++ = image->comps[0].data[index] >> adjust[0];
|
*img_ptr++ = image->comps[0].data[index] >> adjust[0];
|
||||||
if(image->numcomps > 2 && check_image_attributes(image)) {
|
if(image->numcomps > 2 && check_image_attributes(image)) {
|
||||||
*img_ptr++ = image->comps[1].data[index] >> adjust[1];
|
*img_ptr++ = image->comps[1].data[index] >> adjust[1];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue