[FFmpeg-devel] [PATCH] avutil/tests/lfg.c: added proper normality test

Michael Niedermayer michael at niedermayer.cc
Thu Feb 23 00:16:12 EET 2017


oops forgot to reply to all, this one went only to thomas by mistake

On Tue, Feb 21, 2017 at 08:12:57PM -0800, Thomas Turner wrote:
> 
> 
> On 02/17/2017 02:15 PM, Michael Niedermayer wrote:
> > On Thu, Feb 16, 2017 at 08:29:38PM -0800, Thomas Turner wrote:
> >> The Chen-Shapiro(CS) test was used to test normality for
> >> Lagged Fibonacci PRNG.
> >>
> >> Normality Hypothesis Test:
> >>
> >> The null hypothesis formally tests if the population
> >> the sample represents is normally-distributed. For
> >> CS, when the normality hypothesis is True, the
> >> distribution of QH will have a mean close to 1.
> >>
> >> Information on CS can be found here:
> >>
> >> http://www.stata-journal.com/sjpdf.html?articlenum=st0264
> >> http://www.originlab.com/doc/Origin-Help/NormalityTest-Algorithm
> >>
> >> Signed-off-by: Thomas Turner <thomastdt at googlemail.com>
> >> ---
> >>  libavutil/tests/lfg.c    |  170 ++++++--
> >>  tests/fate/libavutil.mak |    4 +
> >>  tests/ref/fate/lfg       | 1007 ++++++++++++++++++++++++++++++++++++++++++++++
> >>  3 files changed, 1157 insertions(+), 24 deletions(-)
> >>  create mode 100644 tests/ref/fate/lfg
> > 
> > works on x86_64 linux but fails on x86_32
> 
> What if we force gcc compiler to use IEEE 754 floating-point semantics...Will adding the following gcc compilation flags to ffmpeg configuration allow the test to pass? : -msse2 -mfpmath=sse

there is no gurantee that the hardware this runs on supports sse
nor that the compiler is gcc

C has a somewhat loose definition of floating point operations,
that allows C compilers to perform more optimizations and run on more
hardware. There isnt much that can be done about this, short of not
using floating point

But why does it not work with default options?
or is that unknown ?
did you succeed in reproduring the issue ?

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

There will always be a question for which you do not know the correct answer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170222/b6222e5f/attachment.sig>


More information about the ffmpeg-devel mailing list