OLD | NEW |
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 11 matching lines...) Expand all Loading... |
22 return 1 | 22 return 1 |
23 fi | 23 fi |
24 } | 24 } |
25 | 25 |
26 # Runs twopass_encoder using the codec specified by $1. | 26 # Runs twopass_encoder using the codec specified by $1. |
27 twopass_encoder() { | 27 twopass_encoder() { |
28 local encoder="${LIBVPX_BIN_PATH}/twopass_encoder${VPX_TEST_EXE_SUFFIX}" | 28 local encoder="${LIBVPX_BIN_PATH}/twopass_encoder${VPX_TEST_EXE_SUFFIX}" |
29 local codec="$1" | 29 local codec="$1" |
30 local output_file="${VPX_TEST_OUTPUT_DIR}/twopass_encoder_${codec}.ivf" | 30 local output_file="${VPX_TEST_OUTPUT_DIR}/twopass_encoder_${codec}.ivf" |
31 | 31 |
32 [ -x "${encoder}" ] || return 1 | 32 if [ ! -x "${encoder}" ]; then |
| 33 elog "${encoder} does not exist or is not executable." |
| 34 return 1 |
| 35 fi |
33 | 36 |
34 eval "${encoder}" "${codec}" "${YUV_RAW_INPUT_WIDTH}" \ | 37 eval "${encoder}" "${codec}" "${YUV_RAW_INPUT_WIDTH}" \ |
35 "${YUV_RAW_INPUT_HEIGHT}" "${YUV_RAW_INPUT}" "${output_file}" \ | 38 "${YUV_RAW_INPUT_HEIGHT}" "${YUV_RAW_INPUT}" "${output_file}" \ |
36 ${devnull} | 39 ${devnull} |
37 | 40 |
38 [ -e "${output_file}" ] || return 1 | 41 [ -e "${output_file}" ] || return 1 |
39 } | 42 } |
40 | 43 |
41 twopass_encoder_vp8() { | 44 twopass_encoder_vp8() { |
42 if [ "$(vp8_encode_available)" = "yes" ]; then | 45 if [ "$(vp8_encode_available)" = "yes" ]; then |
43 twopass_encoder vp8 || return 1 | 46 twopass_encoder vp8 || return 1 |
44 fi | 47 fi |
45 } | 48 } |
46 | 49 |
47 # TODO(tomfinegan): Add a frame limit param to twopass_encoder and enable this | 50 # TODO(tomfinegan): Add a frame limit param to twopass_encoder and enable this |
48 # test. VP9 is just too slow right now: This test takes 31m16s+ on a fast | 51 # test. VP9 is just too slow right now: This test takes 31m16s+ on a fast |
49 # machine. | 52 # machine. |
50 DISABLED_twopass_encoder_vp9() { | 53 DISABLED_twopass_encoder_vp9() { |
51 if [ "$(vp9_encode_available)" = "yes" ]; then | 54 if [ "$(vp9_encode_available)" = "yes" ]; then |
52 twopass_encoder vp9 || return 1 | 55 twopass_encoder vp9 || return 1 |
53 fi | 56 fi |
54 } | 57 } |
55 | 58 |
56 twopass_encoder_tests="twopass_encoder_vp8 | 59 twopass_encoder_tests="twopass_encoder_vp8 |
57 DISABLED_twopass_encoder_vp9" | 60 DISABLED_twopass_encoder_vp9" |
58 | 61 |
59 run_tests twopass_encoder_verify_environment "${twopass_encoder_tests}" | 62 run_tests twopass_encoder_verify_environment "${twopass_encoder_tests}" |
OLD | NEW |