diff options
author | Diego Biurrun <diego@biurrun.de> | 2009-04-10 17:23:38 +0000 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2009-04-10 17:23:38 +0000 |
commit | 64bde1974be4ab53f5ec468ef8f8c4cf18c27c52 (patch) | |
tree | 865f1ec8ddd7b6ba0e0cc224ac4ef0390cd83c03 /libavutil | |
parent | ee30cdabadc055ae49d9b92e800839b5d8925598 (diff) | |
download | ffmpeg-64bde1974be4ab53f5ec468ef8f8c4cf18c27c52.tar.gz |
cosmetics: Rename prn variable to prng (Pseudo Random Number Generator).
Originally committed as revision 18422 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/aes.c | 6 | ||||
-rw-r--r-- | libavutil/pca.c | 12 | ||||
-rw-r--r-- | libavutil/tree.c | 8 |
3 files changed, 13 insertions, 13 deletions
diff --git a/libavutil/aes.c b/libavutil/aes.c index 49c23e1d46..d3a271c379 100644 --- a/libavutil/aes.c +++ b/libavutil/aes.c @@ -208,12 +208,12 @@ int main(void){ {0x73, 0x22, 0x81, 0xc0, 0xa0, 0xaa, 0xb8, 0xf7, 0xa5, 0x4a, 0x0c, 0x67, 0xa0, 0xc4, 0x5e, 0xcf}, {0x6d, 0x25, 0x1e, 0x69, 0x44, 0xb0, 0x51, 0xe0, 0x4e, 0xaa, 0x6f, 0xb4, 0xdb, 0xf7, 0x84, 0x65}}; uint8_t temp[16]; - AVLFG prn; + AVLFG prng; av_aes_init(&ae, "PI=3.141592654..", 128, 0); av_aes_init(&ad, "PI=3.141592654..", 128, 1); av_log_set_level(AV_LOG_DEBUG); - av_lfg_init(&prn, 1); + av_lfg_init(&prng, 1); for(i=0; i<2; i++){ av_aes_init(&b, rkey[i], 128, 1); @@ -225,7 +225,7 @@ int main(void){ for(i=0; i<10000; i++){ for(j=0; j<16; j++){ - pt[j] = av_lfg_get(&prn); + pt[j] = av_lfg_get(&prng); } {START_TIMER av_aes_crypt(&ae, temp, pt, 1, NULL, 0); diff --git a/libavutil/pca.c b/libavutil/pca.c index 09c542bf93..6891026a5b 100644 --- a/libavutil/pca.c +++ b/libavutil/pca.c @@ -174,18 +174,18 @@ int main(void){ #define LEN 8 double eigenvector[LEN*LEN]; double eigenvalue[LEN]; - AVLFG prn; + AVLFG prng; - av_lfg_init(&prn, 1); + av_lfg_init(&prng, 1); pca= ff_pca_init(LEN); for(i=0; i<9000000; i++){ double v[2*LEN+100]; double sum=0; - int pos = av_lfg_get(&prn) % LEN; - int v2 = av_lfg_get(&prn) % 101 - 50; - v[0] = av_lfg_get(&prn) % 101 - 50; + int pos = av_lfg_get(&prng) % LEN; + int v2 = av_lfg_get(&prng) % 101 - 50; + v[0] = av_lfg_get(&prng) % 101 - 50; for(j=1; j<8; j++){ if(j<=pos) v[j]= v[0]; else v[j]= v2; @@ -194,7 +194,7 @@ int main(void){ /* for(j=0; j<LEN; j++){ v[j] -= v[pos]; }*/ -// sum += av_lfg_get(&prn) % 10; +// sum += av_lfg_get(&prng) % 10; /* for(j=0; j<LEN; j++){ v[j] -= sum/LEN; }*/ diff --git a/libavutil/tree.c b/libavutil/tree.c index e651e65f07..cce1d31090 100644 --- a/libavutil/tree.c +++ b/libavutil/tree.c @@ -182,12 +182,12 @@ int main(void){ int i; void *k; AVTreeNode *root= NULL, *node=NULL; - AVLFG prn; + AVLFG prng; - av_lfg_init(&prn, 1); + av_lfg_init(&prng, 1); for(i=0; i<10000; i++){ - int j = av_lfg_get(&prn) % 86294; + int j = av_lfg_get(&prng) % 86294; if(check(root) > 999){ av_log(NULL, AV_LOG_ERROR, "FATAL error %d\n", i); print(root, 0); @@ -198,7 +198,7 @@ int main(void){ node= av_mallocz(av_tree_node_size); av_tree_insert(&root, (void*)(j+1), cmp, &node); - j = av_lfg_get(&prn) % 86294; + j = av_lfg_get(&prng) % 86294; { AVTreeNode *node2=NULL; av_log(NULL, AV_LOG_ERROR, "removing %4d\n", j); |