185 } |
185 } |
186 inverse_DCT = cinfo->idct->inverse_DCT[compptr->component_index]; |
186 inverse_DCT = cinfo->idct->inverse_DCT[compptr->component_index]; |
187 useful_width = (MCU_col_num < last_MCU_col) ? compptr->MCU_width |
187 useful_width = (MCU_col_num < last_MCU_col) ? compptr->MCU_width |
188 : compptr->last_col_width; |
188 : compptr->last_col_width; |
189 output_ptr = output_buf[compptr->component_index] + |
189 output_ptr = output_buf[compptr->component_index] + |
190 yoffset * compptr->DCT_scaled_size; |
190 yoffset * compptr->DCT_v_scaled_size; |
191 start_col = MCU_col_num * compptr->MCU_sample_width; |
191 start_col = MCU_col_num * compptr->MCU_sample_width; |
192 for (yindex = 0; yindex < compptr->MCU_height; yindex++) { |
192 for (yindex = 0; yindex < compptr->MCU_height; yindex++) { |
193 if (cinfo->input_iMCU_row < last_iMCU_row || |
193 if (cinfo->input_iMCU_row < last_iMCU_row || |
194 yoffset+yindex < compptr->last_row_height) { |
194 yoffset+yindex < compptr->last_row_height) { |
195 output_col = start_col; |
195 output_col = start_col; |
196 for (xindex = 0; xindex < useful_width; xindex++) { |
196 for (xindex = 0; xindex < useful_width; xindex++) { |
197 (*inverse_DCT) (cinfo, compptr, |
197 (*inverse_DCT) (cinfo, compptr, |
198 (JCOEFPTR) coef->MCU_buffer[blkn+xindex], |
198 (JCOEFPTR) coef->MCU_buffer[blkn+xindex], |
199 output_ptr, output_col); |
199 output_ptr, output_col); |
200 output_col += compptr->DCT_scaled_size; |
200 output_col += compptr->DCT_h_scaled_size; |
201 } |
201 } |
202 } |
202 } |
203 blkn += compptr->MCU_width; |
203 blkn += compptr->MCU_width; |
204 output_ptr += compptr->DCT_scaled_size; |
204 output_ptr += compptr->DCT_v_scaled_size; |
205 } |
205 } |
206 } |
206 } |
207 } |
207 } |
208 /* Completed an MCU row, but perhaps not an iMCU row */ |
208 /* Completed an MCU row, but perhaps not an iMCU row */ |
209 coef->MCU_ctr = 0; |
209 coef->MCU_ctr = 0; |
360 output_col = 0; |
360 output_col = 0; |
361 for (block_num = 0; block_num < compptr->width_in_blocks; block_num++) { |
361 for (block_num = 0; block_num < compptr->width_in_blocks; block_num++) { |
362 (*inverse_DCT) (cinfo, compptr, (JCOEFPTR) buffer_ptr, |
362 (*inverse_DCT) (cinfo, compptr, (JCOEFPTR) buffer_ptr, |
363 output_ptr, output_col); |
363 output_ptr, output_col); |
364 buffer_ptr++; |
364 buffer_ptr++; |
365 output_col += compptr->DCT_scaled_size; |
365 output_col += compptr->DCT_h_scaled_size; |
366 } |
366 } |
367 output_ptr += compptr->DCT_scaled_size; |
367 output_ptr += compptr->DCT_v_scaled_size; |
368 } |
368 } |
369 } |
369 } |
370 |
370 |
371 if (++(cinfo->output_iMCU_row) < cinfo->total_iMCU_rows) |
371 if (++(cinfo->output_iMCU_row) < cinfo->total_iMCU_rows) |
372 return JPEG_ROW_COMPLETED; |
372 return JPEG_ROW_COMPLETED; |
652 /* Advance for next column */ |
652 /* Advance for next column */ |
653 DC1 = DC2; DC2 = DC3; |
653 DC1 = DC2; DC2 = DC3; |
654 DC4 = DC5; DC5 = DC6; |
654 DC4 = DC5; DC5 = DC6; |
655 DC7 = DC8; DC8 = DC9; |
655 DC7 = DC8; DC8 = DC9; |
656 buffer_ptr++, prev_block_row++, next_block_row++; |
656 buffer_ptr++, prev_block_row++, next_block_row++; |
657 output_col += compptr->DCT_scaled_size; |
657 output_col += compptr->DCT_h_scaled_size; |
658 } |
658 } |
659 output_ptr += compptr->DCT_scaled_size; |
659 output_ptr += compptr->DCT_v_scaled_size; |
660 } |
660 } |
661 } |
661 } |
662 |
662 |
663 if (++(cinfo->output_iMCU_row) < cinfo->total_iMCU_rows) |
663 if (++(cinfo->output_iMCU_row) < cinfo->total_iMCU_rows) |
664 return JPEG_ROW_COMPLETED; |
664 return JPEG_ROW_COMPLETED; |