⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 codecjp.h

📁 windows ce 6.0 camera driver
💻 H
字号:
/******************************************************************************
// (C) Copyright 2007 Marvell International Ltd.
// All Rights Reserved
// INTEL CONFIDENTIAL
// Copyright 2000 ~ 2006 Intel Corporation All Rights Reserved. 
// The source code contained or described herein and all documents related to 
// the source code (“Material”) are owned by Intel Corporation or its 
// suppliers or licensors. Title to the Material remains with Intel Corporation
// or its suppliers and licensors. The Material contains trade secrets and 
// proprietary and confidential information of Intel or its suppliers and 
// licensors. The Material is protected by worldwide copyright and trade secret 
// laws and treaty provisions. No part of the Material may be used, copied, 
// reproduced, modified, published, uploaded, posted, transmitted, distributed, 
// or disclosed in any way without Intel’s prior express written permission.
//
// No license under any patent, copyright, trade secret or other intellectual 
// property right is granted to or conferred upon you by disclosure or delivery 
// of the Materials, either expressly, by implication, inducement, estoppel or 
// otherwise. Any license under such intellectual property rights must be 
// express and approved by Intel in writing.
******************************************************************************/
#ifndef _CODECJP_H_
#define _CODECJP_H_

#include "codecDef.h"	/* General Codec external header file*/
#include "ippJP.h"		/* Jpeg Codec lib2 external header file*/

#ifdef __cplusplus
extern "C" {
#endif
/*********** Data Types, Data Structures ************************/
typedef enum {
    JPEG_BASELINE       = 1,
    JPEG_PROGRESSIVE    = 4
} IppJPEGMode;

typedef enum {
    JPEG_444            = 0,
    JPEG_422            = 1,
	JPEG_422I           = 2,    
    JPEG_411            = 3
} IppJPEGYCbCrSampling;

typedef enum {
    JPEG_GRAY8          = 1,
    JPEG_BGR888         = 2,
    JPEG_BGR555         = 4,
    JPEG_BGR565         = 8,
	JPEG_ABGR           = 16,
    /* added to support YUV input & output */
    JPEG_YUV            = 0x00000080,
    JPEG_YUV444         = 0x00000100,
    JPEG_YUV422         = 0x00000200,
	JPEG_YUV422I        = 0X00000400,
    JPEG_YUV411         = 0x00000800,
} IppJPEGColorFormat;

typedef enum {
    JPEG_SINGLESCAN     = 1,
    JPEG_MULTIPLESCAN   = 2
} IppJPEGOperationMode;

typedef enum {
	JPEG_SLICEBUF = 0,
	JPEG_INTEGRATEBUF = 1
} IppJPEGBufferMode;

/* Enumeration:         Rotation mode:                                       */
typedef enum {
	IPP_JP_90L    = 0x04,    // Jpeg left 90 rotation
	IPP_JP_180    = 0x05,    // Jpeg 180 rotation
	IPP_JP_90R    = 0x06     // Jpeg right 90 rotation
}IppJPEGRotation;

typedef enum {
   IPP_JPEG_RESAMPLE_STANDARD,
   IPP_JPEG_RESAMPLE_FAVOR_SMOOTH,
   IPP_JPEG_RESAMPLE_FAVOR_SHARP,
}IppJPEGResampleMode;
typedef enum {
   IPP_JPEG_ROTATE = 0x01,	
   IPP_JPEG_RESIZE = 0x02,
   IPP_JPEG_ROIRESIZE = 0x03,
}IppJPEGDecodeMode;
typedef struct _IppJPEGEncoderParam {
    int     nQuality;				/* 0..100 */
    int     nRestartInterval;		/* number of restart intervals */
    int     nJPEGMode;				/* JPEG_BASELINE or JPEG_PROGRESSIVE */
    int     nSubsampling;			/* JPEG_444, JPEG_422 or JPEG_411 */
	int		nBufType;	
    void    *pStreamHandler;
	void    *pSrcPicHandler;
	int		nRSTMCUHeight;		/* stream input height in MCU unit */
} IppJPEGEncoderParam;

typedef struct _IppJPEGDecoderParam {
    int                 nDesiredColor;               /* Output color space */
    Ipp8u               nAlphaValue;                 /* alpha value for ARGB format, only valid for ARGB format */
    int                 nModeFlag;                   /* 1: rotate, 2: thumbnail, 3: ROI decoding */
    IppJPEGRotation     RotMode;                     /* rotate parameter */
    IppJPEGResampleMode ResampleMode;                /* down-sample mode */
    IppiRect            srcROI;                      /* src ROI paramter for ROI decoding */
    Ipp32s              nrcpRatioXQ16;                   /* resizing ratio in x direction, Q16 format, currently only down sample is supported, should <= 65536 */
    Ipp32s              nrcpRatioYQ16;                   /* resizing ratio in y direction, Q16 format, currently only down sample is supported, should <= 65536 */
} IppJPEGDecoderParam;

/***** JPEG Codec Functions *****/

IPPCODECAPI(IppCodecStatus, EncoderInitAlloc_JPEG, (
    IppJPEGEncoderParam      *pEncoderPar,
    IppPicture               *pSrcPicture,
    IppBitstream             *pDstBitstream,
    MiscGeneralCallbackTable *pSrcCallbackTable,
    void                     **ppDstEncoderState
))

IPPCODECAPI( IppCodecStatus, Encode_JPEG, (
	IppPicture          *pSrcPicture,
	IppBitstream        *pDstBitstream,
	void                *pEncoderState
))

IPPCODECAPI(IppCodecStatus, EncoderFree_JPEG, (
   void **ppEncoderState
))

IPPCODECAPI(IppCodecStatus, DecoderInitAlloc_JPEG, (
                                  IppBitstream              *pSrcDstStream,
								                  IppPicture                *pDstPicture,	
                                  MiscGeneralCallbackTable  *pSrcCallbackTable,
                                  void                      **ppDecoderState
))


IPPCODECAPI(IppCodecStatus, Decode_JPEG, 
                           (IppBitstream        *pSrcBitstream,
						    IppBitstream        *pDstBitstream, 
							IppPicture          *pDstPicture,
							IppJPEGDecoderParam *pDecoderPar,                            
							void                *pDecoderState))


IPPCODECAPI(IppCodecStatus, DecoderFree_JPEG, (
   void **ppDecoderState
))


#ifdef __cplusplus
}
#endif

#endif    /* #ifndef _CODECJP_H_ */
/* EOF */




⌨️ 快捷键说明

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