hi TI-friends,
I try to implement something as below in DSP
double y_psnr, f_mse = 0;
...
if( f_mse <= 0.0000000001 ) /* Max 100dB */
y_psnr = 100;
else
y_psnr = (double)(-10.0 * log10( f_mse ));
Vps_printf(" ************ f_mse = %f, y_psnr = %f !!\n", f_mse, y_psnr);
and the console shows
[c6xdsp ] ************ f_mse = 1102.983845, y_psnr = -21272267950.000000 !!
[c6xdsp ] ************ f_mse = 1102.986799, y_psnr = -4515725110.000000 !!
[c6xdsp ] ************ f_mse = 1102.986568, y_psnr = -2470487590.000000 !!
by electronic calculator
the result should be following
f_mse = 1102.983845, y_psnr = -695743084...
Is anything wrong in DSP ??