PandA-2024.02
jfif_read.c
Go to the documentation of this file.
1 /*
2 +--------------------------------------------------------------------------+
3 | CHStone : a suite of benchmark programs for C-based High-Level Synthesis |
4 | ======================================================================== |
5 | |
6 | * Collected and Modified : Y. Hara, H. Tomiyama, S. Honda, |
7 | H. Takada and K. Ishii |
8 | Nagoya University, Japan |
9 | |
10 | * Remark : |
11 | 1. This source code is modified to unify the formats of the benchmark |
12 | programs in CHStone. |
13 | 2. Test vectors are added for CHStone. |
14 | 3. If "main_result" is 0 at the end of the program, the program is |
15 | correctly executed. |
16 | 4. Please follow the copyright of each benchmark program. |
17 +--------------------------------------------------------------------------+
18 */
19 /*
20  * Copyright (C) 2008
21  * Y. Hara, H. Tomiyama, S. Honda, H. Takada and K. Ishii
22  * Nagoya University, Japan
23  * All rights reserved.
24  *
25  * Disclaimer of Warranty
26  *
27  * These software programs are available to the user without any license fee or
28  * royalty on an "as is" basis. The authors disclaims any and all warranties,
29  * whether express, implied, or statuary, including any implied warranties or
30  * merchantability or of fitness for a particular purpose. In no event shall the
31  * copyright-holder be liable for any incidental, punitive, or consequential damages
32  * of any kind whatsoever arising from the use of these programs. This disclaimer
33  * of warranty extends to the user of these programs and user's customers, employees,
34  * agents, transferees, successors, and assigns.
35  *
36  */
37 /*
38  * Read the header information from buffer in JFIF format and begin decoding
39  *
40  * @(#) $Id: jfif_read.c,v 1.2 2003/07/18 10:19:21 honda Exp $
41  */
42 
43 /*
44  * Initialize after reading markers
45  */
46 void
48 {
49  int tmp;
50  /*
51  * Get MCU number
52  */
54  p_jinfo_MCUWidth = (p_jinfo_image_width - 1) / 8 + 1;
56 
57  /*
58  * Create Huffman Table for decoding
59  */
65  p_jinfo_dc_dhuff_tbl_ml[0] = tmp;
71  p_jinfo_dc_dhuff_tbl_ml[1] = tmp;
77  p_jinfo_ac_dhuff_tbl_ml[0] = tmp;
83  p_jinfo_ac_dhuff_tbl_ml[1] = tmp;
84 }
85 
86 
87 
88 void
89 jpeg_read (unsigned char *read_buf)
90 {
91 
92  /*
93  * Read markers
94  */
95  read_markers (read_buf);
96 
97 
98  /*
99  * Initialize the information used for decoding
100  */
102 
103  /*
104  * Start decoding
105  */
108 
109 }
int p_jinfo_dc_dhuff_tbl_mincode[NUM_HUFF_TBLS][36]
Definition: decode.h:94
int p_jinfo_dc_dhuff_tbl_maxcode[NUM_HUFF_TBLS][36]
Definition: decode.h:93
int OutData_image_width
Definition: init.h:42
int p_jinfo_MCUHeight
Definition: decode.h:103
void decode_start(int *out_data_image_width, int *out_data_image_height, int *out_data_comp_vpos, int *out_data_comp_hpos)
Definition: decode.c:352
int OutData_comp_hpos[RGB_NUM]
Definition: init.h:45
int p_jinfo_ac_xhuff_tbl_bits[NUM_HUFF_TBLS][36]
Definition: decode.h:89
int huff_make_dhuff_tb(int *p_xhtbl_bits, int p_dhtbl_ml, int *p_dhtbl_maxcode, int *p_dhtbl_mincode, int *p_dhtbl_valptr)
Definition: huffman.c:179
short p_jinfo_image_width
Definition: decode.h:72
int p_jinfo_ac_dhuff_tbl_maxcode[NUM_HUFF_TBLS][36]
Definition: decode.h:98
int p_jinfo_ac_dhuff_tbl_valptr[NUM_HUFF_TBLS][36]
Definition: decode.h:100
int p_jinfo_dc_dhuff_tbl_ml[NUM_HUFF_TBLS]
Definition: decode.h:92
short p_jinfo_image_height
Definition: decode.h:71
int p_jinfo_ac_dhuff_tbl_mincode[NUM_HUFF_TBLS][36]
Definition: decode.h:99
void jpeg_read(unsigned char *read_buf)
Definition: jfif_read.c:89
int p_jinfo_NumMCU
Definition: decode.h:104
void read_markers(unsigned char *buf)
Definition: marker.c:555
void jpeg_init_decompress()
Definition: jfif_read.c:47
int p_jinfo_MCUWidth
Definition: decode.h:102
int p_jinfo_dc_xhuff_tbl_bits[NUM_HUFF_TBLS][36]
Definition: decode.h:86
int OutData_image_height
Definition: init.h:43
int p_jinfo_ac_dhuff_tbl_ml[NUM_HUFF_TBLS]
Definition: decode.h:97
int p_jinfo_dc_dhuff_tbl_valptr[NUM_HUFF_TBLS][36]
Definition: decode.h:95
int OutData_comp_vpos[RGB_NUM]
Definition: init.h:44

Generated on Mon Feb 12 2024 13:02:49 for PandA-2024.02 by doxygen 1.8.13