00001 /* 00002 // 00003 // INTEL CORPORATION PROPRIETARY INFORMATION 00004 // This software is supplied under the terms of a license agreement or 00005 // nondisclosure agreement with Intel Corporation and may not be copied 00006 // or disclosed except in accordance with the terms of that agreement. 00007 // Copyright (c) 2001-2004 Intel Corporation. All Rights Reserved. 00008 // 00009 // Intel® Integrated Performance Primitives JPEG Viewer Sample for Windows* 00010 // 00011 // By downloading and installing this sample, you hereby agree that the 00012 // accompanying Materials are being provided to you under the terms and 00013 // conditions of the End User License Agreement for the Intel® Integrated 00014 // Performance Primitives product previously accepted by you. Please refer 00015 // to the file ipplic.htm located in the root directory of your Intel® IPP product 00016 // installation for more information. 00017 // 00018 // JPEG is an international standard promoted by ISO/IEC and other organizations. 00019 // Implementations of these standards, or the standard enabled platforms may 00020 // require licenses from various entities, including Intel Corporation. 00021 // 00022 // 00023 */ 00024 00025 #ifndef __DECHTBL_H__ 00026 #define __DECHTBL_H__ 00027 00028 #ifndef __IPPJ_H__ 00029 #include "ippj.h" 00030 #endif 00031 #ifndef __JPEGBASE_H__ 00032 #include "jpegbase.h" 00033 #endif 00034 00035 00036 00037 00038 class CJPEGDecoderHuffmanTable 00039 { 00040 private: 00041 IppiDecodeHuffmanSpec* m_table; 00042 Ipp8u m_bits[16]; 00043 Ipp8u m_vals[256]; 00044 bool m_bEmpty; 00045 bool m_bValid; 00046 00047 public: 00048 int m_id; 00049 int m_hclass; 00050 00051 CJPEGDecoderHuffmanTable(void); 00052 virtual ~CJPEGDecoderHuffmanTable(void); 00053 00054 JERRCODE Create(void); 00055 JERRCODE Destroy(void); 00056 00057 JERRCODE Init(int id,int hclass,Ipp8u* bits,Ipp8u* vals); 00058 00059 bool IsEmpty(void) { return m_bEmpty; } 00060 bool IsValid(void) { return m_bValid; } 00061 void SetInvalid(void) { m_bValid = 0; return; } 00062 operator IppiDecodeHuffmanSpec*(void) { return m_table; } 00063 }; 00064 00065 00066 class CJPEGDecoderHuffmanState 00067 { 00068 private: 00069 IppiDecodeHuffmanState* m_state; 00070 00071 public: 00072 CJPEGDecoderHuffmanState(void); 00073 virtual ~CJPEGDecoderHuffmanState(void); 00074 00075 JERRCODE Create(void); 00076 JERRCODE Destroy(void); 00077 00078 JERRCODE Init(void); 00079 00080 operator IppiDecodeHuffmanState*(void) { return m_state; } 00081 }; 00082 00083 00084 #endif // __DECHTBL_H__ 00085 00086