| 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 14 matching lines...) Expand all Loading... |
| 25 } | 25 } |
| 26 | 26 |
| 27 # Runs simple_decoder using $1 as input file. $2 is the codec name, and is used | 27 # Runs simple_decoder using $1 as input file. $2 is the codec name, and is used |
| 28 # solely to name the output file. | 28 # solely to name the output file. |
| 29 simple_decoder() { | 29 simple_decoder() { |
| 30 local decoder="${LIBVPX_BIN_PATH}/simple_decoder${VPX_TEST_EXE_SUFFIX}" | 30 local decoder="${LIBVPX_BIN_PATH}/simple_decoder${VPX_TEST_EXE_SUFFIX}" |
| 31 local input_file="$1" | 31 local input_file="$1" |
| 32 local codec="$2" | 32 local codec="$2" |
| 33 local output_file="${VPX_TEST_OUTPUT_DIR}/simple_decoder_${codec}.raw" | 33 local output_file="${VPX_TEST_OUTPUT_DIR}/simple_decoder_${codec}.raw" |
| 34 | 34 |
| 35 [ -x "${decoder}" ] || return 1 | 35 if [ ! -x "${decoder}" ]; then |
| 36 elog "${decoder} does not exist or is not executable." |
| 37 return 1 |
| 38 fi |
| 36 | 39 |
| 37 eval "${decoder}" "${input_file}" "${output_file}" ${devnull} | 40 eval "${decoder}" "${input_file}" "${output_file}" ${devnull} |
| 38 | 41 |
| 39 [ -e "${output_file}" ] || return 1 | 42 [ -e "${output_file}" ] || return 1 |
| 40 } | 43 } |
| 41 | 44 |
| 42 simple_decoder_vp8() { | 45 simple_decoder_vp8() { |
| 43 if [ "$(vp8_decode_available)" = "yes" ]; then | 46 if [ "$(vp8_decode_available)" = "yes" ]; then |
| 44 simple_decoder "${VP8_IVF_FILE}" vp8 || return 1 | 47 simple_decoder "${VP8_IVF_FILE}" vp8 || return 1 |
| 45 fi | 48 fi |
| 46 } | 49 } |
| 47 | 50 |
| 48 simple_decoder_vp9() { | 51 simple_decoder_vp9() { |
| 49 if [ "$(vp9_decode_available)" = "yes" ]; then | 52 if [ "$(vp9_decode_available)" = "yes" ]; then |
| 50 simple_decoder "${VP9_IVF_FILE}" vp9 || return 1 | 53 simple_decoder "${VP9_IVF_FILE}" vp9 || return 1 |
| 51 fi | 54 fi |
| 52 } | 55 } |
| 53 | 56 |
| 54 simple_decoder_tests="simple_decoder_vp8 | 57 simple_decoder_tests="simple_decoder_vp8 |
| 55 simple_decoder_vp9" | 58 simple_decoder_vp9" |
| 56 | 59 |
| 57 run_tests simple_decoder_verify_environment "${simple_decoder_tests}" | 60 run_tests simple_decoder_verify_environment "${simple_decoder_tests}" |
| OLD | NEW |