I ran a h264 parser program downloaded from the site http://h264bitstream.sourceforge.net/
when I run the code i get the following errors
error C2668: 'log' : ambiguous call to overloaded function
1> c:\program files\microsoft visual studio 10.0\vc\include\math.h(575): could 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 piece of code
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 call to overloaded function 1> c:\program files\microsoft visual studio 10.0\vc\include\math.h(575): could 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> while trying to match the argument list '(int)' in the following piece of code
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' : ambiguous call to overloaded function 1> c:\program files\microsoft visual studio 10.0\vc\include\math.h(575): could 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> while 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?
login your code, but alog2. Why? A guess is that you pass an integer tologand the compiler cannot decide if you want a float or double result.logis originated from where ?