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

Thomas Turner thomastdt at googlemail.com
Wed Feb 22 06:12:57 EET 2017



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
> 
> --- ffmpeg/tests/ref/fate/lfg  2017-02-17 22:27:05.394644315 +0100
> +++ tests/data/fate/lfg 2017-02-17 22:53:34.978677803 +0100
> @@ -1004,4 +1004,4 @@
>  true stddev  : 53.000000
>  z-score      : 0.181279
>  p-value      : 0.428600
> -QH[normality]: 1.015347
> +QH[normality]: -274309382319023864748424681468621758678576399865310792059887853269490762262076171214661036349063168.000000
> Test lfg failed. Look at tests/data/fate/lfg.err for details.
> make: *** [fate-lfg] Error 1
> 
> 
> 8...]
> 
> 
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 


More information about the ffmpeg-devel mailing list