Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Side by Side Diff: source/libvpx/test/decode_to_md5.sh

Issue 341293003: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/test/dct32x32_test.cc ('k') | source/libvpx/test/decode_with_drops.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/sh 1 #!/bin/sh
2 ## 2 ##
3 ## Copyright (c) 2014 The WebM project authors. All Rights Reserved. 3 ## Copyright (c) 2014 The WebM project authors. All Rights Reserved.
4 ## 4 ##
5 ## Use of this source code is governed by a BSD-style license 5 ## Use of this source code is governed by a BSD-style license
6 ## that can be found in the LICENSE file in the root of the source 6 ## that can be found in the LICENSE file in the root of the source
7 ## tree. An additional intellectual property rights grant can be found 7 ## tree. An additional intellectual property rights grant can be found
8 ## in the file PATENTS. All contributing project authors may 8 ## in the file PATENTS. All contributing project authors may
9 ## be found in the AUTHORS file in the root of the source tree. 9 ## be found in the AUTHORS file in the root of the source tree.
10 ## 10 ##
(...skipping 16 matching lines...) Expand all
27 # Runs decode_to_md5 on $1 and captures the md5 sum for the final frame. $2 is 27 # Runs decode_to_md5 on $1 and captures the md5 sum for the final frame. $2 is
28 # interpreted as codec name and used solely to name the output file. $3 is the 28 # interpreted as codec name and used solely to name the output file. $3 is the
29 # expected md5 sum: It must match that of the final frame. 29 # expected md5 sum: It must match that of the final frame.
30 decode_to_md5() { 30 decode_to_md5() {
31 local decoder="${LIBVPX_BIN_PATH}/decode_to_md5${VPX_TEST_EXE_SUFFIX}" 31 local decoder="${LIBVPX_BIN_PATH}/decode_to_md5${VPX_TEST_EXE_SUFFIX}"
32 local input_file="$1" 32 local input_file="$1"
33 local codec="$2" 33 local codec="$2"
34 local expected_md5="$3" 34 local expected_md5="$3"
35 local output_file="${VPX_TEST_OUTPUT_DIR}/decode_to_md5_${codec}" 35 local output_file="${VPX_TEST_OUTPUT_DIR}/decode_to_md5_${codec}"
36 36
37 [ -x "${decoder}" ] || return 1 37 if [ ! -x "${decoder}" ]; then
38 elog "${decoder} does not exist or is not executable."
39 return 1
40 fi
38 41
39 eval "${decoder}" "${input_file}" "${output_file}" ${devnull} 42 eval "${decoder}" "${input_file}" "${output_file}" ${devnull}
40 43
41 [ -e "${output_file}" ] || return 1 44 [ -e "${output_file}" ] || return 1
42 45
43 local md5_last_frame=$(tail -n1 "${output_file}") 46 local md5_last_frame=$(tail -n1 "${output_file}")
44 local actual_md5=$(echo "${md5_last_frame% *}" | tr -d [:space:]) 47 local actual_md5=$(echo "${md5_last_frame% *}" | tr -d [:space:])
45 [ "${actual_md5}" = "${expected_md5}" ] || return 1 48 [ "${actual_md5}" = "${expected_md5}" ] || return 1
46 } 49 }
47 50
(...skipping 12 matching lines...) Expand all
60 63
61 if [ "$(vp9_decode_available)" = "yes" ]; then 64 if [ "$(vp9_decode_available)" = "yes" ]; then
62 decode_to_md5 "${VP9_IVF_FILE}" "vp9" "${expected_md5}" 65 decode_to_md5 "${VP9_IVF_FILE}" "vp9" "${expected_md5}"
63 fi 66 fi
64 } 67 }
65 68
66 decode_to_md5_tests="decode_to_md5_vp8 69 decode_to_md5_tests="decode_to_md5_vp8
67 decode_to_md5_vp9" 70 decode_to_md5_vp9"
68 71
69 run_tests decode_to_md5_verify_environment "${decode_to_md5_tests}" 72 run_tests decode_to_md5_verify_environment "${decode_to_md5_tests}"
OLDNEW
« no previous file with comments | « source/libvpx/test/dct32x32_test.cc ('k') | source/libvpx/test/decode_with_drops.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698