Commit 83962004 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '3dc06b69'

* commit '3dc06b69':
  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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 5717562c 3dc06b69
......@@ -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;
}
......
# 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#'; }
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment