Re: [FFmpeg-devel] [PATCH 0/2] first steps to resolving float to int undefined behavior

2015-11-02 Thread Hendrik Leppkes
On Mon, Nov 2, 2015 at 7:57 PM, Ronald S. Bultje wrote: > Hi, > > On Mon, Nov 2, 2015 at 12:32 PM, Ganesh Ajjanagadde > wrote: > >> On Mon, Nov 2, 2015 at 11:58 AM, Ronald S. Bultje >> wrote: >> > Hi, >> > >> > On Mon, Nov 2, 2015 at 11:07 AM, Ganesh Ajjanagadde >> > wrote: >> > >> >> On Mon, N

Re: [FFmpeg-devel] [PATCH 0/2] first steps to resolving float to int undefined behavior

2015-11-02 Thread Ronald S. Bultje
Hi, On Mon, Nov 2, 2015 at 12:32 PM, Ganesh Ajjanagadde wrote: > On Mon, Nov 2, 2015 at 11:58 AM, Ronald S. Bultje > wrote: > > Hi, > > > > On Mon, Nov 2, 2015 at 11:07 AM, Ganesh Ajjanagadde > > wrote: > > > >> On Mon, Nov 2, 2015 at 10:28 AM, Ronald S. Bultje > >> wrote: > >> > Hi, > >> > >

Re: [FFmpeg-devel] [PATCH 0/2] first steps to resolving float to int undefined behavior

2015-11-02 Thread Ganesh Ajjanagadde
On Mon, Nov 2, 2015 at 11:58 AM, Ronald S. Bultje wrote: > Hi, > > On Mon, Nov 2, 2015 at 11:07 AM, Ganesh Ajjanagadde > wrote: > >> On Mon, Nov 2, 2015 at 10:28 AM, Ronald S. Bultje >> wrote: >> > Hi, >> > >> > On Sun, Nov 1, 2015 at 8:20 PM, Ganesh Ajjanagadde >> wrote: >> > >> >> On Sun, Nov

Re: [FFmpeg-devel] [PATCH 0/2] first steps to resolving float to int undefined behavior

2015-11-02 Thread Ronald S. Bultje
Hi, On Mon, Nov 2, 2015 at 11:07 AM, Ganesh Ajjanagadde wrote: > On Mon, Nov 2, 2015 at 10:28 AM, Ronald S. Bultje > wrote: > > Hi, > > > > On Sun, Nov 1, 2015 at 8:20 PM, Ganesh Ajjanagadde > wrote: > > > >> On Sun, Nov 1, 2015 at 7:59 PM, Ronald S. Bultje > >> wrote: > >> > >> - I think the

Re: [FFmpeg-devel] [PATCH 0/2] first steps to resolving float to int undefined behavior

2015-11-02 Thread Ganesh Ajjanagadde
On Mon, Nov 2, 2015 at 10:28 AM, Ronald S. Bultje wrote: > Hi, > > On Sun, Nov 1, 2015 at 8:20 PM, Ganesh Ajjanagadde wrote: > >> On Sun, Nov 1, 2015 at 7:59 PM, Ronald S. Bultje >> wrote: >> >> - I think the name of this function is confusing. The av_clip* namespace >> > seems reserved for int

Re: [FFmpeg-devel] [PATCH 0/2] first steps to resolving float to int undefined behavior

2015-11-02 Thread Ronald S. Bultje
Hi, On Sun, Nov 1, 2015 at 8:20 PM, Ganesh Ajjanagadde wrote: > On Sun, Nov 1, 2015 at 7:59 PM, Ronald S. Bultje > wrote: > > - I think the name of this function is confusing. The av_clip* namespace > > seems reserved for int to int clips, so using it for a float to int > > conversion with clip

Re: [FFmpeg-devel] [PATCH 0/2] first steps to resolving float to int undefined behavior

2015-11-01 Thread Michael Niedermayer
On Sun, Nov 01, 2015 at 07:59:08PM -0500, Ronald S. Bultje wrote: > Hi, > > On Sun, Nov 1, 2015 at 7:21 PM, Ganesh Ajjanagadde wrote: > > > On Sun, Nov 1, 2015 at 7:15 PM, Michael Niedermayer > > wrote: > > > On Sun, Nov 01, 2015 at 06:51:19PM -0500, Ganesh Ajjanagadde wrote: > > >> On Sun, Nov

Re: [FFmpeg-devel] [PATCH 0/2] first steps to resolving float to int undefined behavior

2015-11-01 Thread Ganesh Ajjanagadde
On Sun, Nov 1, 2015 at 7:59 PM, Ronald S. Bultje wrote: > Hi, > > On Sun, Nov 1, 2015 at 7:21 PM, Ganesh Ajjanagadde wrote: > >> On Sun, Nov 1, 2015 at 7:15 PM, Michael Niedermayer >> wrote: >> > On Sun, Nov 01, 2015 at 06:51:19PM -0500, Ganesh Ajjanagadde wrote: >> >> On Sun, Nov 1, 2015 at 6:2

Re: [FFmpeg-devel] [PATCH 0/2] first steps to resolving float to int undefined behavior

