OLD | NEW |
1 /* | 1 /* |
2 * jdmainct.h | 2 * jdmainct.h |
3 * | 3 * |
4 * This file was part of the Independent JPEG Group's software: | 4 * This file was part of the Independent JPEG Group's software: |
5 * Copyright (C) 1994-1996, Thomas G. Lane. | 5 * Copyright (C) 1994-1996, Thomas G. Lane. |
6 * For conditions of distribution and use, see the accompanying README file. | 6 * For conditions of distribution and use, see the accompanying README.ijg |
| 7 * file. |
7 */ | 8 */ |
8 | 9 |
9 #define JPEG_INTERNALS | 10 #define JPEG_INTERNALS |
10 #include "jinclude.h" | |
11 #include "jpeglib.h" | 11 #include "jpeglib.h" |
12 #include "jpegcomp.h" | 12 #include "jpegcomp.h" |
13 | 13 |
14 | 14 |
15 /* Private buffer controller object */ | 15 /* Private buffer controller object */ |
16 | 16 |
17 typedef struct { | 17 typedef struct { |
18 struct jpeg_d_main_controller pub; /* public fields */ | 18 struct jpeg_d_main_controller pub; /* public fields */ |
19 | 19 |
20 /* Pointer to allocated workspace (M or M+2 row groups). */ | 20 /* Pointer to allocated workspace (M or M+2 row groups). */ |
21 JSAMPARRAY buffer[MAX_COMPONENTS]; | 21 JSAMPARRAY buffer[MAX_COMPONENTS]; |
22 | 22 |
23 boolean buffer_full; /* Have we gotten an iMCU row from decoder? */ | 23 boolean buffer_full; /* Have we gotten an iMCU row from decoder? */ |
24 JDIMENSION rowgroup_ctr; /* counts row groups output to postprocessor */ | 24 JDIMENSION rowgroup_ctr; /* counts row groups output to postprocessor */ |
25 | 25 |
26 /* Remaining fields are only used in the context case. */ | 26 /* Remaining fields are only used in the context case. */ |
27 | 27 |
28 /* These are the master pointers to the funny-order pointer lists. */ | 28 /* These are the master pointers to the funny-order pointer lists. */ |
29 JSAMPIMAGE xbuffer[2]; /* pointers to weird pointer lists */ | 29 JSAMPIMAGE xbuffer[2]; /* pointers to weird pointer lists */ |
30 | 30 |
31 int whichptr; /* indicates which pointer set is now in use */ | 31 int whichptr; /* indicates which pointer set is now in use */ |
32 int context_state; /* process_data state machine status */ | 32 int context_state; /* process_data state machine status */ |
33 JDIMENSION rowgroups_avail; /* row groups available to postprocessor */ | 33 JDIMENSION rowgroups_avail; /* row groups available to postprocessor */ |
34 JDIMENSION iMCU_row_ctr; /* counts iMCU rows to detect image top/bot */ | 34 JDIMENSION iMCU_row_ctr; /* counts iMCU rows to detect image top/bot */ |
35 } my_main_controller; | 35 } my_main_controller; |
36 | 36 |
37 typedef my_main_controller * my_main_ptr; | 37 typedef my_main_controller *my_main_ptr; |
38 | 38 |
39 | 39 |
40 /* context_state values: */ | 40 /* context_state values: */ |
41 #define CTX_PREPARE_FOR_IMCU 0 /* need to prepare for MCU row */ | 41 #define CTX_PREPARE_FOR_IMCU 0 /* need to prepare for MCU row */ |
42 #define CTX_PROCESS_IMCU 1 /* feeding iMCU to postprocessor */ | 42 #define CTX_PROCESS_IMCU 1 /* feeding iMCU to postprocessor */ |
43 #define CTX_POSTPONED_ROW 2 /* feeding postponed row group */ | 43 #define CTX_POSTPONED_ROW 2 /* feeding postponed row group */ |
44 | 44 |
45 | 45 |
46 LOCAL(void) | 46 LOCAL(void) |
47 set_wraparound_pointers (j_decompress_ptr cinfo) | 47 set_wraparound_pointers (j_decompress_ptr cinfo) |
(...skipping 14 matching lines...) Expand all Loading... |
62 xbuf0 = main_ptr->xbuffer[0][ci]; | 62 xbuf0 = main_ptr->xbuffer[0][ci]; |
63 xbuf1 = main_ptr->xbuffer[1][ci]; | 63 xbuf1 = main_ptr->xbuffer[1][ci]; |
64 for (i = 0; i < rgroup; i++) { | 64 for (i = 0; i < rgroup; i++) { |
65 xbuf0[i - rgroup] = xbuf0[rgroup*(M+1) + i]; | 65 xbuf0[i - rgroup] = xbuf0[rgroup*(M+1) + i]; |
66 xbuf1[i - rgroup] = xbuf1[rgroup*(M+1) + i]; | 66 xbuf1[i - rgroup] = xbuf1[rgroup*(M+1) + i]; |
67 xbuf0[rgroup*(M+2) + i] = xbuf0[i]; | 67 xbuf0[rgroup*(M+2) + i] = xbuf0[i]; |
68 xbuf1[rgroup*(M+2) + i] = xbuf1[i]; | 68 xbuf1[rgroup*(M+2) + i] = xbuf1[i]; |
69 } | 69 } |
70 } | 70 } |
71 } | 71 } |
OLD | NEW |