aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-16 14:04:14 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-16 14:04:14 +0200
commit83962004f7275a4ea98ca02398ae5dfff59e5fb7 (patch)
tree38ba41a2750d220f95a58b7b3ca6cb540e7fddf5
parent5717562c789f9be9c8e4bab7caec4df83f77cebe (diff)
parent3dc06b6972cf389269e9c36ff0a4373f80f7149b (diff)
downloadffmpeg-83962004f7275a4ea98ca02398ae5dfff59e5fb7.tar.gz
Merge commit '3dc06b6972cf389269e9c36ff0a4373f80f7149b'
* commit '3dc06b6972cf389269e9c36ff0a4373f80f7149b': tiny_psnr: check for specified sample size less than 1 fate: improve md5sum utility selection rangecoder-test: Drop timer output that clutters stderr Conflicts: tests/tiny_psnr.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/rangecoder.c10
-rw-r--r--tests/md5.sh2
-rw-r--r--tests/tiny_psnr.c2
3 files changed, 4 insertions, 10 deletions
diff --git a/libavcodec/rangecoder.c b/libavcodec/rangecoder.c
index 33984aa207..7d2d14defd 100644
--- a/libavcodec/rangecoder.c
+++ b/libavcodec/rangecoder.c
@@ -137,11 +137,8 @@ int main(void)
for (i = 0; i < SIZE; i++)
r[i] = av_lfg_get(&prng) % 7;
- for (i = 0; i < SIZE; i++) {
-START_TIMER
+ for (i = 0; i < SIZE; i++)
put_rac(&c, state, r[i] & 1);
-STOP_TIMER("put_rac")
- }
ff_rac_terminate(&c);
@@ -149,14 +146,11 @@ STOP_TIMER("put_rac")
memset(state, 128, sizeof(state));
- for (i = 0; i < SIZE; i++) {
-START_TIMER
+ for (i = 0; i < SIZE; i++)
if ((r[i] & 1) != get_rac(&c, state)) {
av_log(NULL, AV_LOG_ERROR, "rac failure at %d\n", i);
return 1;
}
-STOP_TIMER("get_rac")
- }
return 0;
}
diff --git a/tests/md5.sh b/tests/md5.sh
index e21e5c37dd..5e2528cc75 100644
--- a/tests/md5.sh
+++ b/tests/md5.sh
@@ -1,6 +1,6 @@
# try to find an md5 program
-if [ X"$(echo | md5sum 2> /dev/null)" != X ]; then
+if [ X"$(echo | md5sum -b 2> /dev/null)" != X ]; then
do_md5sum() { md5sum -b $1; }
elif [ X"$(echo | command md5 2> /dev/null)" != X ]; then
do_md5sum() { command md5 $1 | sed 's#MD5 (\(.*\)) = \(.*\)#\2 *\1#'; }
diff --git a/tests/tiny_psnr.c b/tests/tiny_psnr.c
index b912061310..264aa4d169 100644
--- a/tests/tiny_psnr.c
+++ b/tests/tiny_psnr.c
@@ -231,7 +231,7 @@ int main(int argc, char *argv[])
} else {
char *end;
len = strtol(argv[3], &end, 0);
- if (*end || len > 2) {
+ if (*end || len < 1 || len > 2) {
fprintf(stderr, "Unsupported sample format: %s\n", argv[3]);
return 1;
}