[FFmpeg-devel] [PATCH] avutil/tests/lfg.c: added proper normality test
Michael Niedermayer
michaelni at gmx.at
Wed Feb 1 11:37:05 EET 2017
On Tue, Jan 31, 2017 at 07:56:39PM -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
>
[...]
> diff --git a/tests/fate/libavutil.mak b/tests/fate/libavutil.mak
> index a7bf739..c3b9091 100644
> --- a/tests/fate/libavutil.mak
> +++ b/tests/fate/libavutil.mak
> @@ -101,6 +101,11 @@ FATE_LIBAVUTIL += fate-imgutils
> fate-imgutils: libavutil/tests/imgutils$(EXESUF)
> fate-imgutils: CMD = run libavutil/tests/imgutils
>
> +FATE_LIBAVUTIL += fate-lfg
> +fate-lfg: libavutil/tests/lfg$(EXESUF)
> +fate-lfg: CMD = run libavutil/tests/lfg
> +fate-lfg: REF = /dev/null
This test does not work
for example with:
@@ -109,6 +109,7 @@ int main(void)
for (i = 0; i < tot_samp; i += 2) {
double bmg_out[2];
av_bmg_get(&state, bmg_out);
+ bmg_out[0] = bmg_out[1] = 0;
PRN_arr[i ] = bmg_out[0] * stddev + mean;
PRN_arr[i+1] = bmg_out[1] * stddev + mean;
samp_mean += PRN_arr[i] + PRN_arr[i+1];
"make fate-lfg" still passes
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The real ebay dictionary, page 2
"100% positive feedback" - "All either got their money back or didnt complain"
"Best seller ever, very honest" - "Seller refunded buyer after failed scam"
-------------- 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/20170201/619aaa0d/attachment.sig>
More information about the ffmpeg-devel
mailing list