📄 codecdef.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 _CODECDEF_H_
#define _CODECDEF_H_
/* Include Intel IPP external header file(s). */
#include "ippdefs.h" /* General IPP external header file*/
#ifdef __cplusplus
extern "C" {
#endif
/***** Data Types, Data Structures and Constants ******************************/
/***** Common Data Types *****/
/* Codec Status Code */
typedef enum {
/* Audio return code */
IPP_STATUS_INIT_ERR = -9999,
IPP_STATUS_INIT_OK,
IPP_STATUS_BUFFER_UNDERRUN,
IPP_STATUS_FRAME_COMPLETE,
IPP_STATUS_BS_END,
IPP_STATUS_FRAME_ERR,
IPP_STATUS_FRAME_HEADER_INVALID,
IPP_STATUS_FRAME_UNDERRUN,
/* Mpeg4 return code*/
IPP_STATUS_MP4_SHORTHEAD,
/* Audio return code*/
IPP_STATUS_READEVENT,
/* Signal return code */
IPP_STATUS_DTMF_NOTSUPPORTEDFS = -200, /* DTMF: Not supported sample rate */
/* General return code*/
IPP_STATUS_STREAMFLUSH_ERR = -12,
IPP_STATUS_BUFOVERFLOW_ERR = -11,
IPP_STATUS_NOTSUPPORTED_ERR = -10,
IPP_STATUS_MISALIGNMENT_ERR = -9,
IPP_STATUS_BITSTREAM_ERR = -8,
IPP_STATUS_INPUT_ERR = -7,
IPP_STATUS_SYNCNOTFOUND_ERR = -6,
IPP_STATUS_BADARG_ERR = -5,
IPP_STATUS_NOMEM_ERR = -4,
IPP_STATUS_ERR = -2,
IPP_STATUS_NOERR = 0,
/* Warnings */
IPP_STATUS_NOTSUPPORTED,
/* JPEG return code */
IPP_STATUS_JPEG_EOF,
IPP_STATUS_JPEG_CONTINUE,
/* JPEG stream out */
IPP_STATUS_JPEG_OUTPUT,
/* JPEG stream in */
IPP_STATUS_NEED_INPUT,
/* H.264 return code */
IPP_STATUS_NEW_VIDEO_SEQ,
/* GIF return code */
IPP_STATUS_GIF_FINISH = 100,
IPP_STATUS_GIF_MORE,
IPP_STATUS_GIF_NOIMAGE,
/* MPEG2 return code */
IPP_STATUS_FIELD_PICTURE_TOP,
IPP_STATUS_FIELD_PICTURE_BOTTOM,
IPP_STATUS_VIDEO_SEQ_END
} IppCodecStatus;
/* Bitstream */
typedef struct _IppBitstream {
Ipp8u * pBsBuffer;
int bsByteLen;
Ipp8u * pBsCurByte;
int bsCurBitOffset;
} IppBitstream;
/* Sound */
typedef struct _IppSound {
Ipp16s * pSndFrame;
int sndLen;
int sndChannelNum;
int sndSampleRate;
} IppSound;
/* Picture */
#define IPP_MAXPLANENUM 5
typedef struct _IppPicture {
void * ppPicPlane[IPP_MAXPLANENUM];
int picWidth;
int picHeight;
int picPlaneStep[IPP_MAXPLANENUM];
int picPlaneNum;
int picChannelNum;
int picFormat;
IppiRect picROI;
Ipp32s picOrderCnt;
Ipp64s picTimeStamp;
Ipp32u picStatus; /* displayed/reference/short/long/non existent */
} IppPicture;
/* Color format */
typedef enum {
IPP_BINARY,
IPP_GRAY,
IPP_YCbCr411,
IPP_YCbCrB4114,
IPP_YCbCrBA41144,
IPP_YCbCr422,
IPP_YCbCr444,
IPP_BGR888,
IPP_BGRA8888,
IPP_BGR565,
IPP_BGR555
} IppColorFormat;
typedef int (*MiscMallocCallback)(void**, int, unsigned char);
typedef int (*MiscCallocCallback)(void**, int, unsigned char);
typedef int (*MiscFreeCallback)(void**);
typedef int (*MiscStreamReallocCallback)(void**, void*, int, int);
typedef int (*MiscStreamFlushCallback)(void*, void*, int, int);
typedef int (*MiscFileSeekCallback)(void *, int, int);
typedef int (*MiscFileReadCallback)(void *, int, int, void *);
typedef int (*MiscWriteFileCallBack)(void *, int, int, void *);
typedef struct _MiscGeneralCallbackTable
{
MiscMallocCallback fMemMalloc;
MiscCallocCallback fMemCalloc;
MiscFreeCallback fMemFree;
MiscStreamReallocCallback fStreamRealloc;
MiscStreamFlushCallback fStreamFlush;
MiscFileSeekCallback fFileSeek;
MiscFileReadCallback fFileRead;
MiscWriteFileCallBack fFileWrite;
} MiscGeneralCallbackTable;
/***** Multimedia Codec Functions *************************************************/
#if !defined( IPPCODECAPI )
#define IPPCODECAPI IPPAPI
#endif
#if !defined( IPPCODECFUN )
#define IPPCODECFUN(type, name) extern type __STDCALL name
#endif
#ifdef __cplusplus
}
#endif
#endif /* #ifndef _CODECDEF_H_ */
/* EOF */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -