Error C2668 an ambiguous call of an overloaded function code from the site http://h264bitstream.sourceforge.net/
I ran the h264 parser program downloaded from http://h264bitstream.sourceforge.net/
when i run the code i get the following errors:
error C2668: 'log': overloaded function ambiguous call
1> c: \ program files \ microsoft visual studio 10.0 \ vc \ include \ math.h (575): may be "long double log (long double)"
1> c: \ program files \ microsoft visual studio 10.0 \ vc \ include \ math.h (527): or 'float log (float)'
1> c: \ program files \ microsoft visual studio 10.0 \ vc \ include \ math.h (120 ): or 'double log (double)'
in the following code snippet
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)**
}
}
}
error C2668: 'log': ambiguous overloaded function call 1> c: \ program files \ microsoft visual studio 10.0 \ vc \ include \ math.h (575): may be "long double log (long double)"
1> c: \ program files \ microsoft visual studio 10.0 \ vc \ include \ math.h (527): or 'float log (float)'
1> c: \ program files \ microsoft visual studio 10.0 \ vc \ include \ math.h (120 ): or 'double log (double)'
1> when trying to match the argument list '(int)' in the following code snippet
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?**
}
error C2668: 'log': overloaded function ambiguous call 1> c: \ program files \ microsoft visual studio 10.0 \ vc \ include \ math.h (575): may be "long double log (long double)"
1> c: \ program files \ microsoft visual studio 10.0 \ vc \ include \ math.h (527): or 'float log (float)'
1> c: \ program files \ microsoft visual studio 10.0 \ vc \ include \ math.h (120 ): or 'double log (double)'
1> when trying to match the argument list '(int)'
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)**
}
}
What should I do to resolve it?
source to share