#include
#include
#include "stdint.h"
#if defined ( __cplusplus)
extern "C"
{
#include "x264.h"
};
#else
#include "x264.h"
#endif
int mAIn(int argc, char** argv)
{
int ret;
int y_size;
int i,j;
//FILE* fp_src = fopen("../cuc_ieschool_640x360_yuv444p.yuv", "rb");
FILE* fp_src = fopen("../cuc_ieschool_640x360_yuv420p.yuv", "rb");
FILE* fp_dst = fopen("cuc_ieschool.h264", "wb");
//Encode 50 frame
//if set 0, encode all frame
int frame_num=50;
int csp=X264_CSP_I420;
int width=640,height=360;
int iNal = 0;
x264_nal_t* pNals = NULL;
x264_t* pHandle = NULL;
x264_picture_t* pPic_in = (x264_picture_t*)malloc(sizeof(x264_picture_t));
x264_picture_t* pPic_out = (x264_picture_t*)malloc(sizeof(x264_picture_t));
x264_param_t* pParam = (x264_param_t*)malloc(sizeof(x264_param_t));
...
return 0;
} 不知道为啥一下用h264一下用x264,,, |