www.pudn.com > H265+2008.8.rar > dap_demo.c
/* /////////////////////////////////////////////////////////////////////////////// // // // Copyright (C) 2006-2008 Beijing, pengzhen (pengzhenxp@yahoo.com.cn) // // // /////////////////////////////////////////////////////////////////////////////// */ #include#include #include #include #define __OUT_RAW__ /* */ #include "zpav8avi.h" #include "zpav8sys.h" #include "zpav8enc.h" #include "zpav8dec.h" //#include "zpav8tools.h" #ifdef WIN32 #pragma comment(lib,"..\\zpav8_lib\\zpav8.lib" ) #pragma comment(lib,"..\\zpav8_lib\\zpav8avi.lib" ) #endif /*WIN32*/ #ifdef __TCS__ //#include #include #define hmpv_read_fcnt() ( CYCLES() ) #endif /*__TCS__*/ #ifdef __MAPCA__ #include //#define hmpv_read_fcnt() ( clock() ) #endif /*__MAPCA__*/ #ifdef WIN32 #include #define hmpv_read_fcnt() ( clock() ) #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(unsigned int dwTotalCycles, unsigned int frame_number) { #ifdef __TCS__ #if (TMFL_PNX_ID != 1300) /* PNX1500/PNX1700 */ #define TM1300_FREQ 300000000 #else /* PNX1300/TM1300 */ #define TM1300_FREQ 187500000 #endif /* (TMFL_PNX_ID != 1300) */ fprintf(stderr, "\n\n dap process frames = %d TotalCycles= %lu FREQ= %.1lf \n", frame_number , dwTotalCycles , (double)(TM1300_FREQ)/1000000.0 ); fprintf(stderr, "\nDecodeFrames = %d total clocks= %lf (s) \n", frame_number , (double)(dwTotalCycles)/(double)(TM1300_FREQ) ); #endif /*__TCS__*/ #ifdef __MAPCA__ fprintf(stderr, "\n\n dap process frames = %d TotalCycles= %lu \n", frame_number , dwTotalCycles); fprintf(stderr, "\n dap process frames = %d total clocks= %lf (s) \n", frame_number , (double)(dwTotalCycles)/256./1000./1000. ); #endif /*__MAPCA__*/ #ifdef WIN32 fprintf(stderr, "\n\n dap process frames = %d total clocks= %lu (ms) \n", frame_number , dwTotalCycles); fprintf(stderr, "\n dap process frames = %d total clocks= %lf (s) \n", frame_number , (double)(dwTotalCycles)/(double)1000. ); #endif /*WIN32*/ } #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 /* */