[FFmpeg-devel] [PATCH 1/4] softfloat: handle INT32_MIN correctly in av_normalize1_sf
Michael Niedermayer
michael at niedermayer.cc
Sun Nov 8 01:06:17 CET 2015
On Sun, Nov 08, 2015 at 12:07:08AM +0100, Andreas Cadhalpun wrote:
> Otherwise a.mant=INT32_MIN triggers the av_assert2.
>
> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
> ---
> libavutil/softfloat.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/libavutil/softfloat.h b/libavutil/softfloat.h
> index 00ff4a1..5fa5dc0 100644
> --- a/libavutil/softfloat.h
> +++ b/libavutil/softfloat.h
> @@ -77,6 +77,10 @@ static inline av_const SoftFloat av_normalize1_sf(SoftFloat a){
> if((int32_t)(a.mant + 0x40000000U) <= 0){
> a.exp++;
> a.mant>>=1;
> + if(a.mant == -0x40000000){
> + a.exp++;
> + a.mant>>=1;
> + }
is av_int2sf() the only way to reach this case ?
if so it would be better to modify only av_int2sf() ans avoid this
extra check in other cases (would slow them down)
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151108/31dbf920/attachment.sig>
More information about the ffmpeg-devel
mailing list