NXP
/
rt1050_emwin_gui_demo
RT1050 GUI demo using emWin library
emwin/emWin_header/GUI_JPEG_Private.h@0:dd702039127a, 2018-09-20 (annotated)
- Committer:
- alejandroRL
- Date:
- Thu Sep 20 19:16:34 2018 +0000
- Revision:
- 0:dd702039127a
emWin GUI Demo for RT1050
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
alejandroRL | 0:dd702039127a | 1 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 2 | * SEGGER Microcontroller GmbH & Co. KG * |
alejandroRL | 0:dd702039127a | 3 | * Solutions for real time microcontroller applications * |
alejandroRL | 0:dd702039127a | 4 | ********************************************************************** |
alejandroRL | 0:dd702039127a | 5 | * * |
alejandroRL | 0:dd702039127a | 6 | * (c) 1996 - 2016 SEGGER Microcontroller GmbH & Co. KG * |
alejandroRL | 0:dd702039127a | 7 | * * |
alejandroRL | 0:dd702039127a | 8 | * Internet: www.segger.com Support: support@segger.com * |
alejandroRL | 0:dd702039127a | 9 | * * |
alejandroRL | 0:dd702039127a | 10 | ********************************************************************** |
alejandroRL | 0:dd702039127a | 11 | |
alejandroRL | 0:dd702039127a | 12 | ** emWin V5.38 - Graphical user interface for embedded applications ** |
alejandroRL | 0:dd702039127a | 13 | All Intellectual Property rights in the Software belongs to SEGGER. |
alejandroRL | 0:dd702039127a | 14 | emWin is protected by international copyright laws. Knowledge of the |
alejandroRL | 0:dd702039127a | 15 | source code may not be used to write a similar product. This file may |
alejandroRL | 0:dd702039127a | 16 | only be used in accordance with the following terms: |
alejandroRL | 0:dd702039127a | 17 | |
alejandroRL | 0:dd702039127a | 18 | The software has been licensed to NXP Semiconductors USA, Inc. whose |
alejandroRL | 0:dd702039127a | 19 | registered office is situated at 411 E. Plumeria Drive, San Jose, |
alejandroRL | 0:dd702039127a | 20 | CA 95134, USA solely for the purposes of creating libraries for |
alejandroRL | 0:dd702039127a | 21 | NXPs M0, M3/M4 and ARM7/9 processor-based devices, sublicensed and |
alejandroRL | 0:dd702039127a | 22 | distributed under the terms and conditions of the NXP End User License |
alejandroRL | 0:dd702039127a | 23 | Agreement. |
alejandroRL | 0:dd702039127a | 24 | Full source code is available at: www.segger.com |
alejandroRL | 0:dd702039127a | 25 | |
alejandroRL | 0:dd702039127a | 26 | We appreciate your understanding and fairness. |
alejandroRL | 0:dd702039127a | 27 | ---------------------------------------------------------------------- |
alejandroRL | 0:dd702039127a | 28 | Licensing information |
alejandroRL | 0:dd702039127a | 29 | |
alejandroRL | 0:dd702039127a | 30 | Licensor: SEGGER Microcontroller Systems LLC |
alejandroRL | 0:dd702039127a | 31 | Licensed to: NXP Semiconductors, 1109 McKay Dr, M/S 76, San Jose, CA 95131, USA |
alejandroRL | 0:dd702039127a | 32 | Licensed SEGGER software: emWin |
alejandroRL | 0:dd702039127a | 33 | License number: GUI-00186 |
alejandroRL | 0:dd702039127a | 34 | License model: emWin License Agreement, dated August 20th 2011 |
alejandroRL | 0:dd702039127a | 35 | Licensed product: - |
alejandroRL | 0:dd702039127a | 36 | Licensed platform: NXP's ARM 7/9, Cortex-M0,M3,M4 |
alejandroRL | 0:dd702039127a | 37 | Licensed number of seats: - |
alejandroRL | 0:dd702039127a | 38 | ---------------------------------------------------------------------- |
alejandroRL | 0:dd702039127a | 39 | File : GUI_JPEG_Private.h |
alejandroRL | 0:dd702039127a | 40 | Purpose : Private header |
alejandroRL | 0:dd702039127a | 41 | ---------------------------------------------------------------------- |
alejandroRL | 0:dd702039127a | 42 | |
alejandroRL | 0:dd702039127a | 43 | Explanation of terms: |
alejandroRL | 0:dd702039127a | 44 | |
alejandroRL | 0:dd702039127a | 45 | Component - Color channel, e.g., Red or Luminance. |
alejandroRL | 0:dd702039127a | 46 | Sample - Single component value (i.e., one number in the image data). |
alejandroRL | 0:dd702039127a | 47 | Coefficient - Frequency coefficient (a DCT transform output number). |
alejandroRL | 0:dd702039127a | 48 | Block - 8x8 group of samples or coefficients. |
alejandroRL | 0:dd702039127a | 49 | MCU - (Minimum Coded Unit) is an interleaved set of blocks of size |
alejandroRL | 0:dd702039127a | 50 | determined by the sampling factors, or a single block in a |
alejandroRL | 0:dd702039127a | 51 | noninterleaved scan. |
alejandroRL | 0:dd702039127a | 52 | |
alejandroRL | 0:dd702039127a | 53 | ---------------------------END-OF-HEADER------------------------------ |
alejandroRL | 0:dd702039127a | 54 | */ |
alejandroRL | 0:dd702039127a | 55 | |
alejandroRL | 0:dd702039127a | 56 | #ifndef GUI_JPEG_PRIVATE_H |
alejandroRL | 0:dd702039127a | 57 | #define GUI_JPEG_PRIVATE_H |
alejandroRL | 0:dd702039127a | 58 | |
alejandroRL | 0:dd702039127a | 59 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 60 | * |
alejandroRL | 0:dd702039127a | 61 | * Defines |
alejandroRL | 0:dd702039127a | 62 | * |
alejandroRL | 0:dd702039127a | 63 | ********************************************************************** |
alejandroRL | 0:dd702039127a | 64 | */ |
alejandroRL | 0:dd702039127a | 65 | #define JPEG_LOCK_H(h) (GUI_JPEG_DCONTEXT *)GUI_LOCK_H(h) |
alejandroRL | 0:dd702039127a | 66 | |
alejandroRL | 0:dd702039127a | 67 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 68 | * |
alejandroRL | 0:dd702039127a | 69 | * Scan types |
alejandroRL | 0:dd702039127a | 70 | */ |
alejandroRL | 0:dd702039127a | 71 | #define GRAYSCALE 0 |
alejandroRL | 0:dd702039127a | 72 | #define YH1V1 1 |
alejandroRL | 0:dd702039127a | 73 | #define YH2V1 2 |
alejandroRL | 0:dd702039127a | 74 | #define YH1V2 3 |
alejandroRL | 0:dd702039127a | 75 | #define YH2V2 4 |
alejandroRL | 0:dd702039127a | 76 | |
alejandroRL | 0:dd702039127a | 77 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 78 | * |
alejandroRL | 0:dd702039127a | 79 | * Maximum number of... |
alejandroRL | 0:dd702039127a | 80 | */ |
alejandroRL | 0:dd702039127a | 81 | #define MAX_COMPONENTS 4 |
alejandroRL | 0:dd702039127a | 82 | #define MAX_HUFFTABLES 8 |
alejandroRL | 0:dd702039127a | 83 | #define MAX_QUANTTABLES 4 |
alejandroRL | 0:dd702039127a | 84 | #define MAX_COMPSINSCAN 4 |
alejandroRL | 0:dd702039127a | 85 | #define MAX_BLOCKSPERMCU 10 |
alejandroRL | 0:dd702039127a | 86 | |
alejandroRL | 0:dd702039127a | 87 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 88 | * |
alejandroRL | 0:dd702039127a | 89 | * Marker definitions |
alejandroRL | 0:dd702039127a | 90 | */ |
alejandroRL | 0:dd702039127a | 91 | #define M_SOF0 0xc0 // Start Of Frame |
alejandroRL | 0:dd702039127a | 92 | #define M_SOF1 0xc1 |
alejandroRL | 0:dd702039127a | 93 | #define M_SOF2 0xc2 |
alejandroRL | 0:dd702039127a | 94 | #define M_SOF3 0xc3 |
alejandroRL | 0:dd702039127a | 95 | |
alejandroRL | 0:dd702039127a | 96 | #define M_SOF5 0xc5 |
alejandroRL | 0:dd702039127a | 97 | #define M_SOF6 0xc6 |
alejandroRL | 0:dd702039127a | 98 | #define M_SOF7 0xc7 |
alejandroRL | 0:dd702039127a | 99 | |
alejandroRL | 0:dd702039127a | 100 | #define M_JPG 0xc8 |
alejandroRL | 0:dd702039127a | 101 | #define M_SOF9 0xc9 |
alejandroRL | 0:dd702039127a | 102 | #define M_SOF10 0xca |
alejandroRL | 0:dd702039127a | 103 | #define M_SOF11 0xcb |
alejandroRL | 0:dd702039127a | 104 | |
alejandroRL | 0:dd702039127a | 105 | #define M_SOF13 0xcd |
alejandroRL | 0:dd702039127a | 106 | #define M_SOF14 0xce |
alejandroRL | 0:dd702039127a | 107 | #define M_SOF15 0xcf |
alejandroRL | 0:dd702039127a | 108 | |
alejandroRL | 0:dd702039127a | 109 | #define M_DHT 0xc4 // Define Huffman Table |
alejandroRL | 0:dd702039127a | 110 | |
alejandroRL | 0:dd702039127a | 111 | #define M_DAC 0xcc // Define Arithmetic Coding Table |
alejandroRL | 0:dd702039127a | 112 | |
alejandroRL | 0:dd702039127a | 113 | #define M_RST0 0xd0 |
alejandroRL | 0:dd702039127a | 114 | #define M_RST1 0xd1 |
alejandroRL | 0:dd702039127a | 115 | #define M_RST2 0xd2 |
alejandroRL | 0:dd702039127a | 116 | #define M_RST3 0xd3 |
alejandroRL | 0:dd702039127a | 117 | #define M_RST4 0xd4 |
alejandroRL | 0:dd702039127a | 118 | #define M_RST5 0xd5 |
alejandroRL | 0:dd702039127a | 119 | #define M_RST6 0xd6 |
alejandroRL | 0:dd702039127a | 120 | #define M_RST7 0xd7 |
alejandroRL | 0:dd702039127a | 121 | |
alejandroRL | 0:dd702039127a | 122 | #define M_SOI 0xd8 // Start Of Image |
alejandroRL | 0:dd702039127a | 123 | #define M_EOI 0xd9 |
alejandroRL | 0:dd702039127a | 124 | #define M_SOS 0xda // Start Of Scan |
alejandroRL | 0:dd702039127a | 125 | #define M_DQT 0xdb // Define Quantisation Table |
alejandroRL | 0:dd702039127a | 126 | #define M_DRI 0xdd // Define Restart Interval |
alejandroRL | 0:dd702039127a | 127 | |
alejandroRL | 0:dd702039127a | 128 | #define M_APP0 0xe0 // Application Usage |
alejandroRL | 0:dd702039127a | 129 | #define M_APP14 0xee // Adobe marker |
alejandroRL | 0:dd702039127a | 130 | |
alejandroRL | 0:dd702039127a | 131 | #define M_TEM 0x01 |
alejandroRL | 0:dd702039127a | 132 | |
alejandroRL | 0:dd702039127a | 133 | #define ADOBE_TRANSFORM_RGB 0 |
alejandroRL | 0:dd702039127a | 134 | #define ADOBE_TRANSFORM_YCBCR 1 |
alejandroRL | 0:dd702039127a | 135 | |
alejandroRL | 0:dd702039127a | 136 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 137 | * |
alejandroRL | 0:dd702039127a | 138 | * Types |
alejandroRL | 0:dd702039127a | 139 | * |
alejandroRL | 0:dd702039127a | 140 | ********************************************************************** |
alejandroRL | 0:dd702039127a | 141 | */ |
alejandroRL | 0:dd702039127a | 142 | // |
alejandroRL | 0:dd702039127a | 143 | // Default parameter structure for reading data from memory |
alejandroRL | 0:dd702039127a | 144 | // |
alejandroRL | 0:dd702039127a | 145 | typedef struct { |
alejandroRL | 0:dd702039127a | 146 | const U8 * pFileData; |
alejandroRL | 0:dd702039127a | 147 | I32 FileSize; |
alejandroRL | 0:dd702039127a | 148 | } GUI_JPEG_PARAM; |
alejandroRL | 0:dd702039127a | 149 | |
alejandroRL | 0:dd702039127a | 150 | // |
alejandroRL | 0:dd702039127a | 151 | // Huffman table definition |
alejandroRL | 0:dd702039127a | 152 | // |
alejandroRL | 0:dd702039127a | 153 | typedef struct { |
alejandroRL | 0:dd702039127a | 154 | unsigned aLookUp[256]; |
alejandroRL | 0:dd702039127a | 155 | U8 aCodeSize[256]; |
alejandroRL | 0:dd702039127a | 156 | unsigned aTree[512]; |
alejandroRL | 0:dd702039127a | 157 | } HUFF_TABLE; |
alejandroRL | 0:dd702039127a | 158 | |
alejandroRL | 0:dd702039127a | 159 | // |
alejandroRL | 0:dd702039127a | 160 | // Coefficient buffer used for progressive JPEGs |
alejandroRL | 0:dd702039127a | 161 | // |
alejandroRL | 0:dd702039127a | 162 | typedef struct { |
alejandroRL | 0:dd702039127a | 163 | int NumBlocksX; |
alejandroRL | 0:dd702039127a | 164 | int NumBlocksY; |
alejandroRL | 0:dd702039127a | 165 | unsigned BlockSize; |
alejandroRL | 0:dd702039127a | 166 | GUI_HMEM hData; |
alejandroRL | 0:dd702039127a | 167 | } COEFF_BUFFER; |
alejandroRL | 0:dd702039127a | 168 | |
alejandroRL | 0:dd702039127a | 169 | typedef struct GUI_JPEG_DCONTEXT GUI_JPEG_DCONTEXT; |
alejandroRL | 0:dd702039127a | 170 | |
alejandroRL | 0:dd702039127a | 171 | struct GUI_JPEG_DCONTEXT { |
alejandroRL | 0:dd702039127a | 172 | // |
alejandroRL | 0:dd702039127a | 173 | // Function pointer for reading one byte |
alejandroRL | 0:dd702039127a | 174 | // |
alejandroRL | 0:dd702039127a | 175 | int (* pfGetU8)(GUI_JPEG_DCONTEXT * pContext, U8 * pByte); |
alejandroRL | 0:dd702039127a | 176 | |
alejandroRL | 0:dd702039127a | 177 | GUI_GET_DATA_FUNC * pfGetData; // 'GetData' Function pointer |
alejandroRL | 0:dd702039127a | 178 | void * pParam; // Pointer passed to 'GetData' function |
alejandroRL | 0:dd702039127a | 179 | U32 Off; // Data pointer |
alejandroRL | 0:dd702039127a | 180 | // |
alejandroRL | 0:dd702039127a | 181 | // Image size |
alejandroRL | 0:dd702039127a | 182 | // |
alejandroRL | 0:dd702039127a | 183 | U16 xSize; |
alejandroRL | 0:dd702039127a | 184 | U16 ySize; |
alejandroRL | 0:dd702039127a | 185 | // |
alejandroRL | 0:dd702039127a | 186 | // Input buffer |
alejandroRL | 0:dd702039127a | 187 | // |
alejandroRL | 0:dd702039127a | 188 | const U8 * pBuffer; |
alejandroRL | 0:dd702039127a | 189 | unsigned NumBytesInBuffer; |
alejandroRL | 0:dd702039127a | 190 | U8 StartOfFile; |
alejandroRL | 0:dd702039127a | 191 | U8 aStuff[4]; // Stuff back buffer |
alejandroRL | 0:dd702039127a | 192 | U8 NumBytesStuffed; // Number of stuffed bytes |
alejandroRL | 0:dd702039127a | 193 | // |
alejandroRL | 0:dd702039127a | 194 | // Bit buffer |
alejandroRL | 0:dd702039127a | 195 | // |
alejandroRL | 0:dd702039127a | 196 | U32 BitBuffer; |
alejandroRL | 0:dd702039127a | 197 | int NumBitsLeft; |
alejandroRL | 0:dd702039127a | 198 | // |
alejandroRL | 0:dd702039127a | 199 | // Huffman tables |
alejandroRL | 0:dd702039127a | 200 | // |
alejandroRL | 0:dd702039127a | 201 | U8 aHuffNumTableAvail[MAX_HUFFTABLES]; |
alejandroRL | 0:dd702039127a | 202 | U8 aaHuffNum[MAX_HUFFTABLES][17]; // Pointer to number of Huffman codes per bit size |
alejandroRL | 0:dd702039127a | 203 | U8 aaHuffVal[MAX_HUFFTABLES][256]; // Pointer to Huffman codes |
alejandroRL | 0:dd702039127a | 204 | HUFF_TABLE aHuffTable[MAX_HUFFTABLES]; |
alejandroRL | 0:dd702039127a | 205 | HUFF_TABLE * apDC_Huff[MAX_BLOCKSPERMCU]; |
alejandroRL | 0:dd702039127a | 206 | HUFF_TABLE * apAC_Huff[MAX_BLOCKSPERMCU]; |
alejandroRL | 0:dd702039127a | 207 | // |
alejandroRL | 0:dd702039127a | 208 | // Quantization tables |
alejandroRL | 0:dd702039127a | 209 | // |
alejandroRL | 0:dd702039127a | 210 | U16 aaQuantTbl[MAX_QUANTTABLES][64]; |
alejandroRL | 0:dd702039127a | 211 | U16 * apQuantTbl[MAX_QUANTTABLES]; |
alejandroRL | 0:dd702039127a | 212 | // |
alejandroRL | 0:dd702039127a | 213 | // Component information |
alejandroRL | 0:dd702039127a | 214 | // |
alejandroRL | 0:dd702039127a | 215 | U8 NumCompsPerFrame; // Number of components per frame |
alejandroRL | 0:dd702039127a | 216 | U8 aCompHSamp[MAX_COMPONENTS]; // Component's horizontal sampling factor |
alejandroRL | 0:dd702039127a | 217 | U8 aCompVSamp[MAX_COMPONENTS]; // Component's vertical sampling factor |
alejandroRL | 0:dd702039127a | 218 | U8 aCompQuant[MAX_COMPONENTS]; // Component's quantization table selector |
alejandroRL | 0:dd702039127a | 219 | U8 aCompId [MAX_COMPONENTS]; // Component's ID |
alejandroRL | 0:dd702039127a | 220 | U8 NumCompsPerScan; // Number of components per scan |
alejandroRL | 0:dd702039127a | 221 | U8 aCompList[MAX_COMPSINSCAN]; // Components in this scan |
alejandroRL | 0:dd702039127a | 222 | U8 aCompDC_Tab[MAX_COMPONENTS]; // Component's DC Huffman coding table selector |
alejandroRL | 0:dd702039127a | 223 | U8 aCompAC_Tab[MAX_COMPONENTS]; // Component's AC Huffman coding table selector |
alejandroRL | 0:dd702039127a | 224 | unsigned * apComponent[MAX_BLOCKSPERMCU]; // Points into the table aLastDC_Val[] |
alejandroRL | 0:dd702039127a | 225 | unsigned aLastDC_Val[MAX_COMPONENTS]; // Table of last DC values |
alejandroRL | 0:dd702039127a | 226 | // |
alejandroRL | 0:dd702039127a | 227 | // Data used for progressive scans |
alejandroRL | 0:dd702039127a | 228 | // |
alejandroRL | 0:dd702039127a | 229 | U8 SpectralStart; // Spectral selection start |
alejandroRL | 0:dd702039127a | 230 | U8 SpectralEnd; // Spectral selection end |
alejandroRL | 0:dd702039127a | 231 | U8 SuccessiveLow; // Successive approximation low |
alejandroRL | 0:dd702039127a | 232 | U8 SuccessiveHigh; // Successive approximation high |
alejandroRL | 0:dd702039127a | 233 | COEFF_BUFFER aDC_Coeffs[MAX_COMPONENTS]; // DC coefficient buffer for progressive scan |
alejandroRL | 0:dd702039127a | 234 | COEFF_BUFFER aAC_Coeffs[MAX_COMPONENTS]; // AC coefficient buffer for progressive scan |
alejandroRL | 0:dd702039127a | 235 | int aBlockY_MCU[MAX_COMPONENTS]; // |
alejandroRL | 0:dd702039127a | 236 | // |
alejandroRL | 0:dd702039127a | 237 | // Common |
alejandroRL | 0:dd702039127a | 238 | // |
alejandroRL | 0:dd702039127a | 239 | U8 TransformationRequired; |
alejandroRL | 0:dd702039127a | 240 | U8 IsProgressive; // Flag is set to 1 if JPEG is progressive |
alejandroRL | 0:dd702039127a | 241 | U8 ScanType; // Gray, Yh1v1, Yh1v2, Yh2v1, Yh2v2 |
alejandroRL | 0:dd702039127a | 242 | int MaxMCUsPerRow; // Maximum number of MCUs per row |
alejandroRL | 0:dd702039127a | 243 | int MaxMCUsPerCol; // Maximum number of MCUs per column |
alejandroRL | 0:dd702039127a | 244 | int MaxBlocksPerMCU; // Maximum number of blocks per MCU |
alejandroRL | 0:dd702039127a | 245 | int MaxBlocksPerRow; // Maximum number of blocks per row |
alejandroRL | 0:dd702039127a | 246 | int MaxMCU_xSize; // MCU's max. X size in pixels |
alejandroRL | 0:dd702039127a | 247 | int MaxMCU_ySize; // MCU's max. Y size in pixels |
alejandroRL | 0:dd702039127a | 248 | int DestBytesPerPixel; // 4 (RGB) or 1 (Y) |
alejandroRL | 0:dd702039127a | 249 | int DestBytesPerScanline; // Rounded up |
alejandroRL | 0:dd702039127a | 250 | int RealDestBytesPerScanline; // Actual bytes |
alejandroRL | 0:dd702039127a | 251 | int EOB_Run; // 'End Of Band' run |
alejandroRL | 0:dd702039127a | 252 | int RestartInterval; |
alejandroRL | 0:dd702039127a | 253 | int RestartsLeft; |
alejandroRL | 0:dd702039127a | 254 | int NextRestartNum; |
alejandroRL | 0:dd702039127a | 255 | int MCUsPerRow; |
alejandroRL | 0:dd702039127a | 256 | int MCUsPerCol; |
alejandroRL | 0:dd702039127a | 257 | int NumBlocksPerMCU; |
alejandroRL | 0:dd702039127a | 258 | int aMCU_Org[MAX_BLOCKSPERMCU]; |
alejandroRL | 0:dd702039127a | 259 | // |
alejandroRL | 0:dd702039127a | 260 | // Block buffer |
alejandroRL | 0:dd702039127a | 261 | // |
alejandroRL | 0:dd702039127a | 262 | GUI_HMEM hBlocks; |
alejandroRL | 0:dd702039127a | 263 | GUI_HMEM hBlockMaxZagSet; |
alejandroRL | 0:dd702039127a | 264 | // |
alejandroRL | 0:dd702039127a | 265 | // Sample buffer |
alejandroRL | 0:dd702039127a | 266 | // |
alejandroRL | 0:dd702039127a | 267 | GUI_HMEM hSampleBuf; |
alejandroRL | 0:dd702039127a | 268 | U8 * pSampleBuf; |
alejandroRL | 0:dd702039127a | 269 | // |
alejandroRL | 0:dd702039127a | 270 | // Status |
alejandroRL | 0:dd702039127a | 271 | // |
alejandroRL | 0:dd702039127a | 272 | int TotalLinesLeft; // Total number of lines left in image |
alejandroRL | 0:dd702039127a | 273 | int MCULinesLeft; // Total number of lines left in current MCU |
alejandroRL | 0:dd702039127a | 274 | // |
alejandroRL | 0:dd702039127a | 275 | // Output buffer(s) |
alejandroRL | 0:dd702039127a | 276 | // |
alejandroRL | 0:dd702039127a | 277 | GUI_HMEM hScanLine0; // Buffer 0 |
alejandroRL | 0:dd702039127a | 278 | GUI_HMEM hScanLine1; // Buffer 1, only used for V2 sampling factors |
alejandroRL | 0:dd702039127a | 279 | U8 BufferIndex; |
alejandroRL | 0:dd702039127a | 280 | // |
alejandroRL | 0:dd702039127a | 281 | // Arrays used for converting YCbCr to RGB |
alejandroRL | 0:dd702039127a | 282 | // |
alejandroRL | 0:dd702039127a | 283 | int aCRR[256]; |
alejandroRL | 0:dd702039127a | 284 | int aCBB[256]; |
alejandroRL | 0:dd702039127a | 285 | I32 aCRG[256]; |
alejandroRL | 0:dd702039127a | 286 | I32 aCBG[256]; |
alejandroRL | 0:dd702039127a | 287 | // |
alejandroRL | 0:dd702039127a | 288 | // Banding |
alejandroRL | 0:dd702039127a | 289 | // |
alejandroRL | 0:dd702039127a | 290 | U8 BandingRequired; // Flag if banding is required |
alejandroRL | 0:dd702039127a | 291 | unsigned NumBands; // Number of required bands for drawing the complete frame |
alejandroRL | 0:dd702039127a | 292 | int NumBlocksPerBand; // Number of vertical blocks per band |
alejandroRL | 0:dd702039127a | 293 | int FirstBlockOfBand; |
alejandroRL | 0:dd702039127a | 294 | int aFirstBlockOfBand[MAX_COMPONENTS]; |
alejandroRL | 0:dd702039127a | 295 | }; |
alejandroRL | 0:dd702039127a | 296 | |
alejandroRL | 0:dd702039127a | 297 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 298 | * |
alejandroRL | 0:dd702039127a | 299 | * Private interface |
alejandroRL | 0:dd702039127a | 300 | * |
alejandroRL | 0:dd702039127a | 301 | ********************************************************************** |
alejandroRL | 0:dd702039127a | 302 | */ |
alejandroRL | 0:dd702039127a | 303 | int GUI_JPEG__AllocBandingCoeffBuffer (GUI_HMEM hContext); |
alejandroRL | 0:dd702039127a | 304 | int GUI_JPEG__DecodeLine (GUI_JPEG_DCONTEXT * pContext); |
alejandroRL | 0:dd702039127a | 305 | int GUI_JPEG__DecodeProgressiveBanding(GUI_JPEG_DCONTEXT * pContext); |
alejandroRL | 0:dd702039127a | 306 | void GUI_JPEG__Free (GUI_JPEG_DCONTEXT * pContext); |
alejandroRL | 0:dd702039127a | 307 | GUI_COLOR GUI_JPEG__GetColorGray (const U8 ** ppData, unsigned SkipCnt); |
alejandroRL | 0:dd702039127a | 308 | GUI_COLOR GUI_JPEG__GetColorRGB (const U8 ** ppData, unsigned SkipCnt); |
alejandroRL | 0:dd702039127a | 309 | int GUI_JPEG__GetData (void * p, const U8 ** ppData, unsigned NumBytesReq, U32 Off); |
alejandroRL | 0:dd702039127a | 310 | int GUI_JPEG__InitDraw (GUI_HMEM hContext); |
alejandroRL | 0:dd702039127a | 311 | int GUI_JPEG__ReadUntilSOF (GUI_HMEM hContext); |
alejandroRL | 0:dd702039127a | 312 | void GUI_JPEG__SetNextBand (GUI_JPEG_DCONTEXT * pContext); |
alejandroRL | 0:dd702039127a | 313 | int GUI_JPEG__SkipLine (GUI_JPEG_DCONTEXT * pContext); |
alejandroRL | 0:dd702039127a | 314 | int GUI_JPEG__GetInfoEx (GUI_HMEM hContext, GUI_JPEG_INFO * pInfo); |
alejandroRL | 0:dd702039127a | 315 | |
alejandroRL | 0:dd702039127a | 316 | #endif |
alejandroRL | 0:dd702039127a | 317 | |
alejandroRL | 0:dd702039127a | 318 | /*************************** End of file ****************************/ |