jpegcomm.h

来自「是一个手机功能的模拟程序」· C头文件 代码 · 共 95 行

H
95
字号
//===========================================================================
//	prvM.H
//	This file contains JPEG functons used by the JPEG library but not exposed
//	to the outside world.
//---------------------------------------------------------------------------
//  Copyright (c) 2003 Epson Research and Development, Inc.
//  All Rights Reserved.
//===========================================================================

#ifndef _JPEG_COMM_H
#define _JPEG_COMM_H

//-----------------------------------------------------------------------------
// Include Files
//-----------------------------------------------------------------------------
#include "datatype.h"
#include "jpeg.h"
//#include "paraminfo.h"

//-----------------------------------------------------------------------------
// Type Definitions
//-----------------------------------------------------------------------------
typedef enum
{
	IrqDisable		=0x0000,
	JpegLineBuffer	=0x0001,
	JpegCodec		=0x0002,
	LnBufOverflow	=0x0004,
	JpegDecMarkerRd	=0x0010,
	JpegDecComplete	=0x0020,
	EncOverflow		=0x0100,
	EncSizeLimit	=0x0800,
	JpegFileOut		=0x4000,
	AllStatusClear	=0xFFFF
} prvJpegFlag;

typedef struct tagprvWorld
{
	Boolean	m_fCamClk;
	UInt16	m_XStart;
	UInt16	m_YStart;
	UInt16	m_XEnd;
	UInt16	m_YEnd;
	UInt8	m_ScaleMode;
	UInt8	m_HScaleRate;
	UInt8	m_VScaleRate;
	Boolean m_fResize;
	Boolean m_fJpeg;
	UInt8	m_OpMode;
} prvWorld;

//-----------------------------------------------------------------------------
// Function Prototypes
//-----------------------------------------------------------------------------
Boolean prvGetCamClk( void );
void	prvSetCamClk( Boolean fEnable );

UInt16	prvHalReadReg16( UInt16 index1, UInt16 index2 );
UInt32	prvHalReadReg24( UInt16 index );
void	prvHalWriteReg16( UInt16 index1, UInt16 index2, UInt16 value );
void	prvHalWriteReg24( UInt16 index, UInt32 value );

Boolean		prvGetJpeg( void );
void		prvSetJpeg( Boolean fEnable, Boolean fReset );
Boolean		prvExitSequence( Boolean fSuccess, Boolean fDecode );
void		prvLoadHuffmanTables( void );
prvJpegFlag	prvGetJpegStatus( void );
void		prvSetJpegStatus( prvJpegFlag flag );
prvJpegFlag	prvGetIrqControl( void );
void		prvSetIrqControl( prvJpegFlag flag );
Boolean		prvIsEndOfImage( JPEGINFO* pJpegInfo, UInt32 offset );
Boolean		prvGetOpWork( void );
void		prvLoadQuantizationTables( void );
Boolean		prvRestoreWorld( JPEGINFO* pJpegInfo, prvWorld* pprvWorld );
void		prvSaveWorld( prvWorld* pprvWorld );
void		prvResetJpegCodec( void );
void		prvStartJpeg( void );

Boolean prvGetResize( void );
Boolean prvSetResize( Boolean enable, JPEGINFO* pJpegInfo );
UInt8	prvGetResizeHScaleRate( void );
Boolean prvSetResizeHScaleRate( UInt8 ScaleMode, JPEGINFO* pJpegInfo );
Boolean prvGetResizeIndScaleRate( void );
Boolean prvSetResizeIndScaleRate( Boolean fEnable, JPEGINFO* pJpegInfo );
UInt8	prvGetResizeScaleMode( void );
Boolean prvSetResizeScaleMode( UInt8 ScaleRate, JPEGINFO* pJpegInfo );
Boolean prvResetResize( Boolean fEnable, JPEGINFO* pJpegInfo );
UInt8	prvGetResizeVScaleRate( void );
Boolean prvSetResizeVScaleRate( UInt8 ScaleMode, JPEGINFO* pJpegInfo );
void	prvGetResizeRect( UInt16* pXStart, UInt16* pYStart, UInt16* pXEnd, UInt16* pYEnd );
Boolean prvSetResizeRect( UInt16 XStart, UInt16 YStart, UInt16 XEnd, UInt16 YEnd );

#endif //prvm_h

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?