2015-11-01 Thread Ronald S. Bultje
Hi, On Sun, Nov 1, 2015 at 7:21 PM, Ganesh Ajjanagadde wrote: > On Sun, Nov 1, 2015 at 7:15 PM, Michael Niedermayer > wrote: > > On Sun, Nov 01, 2015 at 06:51:19PM -0500, Ganesh Ajjanagadde wrote: > >> On Sun, Nov 1, 2015 at 6:25 PM, Nicolas George wrote: > >> > Le primidi 11 brumaire, an CCXX

Re: [FFmpeg-devel] [PATCH 0/2] first steps to resolving float to int undefined behavior

2015-11-01 Thread Ganesh Ajjanagadde
On Sun, Nov 1, 2015 at 7:15 PM, Michael Niedermayer wrote: > On Sun, Nov 01, 2015 at 06:51:19PM -0500, Ganesh Ajjanagadde wrote: >> On Sun, Nov 1, 2015 at 6:25 PM, Nicolas George wrote: >> > Le primidi 11 brumaire, an CCXXIV, Ronald S. Bultje a écrit : >> >> So, is this a bug in llrint, or is thi

Re: [FFmpeg-devel] [PATCH 0/2] first steps to resolving float to int undefined behavior

2015-11-01 Thread Michael Niedermayer
On Sun, Nov 01, 2015 at 06:51:19PM -0500, Ganesh Ajjanagadde wrote: > On Sun, Nov 1, 2015 at 6:25 PM, Nicolas George wrote: > > Le primidi 11 brumaire, an CCXXIV, Ronald S. Bultje a écrit : > >> So, is this a bug in llrint, or is this a failure to use llrint, or is this > >> different from llrint?

Re: [FFmpeg-devel] [PATCH 0/2] first steps to resolving float to int undefined behavior

2015-11-01 Thread Ganesh Ajjanagadde
On Sun, Nov 1, 2015 at 6:25 PM, Nicolas George wrote: > Le primidi 11 brumaire, an CCXXIV, Ronald S. Bultje a écrit : >> So, is this a bug in llrint, or is this a failure to use llrint, or is this >> different from llrint? It sounds to me that llrint should be used, not our >> own alternative. > >

Re: [FFmpeg-devel] [PATCH 0/2] first steps to resolving float to int undefined behavior

2015-11-01 Thread Nicolas George
Le primidi 11 brumaire, an CCXXIV, Ronald S. Bultje a écrit : > So, is this a bug in llrint, or is this a failure to use llrint, or is this > different from llrint? It sounds to me that llrint should be used, not our > own alternative. Is there a sized version of the function? int64rint? Otherwise

Re: [FFmpeg-devel] [PATCH 0/2] first steps to resolving float to int undefined behavior

2015-11-01 Thread Ganesh Ajjanagadde
On Sun, Nov 1, 2015 at 6:18 PM, Ronald S. Bultje wrote: > Hi, > > On Sun, Nov 1, 2015 at 6:15 PM, Ganesh Ajjanagadde > wrote: >> >> On Sun, Nov 1, 2015 at 6:12 PM, Ronald S. Bultje >> wrote: >> > Hi, >> > >> > On Sun, Nov 1, 2015 at 1:03 PM, Ganesh Ajjanagadde >> > >> > wrote: >> >> >> >> Float

Re: [FFmpeg-devel] [PATCH 0/2] first steps to resolving float to int undefined behavior

2015-11-01 Thread Ronald S. Bultje
Hi, On Sun, Nov 1, 2015 at 6:15 PM, Ganesh Ajjanagadde wrote: > On Sun, Nov 1, 2015 at 6:12 PM, Ronald S. Bultje > wrote: > > Hi, > > > > On Sun, Nov 1, 2015 at 1:03 PM, Ganesh Ajjanagadde < > gajjanaga...@gmail.com> > > wrote: > >> > >> Floating point to integer conversion is well defined when

Re: [FFmpeg-devel] [PATCH 0/2] first steps to resolving float to int undefined behavior

2015-11-01 Thread Ganesh Ajjanagadde
On Sun, Nov 1, 2015 at 6:12 PM, Ronald S. Bultje wrote: > Hi, > > On Sun, Nov 1, 2015 at 1:03 PM, Ganesh Ajjanagadde > wrote: >> >> Floating point to integer conversion is well defined when the float lies >> within >> the representation bounds of the integer after discarding the fractional >> par

Re: [FFmpeg-devel] [PATCH 0/2] first steps to resolving float to int undefined behavior

2015-11-01 Thread Ronald S. Bultje
Hi, On Sun, Nov 1, 2015 at 1:03 PM, Ganesh Ajjanagadde wrote: > Floating point to integer conversion is well defined when the float lies > within > the representation bounds of the integer after discarding the fractional > part. > However, in other cases, unfortunately the standard leaves it und

[FFmpeg-devel] [PATCH 0/2] first steps to resolving float to int undefined behavior

2015-11-01 Thread Ganesh Ajjanagadde
Floating point to integer conversion is well defined when the float lies within the representation bounds of the integer after discarding the fractional part. However, in other cases, unfortunately the standard leaves it undefined. In particular, assuming that it saturates in a sane way is a danger