本文主要是介绍H.264句法和语法总结(十二)子宏块预测句法,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
sub_mb_pred( mb_type ) {for( mbPartIdx = 0; mbPartIdx < 4; mbPartIdx++ )
// sub_mb_type[ mbPartIdx ] 指明子宏块的预测类型,在不同的宏块类型中这个句法元素的语义不一样。
sub_mb_type [ mbPartIdx ]
for( mbPartIdx = 0; mbPartIdx < 4; mbPartIdx++ )
if( ( num_ref_idx_l0_active_minus1 > 0 | |
mb_field_decoding_flag ) &&
mb_type != P_8x8ref0 &&
sub_mb_type[ mbPartIdx ] != B_Direct_8x8 &&
SubMbPredMode( sub_mb_type[ mbPartIdx ] ) != Pred_L1 )
ref_idx_l0 [ mbPartIdx ]
for( mbPartIdx = 0; mbPartIdx < 4; mbPartIdx++ )
if( (num_ref_idx_l1_active_minus1 > 0 | | mb_field_decoding_flag )
&&
sub_mb_type[ mbPartIdx ] != B_Direct_8x8 &&
SubMbPredMode( sub_mb_type[ mbPartIdx ] ) != Pred_L0 )
ref_idx_l1 [ mbPartIdx ]
for( mbPartIdx = 0; mbPartIdx < 4; mbPartIdx++ )
if( sub_mb_type[ mbPartIdx ] != B_Direct_8x8 &&
SubMbPredMode( sub_mb_type[ mbPartIdx ] ) != Pred_L1 )
for( subMbPartIdx = 0;
subMbPartIdx < NumSubMbPart( sub_mb_type[ mbPartIdx ] );
subMbPartIdx++)
for( compIdx = 0; compIdx < 2; compIdx++ )
mvd_l0 [ mbPartIdx ][ subMbPartIdx ][ compIdx ]
for( mbPartIdx = 0; mbPartIdx < 4; mbPartIdx++ )
if( sub_mb_type[ mbPartIdx ] != B_Direct_8x8 &&
SubMbPredMode( sub_mb_type[ mbPartIdx ] ) != Pred_L0 )
for( subMbPartIdx = 0;
subMbPartIdx < NumSubMbPart( sub_mb_type[ mbPartIdx ] );
subMbPartIdx++)
for( compIdx = 0; compIdx < 2; compIdx++ )
mvd_l1 [ mbPartIdx ][ subMbPartIdx ][ compIdx ]
}
这篇关于H.264句法和语法总结(十二)子宏块预测句法的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!