[FFmpeg-devel] [PATCH] Fix swscale-test randomness

Michael Niedermayer michaelni
Sat Jan 30 13:49:05 CET 2010


On Sat, Jan 30, 2010 at 01:40:29PM +0100, Stefano Sabatini wrote:
> On date Friday 2010-01-29 06:16:14 -0200, Ramiro Polla encoded:
> > On Fri, Jan 29, 2010 at 2:52 AM, Vitor Sessak <vitor1001 at gmail.com> wrote:
> > > Stefano Sabatini wrote:
> > >> this is meant to simplify the testing/debuggin work in lsws, and
> > >> provide a basis for a future lswstest rule, often it happens that I
> > >> need to test/debug only a particular conversion, I was using the scale
> > >> lavfi filter for this but it is way easier this way.
> > >>
> > >> I expected the new result to be different from the old one as the
> > >> random source is different,
> > >
> > > This is easy to work-around, just re-init LFG fo every format pair in the
> > > unpatched swscale-test and it should give the same results.
> > >
> > >> but I noted that the new result is almost
> > >> always *worse* than the old one (that is the output obtained with
> > >> the old swscale-test), can someone explain?
> > >
> > > Have you tried running twice with exactly the same binary to see if there is
> > > nothing reading uninitialized mem?
> > 
> > The fast bilinear code reads unitialized memory (it always overreads
> > at least one pixel).
> 
> This patch makes the swscale-test output constant, with both the
> current swscale-test and and my patched
> swscale-test+swscale-test-all.sh.
> 
> Regards.
> -- 
> FFmpeg = Fanciful and Frenzy Most Pure Elegant Gigant

>  swscale-test.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 5015d3a1a95f9408dc59e6d7a47302c795e7734a  fix-swscale-test-randomness.patch

ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100130/8c22a033/attachment.pgp>



More information about the ffmpeg-devel mailing list