<div>I am a little confused about the cost calculation of B frames in x264. In analyse.c, </div>
<div> </div>
<div>/* refine qpel */<br> else if( i_partition == D_16x16 )<br> {<br> analysis.l0.me16x16.cost -= analysis.i_lambda * i_mb_b_cost_table[B_L0_L0];<br> analysis.l1.me16x16.cost
-= analysis.i_lambda * i_mb_b_cost_table[B_L1_L1];<br> if( i_type == B_L0_L0 )<br> {<br> x264_me_refine_qpel( h, &analysis.l0.me16x16 );<br> i_cost =
analysis.l0.me16x16.cost<br> + analysis.i_lambda * i_mb_b_cost_table[B_L0_L0];<br> }<br> else if( i_type == B_L1_L1 )<br> {<br> x264_me_refine_qpel( h, &analysis.l1.me16x16 );
<br> i_cost = analysis.l1.me16x16.cost<br> + analysis.i_lambda * i_mb_b_cost_table[B_L1_L1];<br> }<br> else if( i_type == B_BI_BI )<br> {
<br> x264_me_refine_qpel( h, &analysis.l0.me16x16 );<br> x264_me_refine_qpel( h, &analysis.l1.me16x16 );<br> }<br> }</div>
<div> </div>
<div>Why if i_type is B_BI_BI, the variable i_cost does not update as the case i_type is B_L0_L0 and B_L1_L1?</div>
<div>Is there any explanation?</div>
<div> </div>
<div>Thx, Andy</div>