56 { 0, 1, 5, 6, 14, 15, 27, 28,
57 2, 4, 7, 13, 16, 26, 29, 42,
58 3, 8, 12, 17, 25, 30, 41, 43,
59 9, 11, 18, 24, 31, 40, 44, 53,
60 10, 19, 23, 32, 39, 45, 52, 54,
61 20, 22, 33, 38, 46, 51, 55, 60,
62 21, 34, 37, 47, 50, 56, 59, 61,
63 35, 36, 48, 49, 57, 58, 62, 63
95 for (mptr = matrix; mptr < matrix +
DCTSIZE2; mptr++)
97 *mptr = *mptr * (*qmatrix);
111 for (mptr = matrix; mptr < matrix +
DCTSIZE2; mptr++)
127 for (mptr = matrix; mptr < matrix +
DCTSIZE2; mptr++)
133 else if (*mptr > Bound)
144 int voffs,
int hoffs)
150 for (i = voffs; i < voffs +
DCTSIZE; i++)
156 for (e = hoffs; e < hoffs +
DCTSIZE; e++)
160 out_buf[diff + e] = (
unsigned char) (*(store++));
186 unsigned char *p_out_buf)
224 int *p_out_vpos,
int *p_out_hpos,
unsigned char *p_out_buf)
267 *p_out_hpos = *p_out_hpos + 2;
268 *p_out_vpos = *p_out_vpos + 2;
273 *p_out_vpos = *p_out_vpos - 2;
286 YuvToRgb (
int p,
int *y_buf,
int *u_buf,
int *v_buf)
298 r = (y * 256 + v * 359 + 128) >> 8;
299 g = (y * 256 - u * 88 - v * 182 + 128) >> 8;
300 b = (y * 256 + u * 454 + 128) >> 8;
332 unsigned int *p_quant_tbl;
353 int *out_data_comp_vpos,
int *out_data_comp_hpos)
382 out_data_comp_vpos[i] = 0;
383 out_data_comp_hpos[i] = 0;
403 YuvToRgb (0, IDCTBuff[0], IDCTBuff[1], IDCTBuff[2]);
410 &out_data_comp_vpos[i],
430 for (i = 0; i < 4; i++)
444 for (i = 0; i < 4; i++)
446 YuvToRgb (i, IDCTBuff[i], IDCTBuff[4], IDCTBuff[5]);
456 &out_data_comp_vpos[i],
void IZigzagMatrix(int *imatrix, int *omatrix)
void decode_start(int *out_data_image_width, int *out_data_image_height, int *out_data_comp_vpos, int *out_data_comp_hpos)
unsigned int p_jinfo_quant_tbl_quantval[NUM_QUANT_TBLS][DCTSIZE2]
short p_jinfo_image_width
char p_jinfo_comps_info_quant_tbl_no[NUM_COMPONENT]
void ChenIDct(int *x, int *y)
void PostshiftIDctMatrix(int *matrix, int shift)
unsigned char * p_jinfo_jpeg_data
unsigned char * CurHuffReadBuf
void DecodeHuffMCU(int *out_buf, int num_cmp)
void BoundIDctMatrix(int *matrix, int Bound)
short p_jinfo_image_height
void IQuantize(int *matrix, unsigned int *qmatrix)
void YuvToRgb(int p, int *y_buf, int *u_buf, int *v_buf)
void WriteBlock(int *store, int *p_out_vpos, int *p_out_hpos, unsigned char *p_out_buf)
x
Return the smallest n such that 2^n >= _x.
void Write4Blocks(int *store1, int *store2, int *store3, int *store4, int *p_out_vpos, int *p_out_hpos, unsigned char *p_out_buf)
void WriteOneBlock(int *store, unsigned char *out_buf, int width, int height, int voffs, int hoffs)
const int zigzag_index[64]
unsigned char OutData_comp_buf[RGB_NUM][BMP_OUT_SIZE]
void decode_block(int comp_no, int *out_buf, int *HuffBuff)
int rgb_buf[4][RGB_NUM][DCTSIZE2]