我运行了从站点http://h264bitstream.sourceforge.net/下载的h264解析器程序
当我运行代码时,出现以下错误
在下面的代码中
else if( pps->slice_group_map_type == 6 )
{
pps->pic_size_in_map_units_minus1 = bs_read_ue(b);
for( i = 0; i <= pps->pic_size_in_map_units_minus1; i++ )
{
**pps->slice_group_id[ i ] = bs_read_u(b, ceil( log2( pps->num_slice_groups_minus1 + 1 ) ) ); // was u(v)**
}
}
}
if( pps->num_slice_groups_minus1 > 0 &&
pps->slice_group_map_type >= 3 && pps->slice_group_map_type <= 5)
{
sh->slice_group_change_cycle =
**bs_read_u(b, ceil( log2( pps->pic_size_in_map_units_minus1 +
pps->slice_group_change_rate_minus1 + 1 ) ) ); // was u(v) // FIXME add 2?**
}
bs_write_ue(b, pps->pic_size_in_map_units_minus1);
for( i = 0; i <= pps->pic_size_in_map_units_minus1; i++ )
{
**bs_write_u(b, ceil( log2( pps->num_slice_groups_minus1 + 1 ) ), pps->slice_group_id[ i ] ); // was u(v)**
}
}
我该怎么办才能解决呢?
最佳答案
修改对log2的调用,如下所示:
log2( (double)(pps->num_slice_groups_minus1 + 1) )