1 //<MStar Software> 2 //****************************************************************************** 3 // MStar Software 4 // Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved. 5 // All software, firmware and related documentation herein ("MStar Software") are 6 // intellectual property of MStar Semiconductor, Inc. ("MStar") and protected by 7 // law, including, but not limited to, copyright law and international treaties. 8 // Any use, modification, reproduction, retransmission, or republication of all 9 // or part of MStar Software is expressly prohibited, unless prior written 10 // permission has been granted by MStar. 11 // 12 // By accessing, browsing and/or using MStar Software, you acknowledge that you 13 // have read, understood, and agree, to be bound by below terms ("Terms") and to 14 // comply with all applicable laws and regulations: 15 // 16 // 1. MStar shall retain any and all right, ownership and interest to MStar 17 // Software and any modification/derivatives thereof. 18 // No right, ownership, or interest to MStar Software and any 19 // modification/derivatives thereof is transferred to you under Terms. 20 // 21 // 2. You understand that MStar Software might include, incorporate or be 22 // supplied together with third party`s software and the use of MStar 23 // Software may require additional licenses from third parties. 24 // Therefore, you hereby agree it is your sole responsibility to separately 25 // obtain any and all third party right and license necessary for your use of 26 // such third party`s software. 27 // 28 // 3. MStar Software and any modification/derivatives thereof shall be deemed as 29 // MStar`s confidential information and you agree to keep MStar`s 30 // confidential information in strictest confidence and not disclose to any 31 // third party. 32 // 33 // 4. MStar Software is provided on an "AS IS" basis without warranties of any 34 // kind. Any warranties are hereby expressly disclaimed by MStar, including 35 // without limitation, any warranties of merchantability, non-infringement of 36 // intellectual property rights, fitness for a particular purpose, error free 37 // and in conformity with any international standard. You agree to waive any 38 // claim against MStar for any loss, damage, cost or expense that you may 39 // incur related to your use of MStar Software. 40 // In no event shall MStar be liable for any direct, indirect, incidental or 41 // consequential damages, including without limitation, lost of profit or 42 // revenues, lost or damage of data, and unauthorized system use. 43 // You agree that this Section 4 shall still apply without being affected 44 // even if MStar Software has been modified by MStar in accordance with your 45 // request or instruction for your use, except otherwise agreed by both 46 // parties in writing. 47 // 48 // 5. If requested, MStar may from time to time provide technical supports or 49 // services in relation with MStar Software to you for your use of 50 // MStar Software in conjunction with your or your customer`s product 51 // ("Services"). 52 // You understand and agree that, except otherwise agreed by both parties in 53 // writing, Services are provided on an "AS IS" basis and the warranty 54 // disclaimer set forth in Section 4 above shall apply. 55 // 56 // 6. Nothing contained herein shall be construed as by implication, estoppels 57 // or otherwise: 58 // (a) conferring any license or right to use MStar name, trademark, service 59 // mark, symbol or any other identification; 60 // (b) obligating MStar or any of its affiliates to furnish any person, 61 // including without limitation, you and your customers, any assistance 62 // of any kind whatsoever, or any information; or 63 // (c) conferring any license or right under any intellectual property right. 64 // 65 // 7. These terms shall be governed by and construed in accordance with the laws 66 // of Taiwan, R.O.C., excluding its conflict of law rules. 67 // Any and all dispute arising out hereof or related hereto shall be finally 68 // settled by arbitration referred to the Chinese Arbitration Association, 69 // Taipei in accordance with the ROC Arbitration Law and the Arbitration 70 // Rules of the Association by three (3) arbitrators appointed in accordance 71 // with the said Rules. 72 // The place of arbitration shall be in Taipei, Taiwan and the language shall 73 // be English. 74 // The arbitration award shall be final and binding to both parties. 75 // 76 //****************************************************************************** 77 //<MStar Software> 78 //////////////////////////////////////////////////////////////////////////////// 79 // 80 // Copyright (c) 2008-2009 MStar Semiconductor, Inc. 81 // All rights reserved. 82 // 83 // Unless otherwise stipulated in writing, any and all information contained 84 // herein regardless in any format shall remain the sole proprietary of 85 // MStar Semiconductor Inc. and be kept in strict confidence 86 // ("MStar Confidential Information") by the recipient. 87 // Any unauthorized act including without limitation unauthorized disclosure, 88 // copying, use, reproduction, sale, distribution, modification, disassembling, 89 // reverse engineering and compiling of the contents of MStar Confidential 90 // Information is unlawful and strictly prohibited. MStar hereby reserves the 91 // rights to any and all damages, losses, costs and expenses resulting therefrom. 92 // 93 //////////////////////////////////////////////////////////////////////////////// 94 95 #ifndef _JPEG_CMODEL_DEF_H 96 #define _JPEG_CMODEL_DEF_H 97 98 #include <stdio.h> 99 100 #define JPEG_STATIC 101 102 /********************************************************************************/ 103 /* Char definition : 2 bytes font talbe */ 104 /********************************************************************************/ 105 #define CHAR_RETURNICON 0X0019 106 #define CHAR_ENTERICON 0X001A 107 #define CHAR_MOVEICON 0X001B 108 #define CHAR_UP 0x001C 109 #define CHAR_DOWN 0X001D 110 #define CHAR_LEFT 0X001E 111 #define CHAR_RIGHT 0X001F 112 #define CHAR_SPACE 0x0020 113 #define CHAR_PERCENT 0x0025 114 #define CHAR_APOSTROPHE 0x0027 115 #define CHAR_LEFT_QUOTE 0x0028 116 #define CHAR_RIGHT_QUOTE 0x0029 117 #define CHAR_STAR 0x002A 118 #define CHAR_PLUS 0x002B 119 #define CHAR_COMMA 0x002C 120 #define CHAR_MINUS 0x002D 121 #define CHAR_DOT 0x002E 122 #define CHAR_SLASH 0x002F 123 #define CHAR_0 0x0030 124 #define CHAR_1 0x0031 125 #define CHAR_2 0x0032 126 #define CHAR_3 0x0033 127 #define CHAR_4 0x0034 128 #define CHAR_5 0x0035 129 #define CHAR_6 0x0036 130 #define CHAR_7 0x0037 131 #define CHAR_8 0x0038 132 #define CHAR_9 0x0039 133 #define CHAR_COLON 0x003A 134 #define CHAR_GT 0x003E 135 #define CHAR_QM 0x003F 136 #define CHAR_AT 0x0040 137 #define CHAR_A 0x0041 138 #define CHAR_B 0x0042 139 #define CHAR_C 0x0043 140 #define CHAR_D 0x0044 141 #define CHAR_E 0x0045 142 #define CHAR_F 0x0046 143 #define CHAR_G 0x0047 144 #define CHAR_H 0x0048 145 #define CHAR_I 0x0049 146 #define CHAR_J 0x004A 147 #define CHAR_K 0x004B 148 #define CHAR_L 0x004C 149 #define CHAR_M 0x004D 150 #define CHAR_N 0x004E 151 #define CHAR_O 0x004F 152 #define CHAR_P 0x0050 153 #define CHAR_Q 0x0051 154 #define CHAR_R 0x0052 155 #define CHAR_S 0x0053 156 #define CHAR_T 0x0054 157 #define CHAR_U 0x0055 158 #define CHAR_V 0x0056 159 #define CHAR_W 0x0057 160 #define CHAR_X 0x0058 161 #define CHAR_Y 0x0059 162 #define CHAR_Z 0x005A 163 #define CHAR_US 0x005f 164 #define CHAR_a 0x0061 165 #define CHAR_b 0x0062 166 #define CHAR_c 0x0063 167 #define CHAR_d 0x0064 168 #define CHAR_e 0x0065 169 #define CHAR_f 0x0066 170 #define CHAR_g 0x0067 171 #define CHAR_h 0x0068 172 #define CHAR_i 0x0069 173 #define CHAR_j 0x006A 174 #define CHAR_k 0x006B 175 #define CHAR_l 0x006C 176 #define CHAR_m 0x006D 177 #define CHAR_n 0x006E 178 #define CHAR_o 0x006F 179 #define CHAR_p 0x0070 180 #define CHAR_q 0x0071 181 #define CHAR_r 0x0072 182 #define CHAR_s 0x0073 183 #define CHAR_t 0x0074 184 #define CHAR_u 0x0075 185 #define CHAR_v 0x0076 186 #define CHAR_w 0x0077 187 #define CHAR_x 0x0078 188 #define CHAR_y 0x0079 189 #define CHAR_z 0x007A 190 #define CHAR_CC 0x010D 191 #define CHAR_SIGNAL 0x0121 192 //extended ASCII 193 #define CHAR_EXT_C 0x00C7 194 #define CHAR_EXT_c 0x00E7 195 #define CHAR_EXT_e 0x00E9 196 #define CHAR_EXT_e2 0x00E8 197 #define CHAR_EXT_e3 0x00EA 198 #define CHAR_EXT_e4 0x00EB 199 #define CHAR_EXT_E2 0x00C8 200 #define CHAR_EXT_E3 0x00C9 201 #define CHAR_EXT_O 0x00D3 202 #define CHAR_EXT_a 0x00E1 203 #define CHAR_EXT_a1 0x00E0 204 #define CHAR_EXT_a2 0x00E2 205 #define CHAR_EXT_A 0x00C1 206 #define CHAR_EXT_u 0x00FA 207 #define CHAR_EXT_U 0x00DA 208 #define CHAR_EXT_n 0x00F1 209 #define CHAR_EXT_N 0x00D1 210 #define CHAR_EXT_I 0x00CD 211 #define CHAR_EXT_i 0x00ED 212 #define CHAR_EXT_i2 0x00EE 213 #define CHAR_EXT_o 0x00F3 214 215 #define MS_VA2PA(_addr_) ((MS_U32)(_addr_)) 216 #define MS_PA2KSEG0(_addr_) ((MS_U32)(_addr_)) 217 #define MS_PA2KSEG1(_addr_) ((MS_U32)(_addr_)) 218 219 #define JPEG_memcpy(pDstAddr, pSrcAddr, u32Size) memcpy((pDstAddr), (pSrcAddr), (u32Size)) 220 #define JPEG_memset(pDstAddr, u8value, u32Size) memset((pDstAddr), (u8value), (u32Size)) 221 #define JPEG_AtoU32(pData, u32value) \ 222 do { \ 223 u32value = 0; \ 224 while(('0' <= *pData) && ('9' >= *pData)) \ 225 { \ 226 u32value = (10 * u32value) + (MS_U32)(*pData - '0'); \ 227 pData++; \ 228 } \ 229 }while(0) 230 231 /********************************************************************************/ 232 /* Primitive types */ 233 /********************************************************************************/ 234 #define ROM //code 235 #define PRIVATE static 236 237 typedef unsigned char BIT; 238 typedef unsigned char U8; 239 typedef unsigned short U16; // WORD, U16 240 typedef unsigned long U32; 241 typedef unsigned long long U64; 242 typedef signed char S8; 243 typedef signed short S16; 244 typedef signed long S32; 245 typedef signed long long S64; 246 247 typedef void VOID; 248 typedef U8 BOOL; // BOOLEAN, BOOL, bool, boolean 249 250 typedef U8 BitField8; /* 8 bit bit field */ 251 typedef U16 BitField16; /* 16 bit bit field */ // same with BitField 252 typedef U32 BitField32; /* 32 bit bit field */ 253 typedef S32 FILEID; 254 255 typedef U32 MS_U32; 256 typedef U16 MS_U16; 257 typedef U8 MS_U8; 258 typedef S32 MS_S32; 259 typedef S16 MS_S16; 260 typedef S8 MS_S8; 261 typedef BOOL MS_BOOL; 262 263 /// data type hardware physical address 264 typedef U32 MS_PHYADDR; // 32bit physical address 265 266 /// union for long16 (16 bits/ 2 bytes) 267 typedef union LONG16_BYTE_t 268 { 269 U16 u16Num; ///< 16bits 270 U8 u8Num[2]; ///< 8 bits x 2 271 // Big Endian 272 // u8Num[0] MSB 273 // u8Num[1] LSB 274 // Little Endian 275 // u8Num[0] LSB 276 // u8Num[1] MSB 277 } LONG16_BYTE; 278 279 /// union for long32 (32 bits/ 4 bytes) 280 typedef union LONG32_BYTE_t 281 { 282 U32 u32Num; ///< 32bits 283 U16 u16Num[2]; ///< 16bits x2 284 U8 u8Num[4]; ///< 8 bits x4 285 // Big Endian 286 // u8Num[0] MSB 287 // u8Num[1] 288 // u8Num[2] 289 // u8Num[3] LSB 290 // Little Endian 291 // u8Num[0] LSB 292 // u8Num[1] 293 // u8Num[2] 294 // u8Num[3] MSB 295 } LONG32_BYTE; 296 297 /// union for float (32 bits/ 4 bytes) 298 typedef union FLOAT_BYTE_T 299 { 300 float fvalue; ///< 32bits float 301 U8 u8Num[4]; ///< 8 bits x 4 302 } FLOAT_BYTE; 303 304 #if 0 305 /********************************************************************************/ 306 /* Macro for TDA1236D */ 307 /********************************************************************************/ 308 #define Data8 U8 309 #define Data16 S16 310 #define Data32 S32 311 #define bool BOOL 312 #define Bool BOOL 313 #define true TRUE 314 #define false FALSE 315 #endif 316 317 /********************************************************************************/ 318 /* Macro for endianess */ 319 /********************************************************************************/ 320 321 #ifdef _BGEDIAN 322 #define BE2ME16(x) (x) 323 #define BE2ME32(x) (x) 324 #define LE2ME16(x) ByteSwap16(x) 325 #define LE2ME32(x) ByteSwap32(x) 326 327 #define VARBYTE(var, n) (((U8 *)&(var))[n]) 328 #else 329 #define BE2ME16(x) ByteSwap16(x) 330 #define BE2ME32(x) ByteSwap32(x) 331 #define LE2ME16(x) (x) 332 #define LE2ME32(x) (x) 333 334 #define VARBYTE(var, n) (((U8 *)&(var))[sizeof(var) - n - 1]) 335 #endif 336 337 #define ReadU16BE(b) (((b)[0]<<8)|((b)[1])) 338 #define ReadU16LE(b) (((b)[1]<<8)|((b)[0])) 339 #define ReadU32BE(b) (((b)[0]<<24)|((b)[1]<<16)|((b)[2]<<8)|((b)[3])) 340 #define ReadU32LE(b) (((b)[3]<<24)|((b)[2]<<16)|((b)[1]<<8)|((b)[0])) 341 342 #define ByteSwap16(x) (((x) & 0x00ff) << 8 | ((x) & 0xff00) >> 8) 343 #define ByteSwap32(x) \ 344 ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \ 345 (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24)) 346 347 #define GETU32BYTE(var, n) *((U8 *)(&(var))+(n)) // n should be 0, 1, 2 or 3 348 #define GETU16BYTE(var, n) *((U8 *)(&(var))+(n)) // n should be 0 or 1 349 350 ///----------------------------------------------------------------------------- 351 /* Macro for bitwise */ 352 ///----------------------------------------------------------------------------- 353 // U8<->U4 354 #define HIGHNIBBLE(u8) ((U8)(u8) >> 4) 355 #define LOWNIBBLE(u8) ((U8)(u8) & 0x0f) 356 // U16<->U8 357 #define HIGHBYTE(u16) ((U8)((u16) >> 8)) 358 #define LOWBYTE(u16) ((U8)(u16)) 359 #define MAKEWORD(HiByte, LowByte) ((((U16)(HiByte)) * 0x100) + (LowByte)) 360 // U32<->U16 361 #define HIGHU16(u32) ((U16)(u32>>16)) 362 #define LOWU16(u32) ((U16)(u32)) 363 #define MAKEU32(u16HiVal, u16LoVal) ( (U32)(u16HiVal)<<16 | (U32)(u16LoVal) ) 364 365 366 #define BIT(loc) (1U << (loc)) // BIT, BITFLAG 367 #define MASK(x) (((1<<(x##_BITS))-1) << x##_SHIFT) 368 #define _BITMASK(loc_msb, loc_lsb) ( BIT(loc_msb+1) - BIT(loc_lsb) ) // _BITMASK, _MASK1 369 #define BITMASK(x) _BITMASK(((1)?x),((0)?x)) // BITMASK(2:4), _MASK(2:4) 370 371 372 /// Macros for setting/clearing of bits 373 #define SETBIT(_data, _bit) ((_data) |= (0x1 << (_bit))) 374 #define CLRBIT(_data, _bit) ((_data) &= ~(0x1 << (_bit))) 375 #define GETBIT(_data, _bit) (((_data) >> (_bit)) & 0X1) 376 #define COMPLEMENT(a) (~(a)) 377 378 379 #define BIT0 0x0001 380 #define BIT1 0x0002 381 #define BIT2 0x0004 382 #define BIT3 0x0008 383 #define BIT4 0x0010 384 #define BIT5 0x0020 385 #define BIT6 0x0040 386 #define BIT7 0x0080 387 #define BIT8 0x0100 388 #define BIT9 0x0200 389 #define BIT10 0x0400 390 #define BIT11 0x0800 391 #define BIT12 0x1000 392 #define BIT13 0x2000 393 #define BIT14 0x4000 394 #define BIT15 0x8000 395 396 ///----------------------------------------------------------------------------- 397 /* Boolean value and Return value */ 398 ///----------------------------------------------------------------------------- 399 #undef NULL 400 #define NULL 0 401 402 /// define MSRET U8 403 typedef U8 MSRET; 404 /// 0: MS Return Error 405 #define MSRET_ERROR 0 406 /// 1: MS Return OK 407 #define MSRET_OK 1 408 409 /// 0: FALSE 410 #define FALSE 0 411 /// 1: TRUE 412 #define TRUE 1 413 414 /// 0: FAIL 415 #define FAIL 0 416 /// 1: PASS 417 #define PASS 1 418 419 /// 0: Disable 420 #define DISABLE 0 421 /// 1: Enable 422 #define ENABLE 1 423 424 /// 0: NO 425 #define NO 0 426 /// 1: YES 427 #define YES 1 428 429 /// 0: Not highlight 430 #define NONE_HIGHLIGHT 0 431 /// 1: Highlight 432 #define HIGHLIGHT 1 433 434 /// 0: Front end not lock 435 #define FE_NOT_LOCK 0 436 /// 1: Front end lock 437 #define FE_LOCK 1 438 /// 2: Frond end AGC not lock 439 #define FE_AGC_NOT_LOCK 2 440 441 // Temporary and should be move later 442 /// definition for _ENABLE 443 #define _ENABLE 1 444 /// definition for _DISABLE 445 #define _DISABLE 0 446 447 #define ERROR 0xFFFF 448 #define _END_OF_TBL_ 0xFF // end of register table 449 #define _REG_BASE_TBL -2 450 451 //------------------------------------------------------------------------------------------------- 452 // Version String Definition 453 //------------------------------------------------------------------------------------------------- 454 #define MSIF_TAG {'M','S','I','F'} // MSIF 455 #define MSIF_CLASS {'0','0'} // DRV/API (DDI) 456 #define MSIF_CUS 0x0000 // MStar Common library 457 #define MSIF_MOD 0x0000 // MStar Common library 458 #define MSIF_CHIP 0x000B 459 #define MSIF_CPU '1' 460 #define MSIF_OS '0' 461 462 ///----------------------------------------------------------------------------- 463 /* Handle - Font, Bitmap, Database */ 464 ///----------------------------------------------------------------------------- 465 /// Font handle, handle to font table in memory 466 typedef S8 FONTHANDLE; 467 /// Bitmap handle, handle to bitmap buffer 468 typedef S16 BMPHANDLE; 469 /// Database handle 470 typedef S8 DBHANDLE; 471 472 #define INVALID_FONTHANDLE -1 473 #define INVALID_BMPHANDLE -1 474 #define INVALID_DBHANDLE -1 475 476 477 ///----------------------------------------------------------------------------- 478 /* Macro function */ 479 ///----------------------------------------------------------------------------- 480 #define MIN(a, b) ((a) < (b) ? (a) : (b)) 481 #define MAX(a, b) ((a) > (b) ? (a) : (b)) 482 #define ABS(x) ( ((x)>=0) ? (x) : (-x) ) 483 484 #define BCD2Dec(x) ((((x) >> 4) * 10) + ((x) & 0x0F)) 485 486 #define _CONCAT( a, b ) a##b 487 #define CONCAT( a, b ) _CONCAT( a, b ) 488 489 #define COUNTOF( array ) (sizeof(array) / sizeof((array)[0])) 490 491 #define UNUSED( var ) (void)((var) = (var)) 492 493 #define ALIGN_4(_x) (((_x) + 3) & ~3) 494 #define ALIGN_16(_x) (((_x) + 15) & ~15) // No data type specified, optimized by complier 495 #define ALIGN_32(_x) (((_x) + 31) & ~31) // No data type specified, optimized by complier 496 497 #define DataAlignment_I(n, unit) (((n)/(unit))*(unit)) 498 #define DataAlignment(n, unit) ((((n)+(unit)-1)/(unit))*(unit)) 499 500 typedef struct 501 { 502 U8 bBOOL_0 :1; 503 U8 bBOOL_1 :1; 504 U8 bBOOL_2 :1; 505 U8 bBOOL_3 :1; 506 U8 bBOOL_4 :1; 507 U8 bBOOL_5 :1; 508 U8 bBOOL_6 :1; 509 U8 bBOOL_7 :1; 510 } BOOLEANS; 511 512 513 #ifndef NULL 514 #define NULL (void *)0 515 #endif 516 517 typedef union _MSIF_Version 518 { 519 struct _DDI 520 { 521 MS_U8 tag[4]; 522 MS_U8 class[2]; 523 MS_U16 customer; 524 MS_U16 model; 525 MS_U16 chip; 526 MS_U8 cpu; 527 MS_U8 name[4]; 528 MS_U8 version[2]; 529 MS_U8 build[2]; 530 MS_U8 change[8]; 531 MS_U8 os; 532 } DDI; 533 534 struct _MW 535 { 536 } MW; 537 538 struct _APP 539 { 540 } APP; 541 542 } MSIF_Version; 543 //------------------------------------------------------------------------------ 544 #define JPEG_BLOCK_TYPE MS_S16 545 //------------------------------------------------------------------------------ 546 #define JPEG_QUANT_TYPE MS_S16 547 //------------------------------------------------------------------------------ 548 // May need to be adjusted if support for other colorspaces/sampling factors is added 549 #define JPEG_MAXBLOCKSPERMCU 10 550 //------------------------------------------------------------------------------ 551 #define JPEG_MAXHUFFTABLES 8 552 //------------------------------------------------------------------------------ 553 #define JPEG_MAXQUANTTABLES 4 554 //------------------------------------------------------------------------------ 555 #define JPEG_MAXCOMPONENTS 4 556 //------------------------------------------------------------------------------ 557 #define JPEG_MAXCOMPSINSCAN 4 558 //------------------------------------------------------------------------------ 559 //Increase this if you increase the max width! 560 #define JPEG_MAXBLOCKSPERROW 6144 561 //----------------------------------------------------------------------------- 562 //Description: JPEG scan type 563 typedef enum 564 { 565 E_JPEG_GRAYSCALE = 0 566 , E_JPEG_YH1V1 = 1 567 , E_JPEG_YH2V1 = 2 568 , E_JPEG_YH1V2 = 3 569 , E_JPEG_YH2V2 = 4 570 , E_JPEG_YH4V1 = 5 571 //#if SW_JPD_RGB_CMYK 572 , E_JPEG_CMYK = 6 573 , E_JPEG_RGB = 7 574 //#endif 575 }JPEG_ScanType; 576 //----------------------------------------------------------------------------- 577 /// @brief \b Struct \b Name: JPEG_QuantTbl 578 /// @brief \b Struct \b Description: Structure for JPEG Quantization Table 579 //----------------------------------------------------------------------------- 580 typedef struct //same as JPD_QuanTbl in drvJPD.h 581 { 582 JPEG_QUANT_TYPE s16Value[64]; ///< value of Q table 583 MS_BOOL bValid; ///< has Q table or not. 584 } JPEG_QuantTbl; 585 //----------------------------------------------------------------------------- 586 /// @brief \b Struct \b Name: JPEG_HuffInfo 587 /// @brief \b Struct \b Description: Structure for JPEG huffman information 588 //----------------------------------------------------------------------------- 589 typedef struct 590 { 591 MS_U8 u8Huff_num[17]; ///< number of Huffman codes per bit size 592 MS_U8 u8Huff_val[256]; ///< Huffman codes per bit size 593 594 MS_U8 u8Symbol[17]; ///< u8Huff_num in reverse order 595 MS_U16 u16Code[17]; ///< Minimun code word 596 MS_BOOL bValid; ///< has huffman table or not 597 } JPEG_HuffInfo; 598 //----------------------------------------------------------------------------- 599 /// @brief \b Struct \b Name: JPEG_HuffTbl 600 /// @brief \b Struct \b Description: Structure for JPEG huffman table 601 //----------------------------------------------------------------------------- 602 typedef struct 603 { 604 MS_S16 s16Look_up[256]; ///< the lookup of huffman code 605 // FIXME: Is 512 tree entries really enough to handle _all_ possible 606 // code sets? I think so but not 100% positive. 607 MS_S16 s16Tree[512]; ///< huffman tree of huffman code 608 MS_U8 u8Code_size[256]; ///< code size of huffman code 609 } JPEG_HuffTbl; 610 611 #endif /* _JPEG_CMODEL_DEF_H */ 612 613 614