Re: [FFmpeg-devel] [PATCH] lavc: avoid rounding errors in float constants

2022-09-13 Thread Andreas Rheinhardt
Rémi Denis-Courmont: > Le tiistaina 13. syyskuuta 2022, 18.11.35 EEST Andreas Rheinhardt a écrit : >> r...@remlab.net: >>> From: Rémi Denis-Courmont >>> >>> INT_MAX is (typically) a value with 31 significant bits but float can >>> only represent 23 significant bits, leading to a rounding error. >>

Re: [FFmpeg-devel] [PATCH] lavc: avoid rounding errors in float constants

2022-09-13 Thread Rémi Denis-Courmont
Le tiistaina 13. syyskuuta 2022, 18.11.35 EEST Andreas Rheinhardt a écrit : > r...@remlab.net: > > From: Rémi Denis-Courmont > > > > INT_MAX is (typically) a value with 31 significant bits but float can > > only represent 23 significant bits, leading to a rounding error. > > > > This substitutes

Re: [FFmpeg-devel] [PATCH] lavc: avoid rounding errors in float constants

2022-09-13 Thread Andreas Rheinhardt
r...@remlab.net: > From: Rémi Denis-Courmont > > INT_MAX is (typically) a value with 31 significant bits but float can > only represent 23 significant bits, leading to a rounding error. > > This substitutes the actual rounded value to avoid a clang warning: > > warning: implicit conversion fro

[FFmpeg-devel] [PATCH] lavc: avoid rounding errors in float constants

2022-09-13 Thread remi
From: Rémi Denis-Courmont INT_MAX is (typically) a value with 31 significant bits but float can only represent 23 significant bits, leading to a rounding error. This substitutes the actual rounded value to avoid a clang warning: warning: implicit conversion from 'int' to 'float' changes value