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

📄 dap_demo.c

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

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

#ifdef WIN32
#define _CRT_SECURE_NO_DEPRECATE 1 /* disable deprecation */
#include <windows.h>
#include <windowsx.h>
#endif /* WIN32 */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

#define __OUT_RAW__ /* */

#include "zpav8sys.h"
#include "zpav8mem.h"
#include "zpav8avi.h"


#ifdef WIN32
#pragma comment(lib,"..\\zpav8_lib\\zpav8.lib" )
#pragma comment(lib,"..\\zpav8_lib\\zpav8mem.lib" )
#pragma comment(lib,"..\\zpav8_lib\\zpav8avi.lib" )
#endif /*WIN32*/

#ifdef __TCS__
#include <ops/custom_defs.h>
typedef long long int64_t ;
//#define read_cycles( X ) X = CYCLES()  
#define read_cycles( X ) X = CURCYCLES()
#endif /*__TCS__*/

#ifdef __MAPCA__
#include <mm.h>
typedef long long int64_t ;
#define read_cycles( X ) X = hmpv_read_fcnt() 
#endif /*__MAPCA__*/

#ifdef WIN32
typedef __int64 int64_t ;
#define read_cycles( X ) QueryPerformanceCounter( (LARGE_INTEGER*)(&(X)) ) 
#endif /*WIN32*/


static int m_function_id =10 ; /* DAP_FId_H265P_A0_Compression = 10 */
static int m_trace =0 ; 

static char m_in_file_name[256]  = "pcm0.wav" ;     
static char m_out_file_name[256] = "pcm0.avi" ;
#ifdef __OUT_RAW__
static char m_out_raw_file_name[256] = "pcm0.enc" ;
#endif /*__OUT_RAW__*/


#include "davp_argcv.c"

/**
** dap report 
*/

static void dap_report( int64_t qwTotalCycles, unsigned int frame_number, float fps )
{

	int64_t t_freq ; 

#ifdef __TCS__
	ptmbslCoreSystemInfo_t pSystemInfo; tmbslCoreGetSystemInfo (&pSystemInfo);

    t_freq = pSystemInfo->pCpuInfo[ pSystemInfo->cpuId ].cpuClockFreq ; /* CPU FREQ */
#endif /* __TCS__ */


#ifdef __MAPCA__
	t_freq = 250*1000*1000 ; /* CPU FREQ */
#endif /*__MAPCA__*/


#ifdef WIN32
	QueryPerformanceFrequency( (LARGE_INTEGER*)( &t_freq) ) ; /* CPU FREQ */
#endif /* WIN32 */

	/* get Information */

	{
		double _second, _mips, _freq ;

		_second = qwTotalCycles/(double)(t_freq) ;
		_mips   = qwTotalCycles*fps/(frame_number*1000*1000.0) ; /* M */
		_freq   = t_freq/(1000*1000.0) ; /* M */

		fprintf(stderr, "\n frames= %d (f); times= %.3f (s); \n", frame_number, _second ) ;
		fprintf(stderr, "\n MIPS= %.1f (m/s); CPU_FREQ= %.1f (m). \n\n", _mips, _freq ) ;

	}

}


#include "dap_process.c"

/**
** dap main 
*/

#if defined(WIN32) || ( defined(__TCS__) && (TMFL_PNX_ID == 1300) ) /* WIN32 / PNX1300/TM1300 */
void main(int argc, char **argv)
{
	dap_main( argc, argv ) ;
} 
#endif /* */ 


⌨️ 快捷键说明

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