h->param.rc.b_stat_read 参数的含义

2536阅读 0评论2012-03-28 pppStar
分类:LINUX

转自H264乐园

请教x264里面h->param.rc.b_stat_read 参数的含义

本帖最后由 xinyancode 于 2010-3-31 09:53 AM 编辑


请问x264里面:
h->param.rc.b_stat_read 参数是什么含义?

这是对它的赋初值:
h->param.rc.b_stat_read = 0;

在x264程序里面有很多地方都用这个参数作为判断条件,如:
if( h->param.rc.b_stat_read )
{
。。。。
}    

定义的时候是这样的: 
int    b_stat_read;     //Read stat from psz_stat_in and use it
psz_stat 紧跟着定义的:
char   *psz_stat_in;    

但是整个程序里面好像都是0,我没看明白它后面的那句注释
//Read stat from psz_stat_in and use it,这是什么意思?
谁能帮我指点一下?
收藏分享
Fastreaming

中级会员

2#
 发表于 2010-3-31 11:56 AM | 只看该作者
>> h->param.rc.b_stat_read 参数是什么含义
Indicate the PASS status

>>//Read stat from psz_stat_in and use it,这是什么意思?
in pass 1 mode, x264 will generate the stats information and write them into psz_stat_out

in pass 2 mode, x264 will read the stats information from (psz_stat_in) pass 1, or pass 3 for best ratecontrol decision

in pass 3 mode, x264 will read the stats information from pass 1 (psz_stat_in, psz_stat_out) for better ratecontrol decision, x264 also write the newer stats information into psz_stat_out

First Pass:
rc.b_stat_read == 0, rc.b_stat_write = 1

Third Paas:
rc.b_stat_read = 1, rc.b_stat_write = 1

Second Pass:
rc.b_stat_read = 1, rc.b_stat_write = 0
上一篇:void *x264_malloc( int i_size )解析
下一篇:The C10K problem