GNOME Bugzilla – Bug 657904
audio conversion error from 32bits float to 16bit int
Last modified: 2011-12-07 21:42:05 UTC
In function orc_audio_convert_unpack_float_s32 of gst-plugins-base/gst/audioconvert/gstaudioconvertorc-dist.c, current source code as following: /* 5: convfl */ { int tmp; tmp = (int) var38.f; // wrong!!! if (tmp == 0x80000000 && !(var38.i & 0x80000000)) tmp = 0x7fffffff; var35.i = tmp; } If var38.f is in float and it may be out of 32bit integer's range. So it's unexpected to cast float to integer. In my case, var38.f is -2179590144.000000 and tmp is 7FFFFFFF after that wrong line was executed. Obviously, it doesn't make sense that a negative value was converted to a positive value. I think we should clamp var38.f in 32bit integer's range before type cast. BTW, so much unreasonable type casts as above were in this file.
Please paste or attach the output of orc-bugreport.
What is the output of orc-bugreport, my debug info or else? If else, please tell me how to retrieve it. My debug info: :: enter orc_audio_convert_unpack_float_s32 :: loadl :: var36.i = bf81e9e8 :: mulf :: _dest1.f = -2179590144.000000 :: var37.i = cf01e9e8 :: addf :: _dest1.f = -2179590144.000000 :: var38.i = cf01e9e8 :: convfl :: var38.f = -2179590144.000000 :: tmp = 7fffffff :: var35.i = 7fffffff From above info, 0xbf81e9e8 is unpacked to 0x7FFFFFFF.
(In reply to comment #2) > If else, please tell me how to retrieve it. You run orc-bugreport.
fan.su, ping, can you please provide the requested information ?
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!