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

📄 zpav8sys.h

📁 ZPAV (H265) pnxNNNN(PHILIPS) demo ZPAV (H265) 是 音视频 压缩解压 协议
💻 H
字号:

/*
///////////////////////////////////////////////////////////////////////////////
//                                                                           //
//   Copyright (C) 2006-2008  Beijing,  pengzhen (pengzhenxp@yahoo.com.cn)   //
//                                                                           //
///////////////////////////////////////////////////////////////////////////////
*/

#ifndef __ZPAV8_SYSTEM_H__
#define __ZPAV8_SYSTEM_H__

#include "zpav8id.h"

#ifdef __cplusplus
extern "C" {
#endif 

#ifndef WIN32
#define pzav_sys_api
#endif /* !WIN32 */

#ifdef WIN32
#ifdef pzav_sys_exports
#define pzav_sys_api __declspec(dllexport)
#else
#define pzav_sys_api __declspec(dllimport)
#endif 
#endif /* WIN32 */

/**
** digital video (image) context 
*/

typedef struct _dvp_ctx
{

	/* set by system */ 
	void * m_handle ; /* handle */ /* the codec or system buffer (PTR) */

	/* set by user(encode) ; */ /* set by decode */

	void * i420_y ; /* the codec picture frame */ /* Yuv420 (Y) planar */
	void * i420_u ; /* the codec picture frame */ /* Yuv420 (U) planar */
	void * i420_v ; /* the codec picture frame */ /* Yuv420 (V) planar */

	/* set by encode */ /* set by user(decode) */

	void * stream ; /* the buffer of the codec bit stream */
	unsigned int stream_length ; /* the length of the codec bit stream */

	/* set by user */

	unsigned short width ; /* picture width. ( must be a multiple of 32(CIF),64(D1),128(HD) ) */ /* 352 */   
	unsigned short height ; /* picture height. ( must be a multiple of 32(CIF),64(D1),128(HD) ) */ /* 288 */ 

	/* set by user */

	unsigned int fps ; /* frames/second */ /* 25, 30 */ /* 25 */
	unsigned int bps ; /* bits/second */ /* 50 ~~~ 10k kbit/second */ /* <300*1000> */ 
	
	unsigned int gop ; /* group of picture */   /* only 'I',   if gop = 0 */ 

	unsigned wavelets : 1 ; /* wavelets */ /* 0 : wavelets1; 1 : wavelets2 */
	unsigned insert_i : 1 ; /* insert picture 'I' */ /* insert 'I', if insert_i = 1 */
	unsigned have_b   : 1 ; /* have picture 'B' */   /* none 'B',   if have_b = 0 */

	unsigned me_c : 1 ; /* chroma join motion_estimate (ME) */ /* 0 : no, 1 : yes */
	unsigned ms_t : 2 ; /* motion_search type */ /* 0 : diamond, 1 : advance diamond, 2 : small diamond, 3 : square,*/
	
	unsigned ratio : 2 ; /* ratio of background to foreground */ /* none background, if ratio = 0 */
	unsigned abr   : 1 ; /* adaptive bit rate */ /* 0 : CBR, 1 : ABR */ 

	unsigned prp : 2 ; /* previous process */ /* <0,1,2,3> */
	unsigned pop : 2 ; /* post process */ /* <0,1,2,3> */

	/* set by system */ 

	unsigned type : 2 ; /* picture type */ /* 0 : 'I' (POT_I), 1 : 'P' (POT_P), 2 : 'B' (POT_B), 3 : 'S' (POT_S) */
	unsigned      : 1 ; /* reserve */

	/* set by user */

	unsigned bands : 3 ; /* wavelets bands */ /* <1,2,3,4,5,6,7> */ 
	unsigned       : 5 ; /* reserve */

} dvp_ctx ;

/**
** digital audio (sound) context 
*/

/* audio (sound) frame size, in samples */
#define DAP_FRAME_SIZE 1152 

typedef struct _dap_ctx 
{

	/* set by system */
	void * m_handle ; /* handle */ /* the codec or system buffer (PTR) */

	/* set by user(encode) ; */ /* set by decode */

	void * sample ; /* the audio data to be codec */ 
	/* unsigned int sample_length ; */ /* the audio data length to be codec */

	/* set by encode */ /* set by user(decode) */

	void * stream ; /* the buffer of the codec bit stream */
	unsigned int stream_length ; /* the length of the codec bit stream */

	/* set by user */
     
    unsigned int sps ; /* samples/second */ /* 8k ~~~ 48k */
	unsigned int bps ; /* bits/second */ /* 8 ~~~ 256 kbit/s */

	unsigned ch : 2 ;  /* channels */ /* 1, 2 */
 
	unsigned wavelets : 1 ; /* wavelets */ /* 0 : wavelets1, 1 : wavelets2 */

	unsigned prp : 2 ; /* previous process */ /* <0,1,2,3> */
	unsigned pop : 2 ; /* post process */ /* <0,1,2,3> */
	unsigned     : 1 ; /* reserve */

	/* set by user */

	unsigned bands : 3 ; /* wavelets bands */ /* <1,2,3,4,5,6,7> */ 
	unsigned       : 5 ; /* reserve */

} dap_ctx ;


/* digital video (image) codec */

pzav_sys_api int dvp_encode_open( dvp_ctx * ) ;
pzav_sys_api int dvp_encode_frame( dvp_ctx * ) ; 
pzav_sys_api int dvp_encode_close( dvp_ctx * ) ;

pzav_sys_api int dvp_decode_open( dvp_ctx * ) ;
pzav_sys_api int dvp_decode_frame( dvp_ctx * ) ; 
pzav_sys_api int dvp_decode_close( dvp_ctx * ) ;

/* digital audio (sound) codec */

pzav_sys_api int dap_encode_open( dap_ctx * ) ; 
pzav_sys_api int dap_encode_frame( dap_ctx * ) ; 
pzav_sys_api int dap_encode_close( dap_ctx * ) ;

pzav_sys_api int dap_decode_open( dap_ctx * ) ; 
pzav_sys_api int dap_decode_frame( dap_ctx * ) ; 
pzav_sys_api int dap_decode_close( dap_ctx * ) ;

/* digital video (image) denoise */
pzav_sys_api int dvp_denoise( dvp_ctx * ) ; /* denoise */
/* digital audio (sound) denoise */
pzav_sys_api int dap_denoise( dap_ctx * ) ; /* denoise */

/* digital video (image) process */

pzav_sys_api int dvp_open( dvp_ctx * ) ;
pzav_sys_api int dvp_close( dvp_ctx * ) ;

/* digital video (image) process ( wavelets ) */

pzav_sys_api int dvp_wavelets_analysis( dvp_ctx * ) ; 
pzav_sys_api int dvp_wavelets_synthesis( dvp_ctx * ) ;


#ifdef __cplusplus
}
#endif 

#endif /* __ZPAV8_SYSTEM_H__ */

⌨️ 快捷键说明

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