3 ## Copyright (c) 2014 The WebM project authors. All Rights Reserved.
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
7 ## tree. An additional intellectual property rights grant can be found
8 ## in the file PATENTS. All contributing project authors may
9 ## be found in the AUTHORS file in the root of the source tree.
11 ## This file tests vpxdec. To add new tests to this file, do the following:
12 ## 1. Write a shell function (this is your test).
13 ## 2. Add the function to vpxdec_tests (on a new line).
15 . $(dirname $0)/tools_common.sh
17 VP8_IVF_FILE="${LIBVPX_TEST_DATA_PATH}/vp80-00-comprehensive-001.ivf"
18 VP9_WEBM_FILE="${LIBVPX_TEST_DATA_PATH}/vp90-2-00-quantizer-00.webm"
20 # Environment check: Make sure input is available.
21 vpxdec_verify_environment() {
22 if [ ! -e "${VP8_IVF_FILE}" ] || [ ! -e "${VP9_WEBM_FILE}" ]; then
23 echo "Libvpx test data must exist in LIBVPX_TEST_DATA_PATH."
28 vpxdec_can_decode_vp8() {
29 if [ "$(vpxdec_available)" = "yes" ] && \
30 [ "$(vp8_decode_available)" = "yes" ]; then
35 vpxdec_can_decode_vp9() {
36 if [ "$(vpxdec_available)" = "yes" ] && \
37 [ "$(vp9_decode_available)" = "yes" ]; then
43 if [ "$(vpxdec_can_decode_vp8)" = "yes" ]; then
44 vpxdec "${VP8_IVF_FILE}"
48 vpxdec_vp8_ivf_pipe_input() {
49 if [ "$(vpxdec_can_decode_vp8)" = "yes" ]; then
50 vpxdec "${VP8_IVF_FILE}" -
55 if [ "$(vpxdec_can_decode_vp9)" = "yes" ] && \
56 [ "$(webm_io_available)" = "yes" ]; then
57 vpxdec "${VP9_WEBM_FILE}"
61 vpxdec_tests="vpxdec_vp8_ivf
62 vpxdec_vp8_ivf_pipe_input
65 run_tests vpxdec_verify_environment "${vpxdec_tests}"