?? ijl.h
字號:
/*M*
//
//
// INTEL CORPORATION PROPRIETARY INFORMATION
// This software is supplied under the terms of a license agreement or
// nondisclosure agreement with Intel Corporation and may not be copied
// or disclosed except in accordance with the terms of that agreement.
// Copyright (c) 1998 Intel Corporation. All Rights Reserved.
//
//
// File:
// ijl.h
//
// Purpose:
// IJL Common Header File
// This file contains: definitions for data types, data
// structures, error codes, and function prototypes used
// in the Intel(R) JPEG Library (IJL).
//
// Version:
// 1.0 beta 1
//
*M*/
#ifndef __IJL_H__
#define __IJL_H__
#if defined( __cplusplus )
extern "C" {
#endif
#ifndef IJL_ALL_WARNINGS
#if _MSC_VER >= 1000
/* nonstandard extension used : nameless struct/union */
#pragma warning(disable : 4201)
/* nonstandard extension used : bit field types other than int */
#pragma warning(disable : 4214)
/* unreferenced inline function has been removed */
#pragma warning(disable : 4514)
/* named type definition in parentheses */
#pragma warning(disable : 4115)
#endif /* _MSC_VER >= 1000 */
#endif /* IJL_ALL_WARNINGS */
#define _X86_
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#ifdef _MSC_VER
# pragma pack (8)
#endif
/* /////////////////////////////////////////////////////////////////////////
// Macros/Constants */
#define IJL_NONE 0
#define IJL_OTHER 255
#define JBUFSIZE 4096 // Size of file I/O buffer (4K).
#ifndef INT64
#define INT64 __int64
#endif
#ifndef UINT64
#define UINT64 unsigned INT64
#endif
#if defined( _IJL_STDIMP_ )
# define IJLAPI(type,name,arg) \
extern type WINAPI name arg
#else
# if !defined( _IJL_API_ )
# define IJLAPI(type,name,arg) \
extern __declspec(dllimport) type WINAPI name arg
# else
# define IJLAPI(type,name,arg) \
extern __declspec(dllexport) type WINAPI name arg
# endif // _IJL_API_
#endif //_IJL_STDIMP_
/*D*
////////////////////////////////////////////////////////////////////////////
// Name: IJLibVersion
//
// Purpose: Stores library version info.
//
// Context:
//
// Example:
// major - 1
// minor - 0
// build - 1
// Name - "ijl10.dll"
// Version - "1.0.1 Beta1"
// InternalVersion - "1.0.1.1"
// BuildDate - "Sep 22 1998"
// CallConv - "DLL"
//
////////////////////////////////////////////////////////////////////////////
*D*/
typedef struct _IJLibVersion
{
int major;
int minor;
int build;
LPCTSTR Name;
LPCTSTR Version;
LPCTSTR InternalVersion;
LPCTSTR BuildDate;
LPCTSTR CallConv;
} IJLibVersion;
/*D*
////////////////////////////////////////////////////////////////////////////
// Name: IJLIOTYPE
//
// Purpose: Possible types of data read/write/other operations to be
// performed by the functions IJL_Read and IJL_Write.
//
// See the Developer's Guide for details on appropriate usage.
//
// Fields:
//
// IJL_JFILE_XXXXXXX Indicates JPEG data in a stdio file.
//
// IJL_JBUFF_XXXXXXX Indicates JPEG data in an addressable buffer.
//
////////////////////////////////////////////////////////////////////////////
*D*/
typedef enum
{
IJL_SETUP = -1,
// Read JPEG parameters (i.e., height, width, channels,
// sampling, etc.) from a JPEG bit stream.
IJL_JFILE_READPARAMS = 0,
IJL_JBUFF_READPARAMS = 1,
// Read a JPEG Interchange Format image.
IJL_JFILE_READWHOLEIMAGE = 2,
IJL_JBUFF_READWHOLEIMAGE = 3,
// Read JPEG tables from a JPEG Abbreviated Format bit stream.
IJL_JFILE_READHEADER = 4,
IJL_JBUFF_READHEADER = 5,
// Read image info from a JPEG Abbreviated Format bit stream.
IJL_JFILE_READENTROPY = 6,
IJL_JBUFF_READENTROPY = 7,
// Write an entire JFIF bit stream.
IJL_JFILE_WRITEWHOLEIMAGE = 8,
IJL_JBUFF_WRITEWHOLEIMAGE = 9,
// Write a JPEG Abbreviated Format bit stream.
IJL_JFILE_WRITEHEADER = 10,
IJL_JBUFF_WRITEHEADER = 11,
// Write image info to a JPEG Abbreviated Format bit stream.
IJL_JFILE_WRITEENTROPY = 12,
IJL_JBUFF_WRITEENTROPY = 13,
// Scaled Decoding Options:
// Reads a JPEG image scaled to 1/2 size.
IJL_JFILE_READONEHALF = 14,
IJL_JBUFF_READONEHALF = 15,
// Reads a JPEG image scaled to 1/4 size.
IJL_JFILE_READONEQUARTER = 16,
IJL_JBUFF_READONEQUARTER = 17,
// Reads a JPEG image scaled to 1/8 size.
IJL_JFILE_READONEEIGHTH = 18,
IJL_JBUFF_READONEEIGHTH = 19,
// Reads an embedded thumbnail from a JFIF bit stream.
IJL_JFILE_READTHUMBNAIL = 20,
IJL_JBUFF_READTHUMBNAIL = 21
} IJLIOTYPE;
/*D*
////////////////////////////////////////////////////////////////////////////
// Name: IJL_COLOR
//
// Purpose: Possible color space formats.
//
// Note these formats do *not* necessarily denote
// the number of channels in the color space.
// There exists separate "channel" fields in the
// JPEG_CORE_PROPERTIES data structure specifically
// for indicating the number of channels in the
// JPEG and/or DIB color spaces.
//
// See the Developer's Guide for details on appropriate usage.
//
////////////////////////////////////////////////////////////////////////////
*D*/
typedef enum
{
IJL_RGB = 1, // Red-Green-Blue color space.
IJL_BGR = 2, // Reversed channel ordering from IJL_RGB.
IJL_YCBCR = 3, // Luminance-Chrominance color space as defined
// by CCIR Recommendation 601.
IJL_G = 4, // Grayscale color space.
IJL_RGBA_FPX = 5, // FlashPix RGB 4 channel color space that
// has pre-multiplied opacity.
IJL_YCBCRA_FPX = 6 // FlashPix YCbCr 4 channel color space that
// has pre-multiplied opacity.
// IJL_OTHER // Some other color space not defined by the IJL.
// (This means no color space conversion will
// be done by the IJL.)
} IJL_COLOR;
/*D*
////////////////////////////////////////////////////////////////////////////
// Name: IJL_JPGSUBSAMPLING
//
// Purpose: Possible subsampling formats used in the JPEG.
//
// See the Developer's Guide for details on appropriate usage.
//
////////////////////////////////////////////////////////////////////////////
*D*/
typedef enum
{
IJL_411 = 1, // Valid on a JPEG w/ 3 channels.
IJL_422 = 2, // Valid on a JPEG w/ 3 channels.
IJL_4114 = 3, // Valid on a JPEG w/ 4 channels.
IJL_4224 = 4, // Valid on a JPEG w/ 4 channels.
// IJL_NONE = Corresponds to "No Subsampling".
// Valid on a JPEG w/ any number of channels.
// IJL_OTHER = Valid entry, but only used internally to the IJL.
} IJL_JPGSUBSAMPLING;
/*D*
////////////////////////////////////////////////////////////////////////////
// Name: IJL_DIBSUBSAMPLING
//
// Purpose: Possible subsampling formats used in the DIB.
//
// See the Developer's Guide for details on appropriate usage.
//
////////////////////////////////////////////////////////////////////////////
*D*/
typedef enum
{
// IJL_NONE = Corresponds to "No Subsampling".
} IJL_DIBSUBSAMPLING;
/*D*
////////////////////////////////////////////////////////////////////////////
// Name: HUFFMAN_TABLE
//
// Purpose: Stores Huffman table information in a fast-to-use format.
//
// Context: Used by Huffman encoder/decoder to access Huffman table
// data. Raw Huffman tables are formatted to fit this
// structure prior to use.
//
// Fields:
// huff_class 0 == DC Huffman or lossless table, 1 == AC table.
// ident Huffman table identifier, 0-3 valid (Extended Baseline).
// huffelem Huffman elements for codes <= 8 bits long;
// contains both zero run-length and symbol length in bits.
// huffval Huffman values for codes 9-16 bits in length.
// mincode Smallest Huffman code of length n.
// maxcode Largest Huffman code of length n.
// valptr Starting index into huffval[] for symbols of length k.
//
////////////////////////////////////////////////////////////////////////////
*D*/
typedef struct _HUFFMAN_TABLE
{
int huff_class;
int ident;
unsigned int huffelem[256];
unsigned short huffval[256];
unsigned short mincode[17];
unsigned short maxcode[18];
unsigned short valptr[17];
} HUFFMAN_TABLE;
/*D*
////////////////////////////////////////////////////////////////////////////
// Name: JPEGHuffTable
//
// Purpose: Stores pointers to JPEG-binary spec compliant
// Huffman table information.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -