Re: [FFmpeg-devel] [PATCH] libavutil/softfloat: Fix normalizations.

2015-06-05 Thread Michael Niedermayer
On Fri, Jun 05, 2015 at 09:27:56AM +, Nedeljko Babic wrote: > >> >> -while((a.mant + 0x2000U)<0x4000U){ > >> >> +while((FFABS(a.mant) + 0x2000U)<0x4000U){ > >> > > >> >when exactly is this needed and how does a.mant reach that value > >> >for which this is needed

Re: [FFmpeg-devel] [PATCH] libavutil/softfloat: Fix normalizations.

2015-06-05 Thread Nedeljko Babic
>> >> -while((a.mant + 0x2000U)<0x4000U){ >> >> +while((FFABS(a.mant) + 0x2000U)<0x4000U){ >> > >> >when exactly is this needed and how does a.mant reach that value >> >for which this is needed? >> >FFABS would significantly slow this down i suspect and it just looks

Re: [FFmpeg-devel] [PATCH] libavutil/softfloat: Fix normalizations.

2015-06-04 Thread Michael Niedermayer
On Thu, Jun 04, 2015 at 12:45:52PM +, Nedeljko Babic wrote: > >> diff --git a/libavutil/softfloat.h b/libavutil/softfloat.h > >> index 8097d28..182e517 100644 > >> --- a/libavutil/softfloat.h > >> +++ b/libavutil/softfloat.h > >> @@ -47,7 +47,7 @@ static const SoftFloat FLOAT_099= { 0x3

Re: [FFmpeg-devel] [PATCH] libavutil/softfloat: Fix normalizations.

2015-06-04 Thread Nedeljko Babic
>> diff --git a/libavutil/softfloat.h b/libavutil/softfloat.h >> index 8097d28..182e517 100644 >> --- a/libavutil/softfloat.h >> +++ b/libavutil/softfloat.h >> @@ -47,7 +47,7 @@ static const SoftFloat FLOAT_099= { 0x3BCE, >> 0}; >> static av_const SoftFloat av_normalize_sf(SoftFloat

Re: [FFmpeg-devel] [PATCH] libavutil/softfloat: Fix normalizations.

2015-06-03 Thread Michael Niedermayer
On Wed, Jun 03, 2015 at 04:17:39PM +0200, Nedeljko Babic wrote: > av_normalize_sf doesn't properly address case when negative numbers are out > of defined range. > > av_normalize1_sf doesn't properly address border case when mantis is > exactly 0x4000. > > This patch solves both of these prob

[FFmpeg-devel] [PATCH] libavutil/softfloat: Fix normalizations.

2015-06-03 Thread Nedeljko Babic
av_normalize_sf doesn't properly address case when negative numbers are out of defined range. av_normalize1_sf doesn't properly address border case when mantis is exactly 0x4000. This patch solves both of these problems. Signed-off-by: Nedeljko Babic --- libavutil/softfloat.h | 4 ++-- 1 f