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

Michael Niedermayer michaelni at gmx.at
Sat Aug 10 19:39:41 CEST 2013


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

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- 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/0dc46684/attachment.asc>


More information about the ffmpeg-devel mailing list