[FFmpeg-devel] [PATCH] ffmpeg: remove obsolete workaround in trim insertion.

Michael Niedermayer michaelni at gmx.at
Sat Aug 10 20:21:26 CEST 2013


On Sat, Aug 10, 2013 at 07:39:41PM +0200, Michael Niedermayer wrote:
> On Sat, Aug 10, 2013 at 07:30:15PM +0200, Nicolas George wrote:
> > Le tridi 23 thermidor, an CCXXI, Hendrik Leppkes a écrit :
> > > This commit broke the FATE test flic-af11-palette-change on a number
> > > of systems, including mingw, BSD and linux (all 32-bit and gcc as far
> > > as i can see, 64-bit and other compilers seem unaffected so far)
> > 
> > Thanks for the report. It is caused by double -> int rounding differences.
> > 
> > More precisely, the requested duration is 3.3, expressed as a floating point
> > it gives the binary representation, in little endian, "66 66 66 66 66 66 0a
> > 40", which makes it between 3.2999999999999996003 and 3.3000000000000000444,
> > and theoretically 3.2999999999999998223. When converting it to integer in
> > milliseconds, x86 comes with 3299999 while x86_64 comes with 3300000. This
> > is then converted to the time base (1/35), respectively 115.499965 rounded
> > to 115 and 115.5 rounded to 116.
> > 
> > I suspect Paul's intent of doing away with floating point arithmetic in the
> > trim filter would fix the problem. In the meantime, the attached patch seems
> > to fix things, and is probably more correct (1/35 time base means two
> > significant decimal digits) too.
> > 
> > If it is deemed correct, feel free to push without waiting for me in order
> > to get FATE green again as soon as possible.
> > 
> > Regards,
> > 
> > -- 
> >   Nicolas George
> 
> >  video.mak |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > cd73f7cbc4806baa7a5432347ca8fa189214cc2e  0001-tests-fli-avoid-rounding-errors-in-t-option.patch
> > From 52fb20d65df6703c9a73134ee07d0134b60fca5b Mon Sep 17 00:00:00 2001
> > From: Nicolas George <nicolas.george at normalesup.org>
> > Date: Sat, 10 Aug 2013 19:27:07 +0200
> > Subject: [PATCH] tests/fli: avoid rounding errors in -t option.
> 
> LGTM

applied


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Old school: Use the lowest level language in which you can solve the problem
            conveniently.
New school: Use the highest level language in which the latest supercomputer
            can solve the problem without the user falling asleep waiting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130810/6be13d23/attachment.asc>


More information about the ffmpeg-devel mailing list