466 int ci, block_row, block_rows, access_rows;
468 JBLOCKROW buffer_ptr, prev_block_row, next_block_row;
472 inverse_DCT_method_ptr inverse_DCT;
473 boolean first_row, last_row;
477 int32_t Q00,Q01,Q02,Q10,Q11,Q20, num;
478 int DC1,DC2,DC3,DC4,DC5,DC6,DC7,DC8,DC9;
507 access_rows = block_rows * 2;
513 access_rows = block_rows;
535 Q01 = quanttbl->quantval[
Q01_POS];
536 Q10 = quanttbl->quantval[
Q10_POS];
537 Q20 = quanttbl->quantval[
Q20_POS];
538 Q11 = quanttbl->quantval[
Q11_POS];
539 Q02 = quanttbl->quantval[
Q02_POS];
543 for (block_row = 0; block_row < block_rows; block_row++) {
544 buffer_ptr =
buffer[block_row];
545 if (first_row && block_row == 0)
546 prev_block_row = buffer_ptr;
548 prev_block_row =
buffer[block_row-1];
549 if (last_row && block_row == block_rows-1)
550 next_block_row = buffer_ptr;
552 next_block_row =
buffer[block_row+1];
556 DC1 = DC2 = DC3 = (int) prev_block_row[0][0];
557 DC4 = DC5 = DC6 = (int) buffer_ptr[0][0];
558 DC7 = DC8 = DC9 = (int) next_block_row[0][0];
561 for (block_num = 0; block_num <= last_block_column; block_num++) {
565 if (block_num < last_block_column) {
566 DC3 = (int) prev_block_row[1][0];
567 DC6 = (int) buffer_ptr[1][0];
568 DC9 = (int) next_block_row[1][0];
575 if ((Al=coef_bits[1]) != 0 && workspace[1] == 0) {
576 num = 36 * Q00 * (DC4 - DC6);
578 pred = (int) (((Q01<<7) + num) / (Q01<<8));
579 if (Al > 0 && pred >= (1<<Al))
582 pred = (int) (((Q01<<7) - num) / (Q01<<8));
583 if (Al > 0 && pred >= (1<<Al))
587 workspace[1] = (
JCOEF) pred;
590 if ((Al=coef_bits[2]) != 0 && workspace[8] == 0) {
591 num = 36 * Q00 * (DC2 - DC8);
593 pred = (int) (((Q10<<7) + num) / (Q10<<8));
594 if (Al > 0 && pred >= (1<<Al))
597 pred = (int) (((Q10<<7) - num) / (Q10<<8));
598 if (Al > 0 && pred >= (1<<Al))
602 workspace[8] = (
JCOEF) pred;
605 if ((Al=coef_bits[3]) != 0 && workspace[16] == 0) {
606 num = 9 * Q00 * (DC2 + DC8 - 2*DC5);
608 pred = (int) (((Q20<<7) + num) / (Q20<<8));
609 if (Al > 0 && pred >= (1<<Al))
612 pred = (int) (((Q20<<7) - num) / (Q20<<8));
613 if (Al > 0 && pred >= (1<<Al))
617 workspace[16] = (
JCOEF) pred;
620 if ((Al=coef_bits[4]) != 0 && workspace[9] == 0) {
621 num = 5 * Q00 * (DC1 - DC3 - DC7 + DC9);
623 pred = (int) (((Q11<<7) + num) / (Q11<<8));
624 if (Al > 0 && pred >= (1<<Al))
627 pred = (int) (((Q11<<7) - num) / (Q11<<8));
628 if (Al > 0 && pred >= (1<<Al))
632 workspace[9] = (
JCOEF) pred;
635 if ((Al=coef_bits[5]) != 0 && workspace[2] == 0) {
636 num = 9 * Q00 * (DC4 + DC6 - 2*DC5);
638 pred = (int) (((Q02<<7) + num) / (Q02<<8));
639 if (Al > 0 && pred >= (1<<Al))
642 pred = (int) (((Q02<<7) - num) / (Q02<<8));
643 if (Al > 0 && pred >= (1<<Al))
647 workspace[2] = (
JCOEF) pred;
653 DC1 = DC2; DC2 = DC3;
654 DC4 = DC5; DC5 = DC6;
655 DC7 = DC8; DC8 = DC9;
656 buffer_ptr++, prev_block_row++, next_block_row++;
int v_samp_factor
Definition: jpeglib.h:128
JBLOCKARRAY(* access_virt_barray)()
Definition: jpeglib.h:795
void jcopy_block_row(JBLOCKROW input_row, JBLOCKROW output_row, JDIMENSION num_blocks)
Definition: jutils.cpp:145
static double delta
Definition: agent_exec-2-0.cpp:141
struct jpeg_input_controller * inputctl
Definition: jpeglib.h:628
jpeg_component_info * comp_info
Definition: jpeglib.h:540
inverse_DCT_method_ptr inverse_DCT[MAX_COMPONENTS]
Definition: jpegint.h:228
int output_scan_number
Definition: jpeglib.h:506
JBLOCKROW * JBLOCKARRAY
Definition: jpeglib.h:77
struct jpeg_d_coef_controller * coef
Definition: jpeglib.h:626
int DCT_scaled_size
Definition: jpeglib.h:152
#define JPEG_ROW_COMPLETED
Definition: jpeglib.h:1003
Definition: jpeglib.h:258
boolean component_needed
Definition: jpeglib.h:165
short JCOEF
Definition: jmorecfg.h:99
uint16_t quantval[64]
Definition: jpeglib.h:93
jpeg_component_info * compptr
Definition: jdct.h:102
JDIMENSION width_in_blocks
Definition: jpeglib.h:144
#define Q20_POS
Definition: jdcoefct.cpp:392
struct jpeg_memory_mgr * mem
Definition: jpeglib.h:417
#define FALSE
Definition: jpleph.cpp:69
jpeg_component_info JCOEFPTR JSAMPARRAY JDIMENSION output_col
Definition: jdct.h:102
JDIMENSION height_in_blocks
Definition: jpeglib.h:145
#define Q11_POS
Definition: jdcoefct.cpp:393
static char buffer[255]
Definition: propagator_simple.cpp:60
int input_scan_number
Definition: jpeglib.h:499
static double coef[360+1][360+1][2]
Definition: physicslib.cpp:39
JCOEF * JCOEFPTR
Definition: jpeglib.h:80
#define TRUE
Definition: jpleph.cpp:68
int Ss
Definition: jpeglib.h:613
JQUANT_TBL * quant_table
Definition: jpeglib.h:180
JCOEF JBLOCK[64]
Definition: jpeglib.h:75
int * coef_bits_latch
Definition: jdcoefct.cpp:57
#define Q10_POS
Definition: jdcoefct.cpp:391
JSAMPROW * JSAMPARRAY
Definition: jpeglib.h:72
Definition: jpeglib.h:121
Definition: jccoefct.cpp:34
JBLOCK * JBLOCKROW
Definition: jpeglib.h:76
#define JPEG_SCAN_COMPLETED
Definition: jpeglib.h:1004
JDIMENSION input_iMCU_row
Definition: jpeglib.h:500
#define JPEG_SUSPENDED
Definition: jpeglib.h:970
JDIMENSION output_iMCU_row
Definition: jpeglib.h:507
#define Q02_POS
Definition: jdcoefct.cpp:394
jpeg_component_info JCOEFPTR JSAMPARRAY output_buf
Definition: jdct.h:102
unsigned int JDIMENSION
Definition: jmorecfg.h:171
#define Q01_POS
Definition: jdcoefct.cpp:390
struct jpeg_inverse_dct * idct
Definition: jpeglib.h:631
jvirt_barray_ptr whole_image[10]
Definition: jccoefct.cpp:54
my_coef_controller * my_coef_ptr
Definition: jdcoefct.cpp:62
JDIMENSION total_iMCU_rows
Definition: jpeglib.h:585
#define SAVED_COEFS
Definition: jdcoefct.cpp:58