diff options
| author | Joshua Bakita <bakitajoshua@gmail.com> | 2019-10-07 19:13:39 -0400 |
|---|---|---|
| committer | Joshua Bakita <bakitajoshua@gmail.com> | 2019-10-07 19:13:39 -0400 |
| commit | 386b7d3366f1359a265da207a9cafa3edf553b64 (patch) | |
| tree | c76120c2c138faed822e4ae386be6ef22a738a78 /baseline/source/cjpeg_wrbmp/cdjpeg.h | |
| parent | 54a3f7091a2146b29c73a6fdc4b62a5c4ad7a3d8 (diff) | |
Reorganize and commit all the modified TACLeBench code and run scripts
Diffstat (limited to 'baseline/source/cjpeg_wrbmp/cdjpeg.h')
| -rw-r--r-- | baseline/source/cjpeg_wrbmp/cdjpeg.h | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/baseline/source/cjpeg_wrbmp/cdjpeg.h b/baseline/source/cjpeg_wrbmp/cdjpeg.h new file mode 100644 index 0000000..6c3fc7b --- /dev/null +++ b/baseline/source/cjpeg_wrbmp/cdjpeg.h | |||
| @@ -0,0 +1,105 @@ | |||
| 1 | /* | ||
| 2 | |||
| 3 | This program is part of the TACLeBench benchmark suite. | ||
| 4 | Version V 1.x | ||
| 5 | |||
| 6 | Name: cdjpeg.h | ||
| 7 | |||
| 8 | Author: Thomas G. Lane. | ||
| 9 | |||
| 10 | This file is part of the Independent JPEG Group's software. | ||
| 11 | For conditions of distribution and use, see the accompanying README file. | ||
| 12 | |||
| 13 | This file contains common declarations for the sample applications | ||
| 14 | cjpeg and djpeg. It is NOT used by the core JPEG library. | ||
| 15 | |||
| 16 | Source: Independent JPEG Group's software | ||
| 17 | |||
| 18 | Changes: no major functional changes | ||
| 19 | |||
| 20 | License: See the accompanying README file | ||
| 21 | |||
| 22 | */ | ||
| 23 | #ifndef CDJPEG_H | ||
| 24 | #define CDJPEG_H | ||
| 25 | |||
| 26 | #define CJPEG_WRBMP_JPEG_CJPEG_DJPEG /* define proper options in jconfig.h */ | ||
| 27 | #define CJPEG_WRBMP_JPEG_INTERNAL_OPTIONS /* cjpeg.c,djpeg.c need to see xxx_SUPPORTED */ | ||
| 28 | |||
| 29 | #include "jpeglib.h" | ||
| 30 | #include "jerror.h" /* get library error codes too */ | ||
| 31 | #include "cderror.h" /* get application-specific error codes */ | ||
| 32 | |||
| 33 | typedef struct cjpeg_wrbmp_cjpeg_source_struct | ||
| 34 | *cjpeg_wrbmp_cjpeg_source_ptr; | ||
| 35 | |||
| 36 | struct cjpeg_wrbmp_cjpeg_source_struct { | ||
| 37 | CJPEG_WRBMP_JMETHOD( void, start_input, | ||
| 38 | ( cjpeg_wrbmp_j_compress_ptr cinfo, | ||
| 39 | cjpeg_wrbmp_cjpeg_source_ptr sinfo ) ); | ||
| 40 | CJPEG_WRBMP_JMETHOD( CJPEG_WRBMP_JDIMENSION, get_pixel_rows, | ||
| 41 | ( cjpeg_wrbmp_j_compress_ptr cinfo, | ||
| 42 | cjpeg_wrbmp_cjpeg_source_ptr sinfo ) ); | ||
| 43 | CJPEG_WRBMP_JMETHOD( void, finish_input, | ||
| 44 | ( cjpeg_wrbmp_j_compress_ptr cinfo, | ||
| 45 | cjpeg_wrbmp_cjpeg_source_ptr sinfo ) ); | ||
| 46 | |||
| 47 | CJPEG_WRBMP_FILE *input_file; | ||
| 48 | |||
| 49 | CJPEG_WRBMP_JSAMPARRAY buffer; | ||
| 50 | CJPEG_WRBMP_JDIMENSION buffer_height; | ||
| 51 | }; | ||
| 52 | |||
| 53 | |||
| 54 | typedef struct cjpeg_wrbmp_djpeg_dest_struct | ||
| 55 | *cjpeg_wrbmp_djpeg_dest_ptr; | ||
| 56 | |||
| 57 | struct cjpeg_wrbmp_djpeg_dest_struct { | ||
| 58 | CJPEG_WRBMP_JMETHOD( void, start_output, | ||
| 59 | ( cjpeg_wrbmp_j_decompress_ptr cinfo, | ||
| 60 | cjpeg_wrbmp_djpeg_dest_ptr dinfo ) ); | ||
| 61 | /* Emit the specified number of pixel rows from the buffer. */ | ||
| 62 | CJPEG_WRBMP_JMETHOD( void, put_pixel_rows, | ||
| 63 | ( cjpeg_wrbmp_j_decompress_ptr cinfo, | ||
| 64 | cjpeg_wrbmp_djpeg_dest_ptr dinfo, | ||
| 65 | CJPEG_WRBMP_JDIMENSION rows_supplied ) ); | ||
| 66 | /* Finish up at the end of the image. */ | ||
| 67 | CJPEG_WRBMP_JMETHOD( void, finish_output, | ||
| 68 | ( cjpeg_wrbmp_j_decompress_ptr cinfo, | ||
| 69 | cjpeg_wrbmp_djpeg_dest_ptr dinfo ) ); | ||
| 70 | |||
| 71 | /* Target file spec; filled in by djpeg.c after object is created. */ | ||
| 72 | CJPEG_WRBMP_FILE *output_file; | ||
| 73 | |||
| 74 | /* Output pixel-row buffer. Created by module init or start_output. | ||
| 75 | Width is cinfo->output_width * cinfo->output_components; | ||
| 76 | height is buffer_height. | ||
| 77 | */ | ||
| 78 | CJPEG_WRBMP_JSAMPARRAY buffer; | ||
| 79 | CJPEG_WRBMP_JDIMENSION buffer_height; | ||
| 80 | } ; | ||
| 81 | |||
| 82 | |||
| 83 | |||
| 84 | /* | ||
| 85 | cjpeg/djpeg may need to perform extra passes to convert to or from | ||
| 86 | the source/destination file format. The JPEG library does not know | ||
| 87 | about these passes, but we'd like them to be counted by the progress | ||
| 88 | monitor. We use an expanded progress monitor object to hold the | ||
| 89 | additional pass count. | ||
| 90 | */ | ||
| 91 | |||
| 92 | struct cjpeg_wrbmp_cdjpeg_progress_mgr { | ||
| 93 | struct cjpeg_wrbmp_jpeg_progress_mgr | ||
| 94 | pub; /* fields known to JPEG library */ | ||
| 95 | int completed_extra_passes; /* extra passes completed */ | ||
| 96 | int total_extra_passes; /* total extra */ | ||
| 97 | /* last printed percentage stored here to avoid multiple printouts */ | ||
| 98 | int percent_done; | ||
| 99 | }; | ||
| 100 | |||
| 101 | typedef struct cjpeg_wrbmp_cdjpeg_progress_mgr | ||
| 102 | *cjpeg_wrbmp_cd_progress_ptr; | ||
| 103 | |||
| 104 | #endif | ||
| 105 | |||
