1、* Local function prototypes函數原型
2、 * Simplify the "fincr/fbase" fraction簡化"fincr/fbase"部分
3、int enc_create(xvid_enc_create_t * create)
/* allocate encoder struct */
/* global flags */
/* width, height */
/* framerate */
/* zones */
/* plugins */
memset(&pcreate, 0, sizeof(xvid_plg_create_t));
pcreate.version = XVID_VERSION;
pcreate.num_zones = pEnc->num_zones;
pcreate.zones = pEnc->zones;
pcreate.width = pEnc->mbParam.width;
pcreate.height = pEnc->mbParam.height;
pcreate.mb_width = pEnc->mbParam.mb_width;
pcreate.mb_height = pEnc->mbParam.mb_height;
pcreate.fincr = pEnc->mbParam.fincr;
pcreate.fbase = pEnc->mbParam.fbase;
pcreate.param = create->plugins[n].param;
/* temp dquants */
/* temp lambdas */
/* bframes */
/* min/max quant */
/* frame drop ratio */
/* max keyframe interval */最大的關鍵幀的間距
/* allocate working frame-image memory */
/* allocate macroblock memory */
/* allocate quant matrix memory */
/* allocate interpolation image memory */
/* init bframe image buffers */
/* B Frames specific init */
/* init incoming frame queue */
/* timestamp stuff */
/* other stuff */
/* slices */
/* multithreaded stuff */
注:參數欄 -h運行程序能得到幫助文檔
*******************************初始化完成*********************
/*****************************************************************************
* Encoding loop
****************************************************************************/
if ((input_num+start_num) >= stop_num && stop_num > 0) {
result = 1;
}