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 vpxenc using hantro_collage_w352h288.yuv as input. To add
12 ## new tests to this file, do the following:
13 ## 1. Write a shell function (this is your test).
14 ## 2. Add the function to vpxenc_tests (on a new line).
16 . $(dirname $0)/tools_common.sh
20 # Environment check: Make sure input is available.
21 vpxenc_verify_environment() {
22 if [ ! -e "${YUV_RAW_INPUT}" ]; then
23 echo "The file ${YUV_RAW_INPUT##*/} must exist in LIBVPX_TEST_DATA_PATH."
28 vpxenc_can_encode_vp8() {
29 if [ "$(vpxenc_available)" = "yes" ] && \
30 [ "$(vp8_encode_available)" = "yes" ]; then
35 vpxenc_can_encode_vp9() {
36 if [ "$(vpxenc_available)" = "yes" ] && \
37 [ "$(vp9_encode_available)" = "yes" ]; then
43 if [ "$(vpxenc_can_encode_vp8)" = "yes" ]; then
44 vpxenc vp8 ${YUV_RAW_INPUT_WIDTH} ${YUV_RAW_INPUT_HEIGHT} ${TEST_FRAMES} \
45 "${YUV_RAW_INPUT}" vp8.ivf
49 vpxenc_vp8_ivf_pipe_input() {
50 if [ "$(vpxenc_can_encode_vp8)" = "yes" ]; then
51 vpxenc vp8 ${YUV_RAW_INPUT_WIDTH} ${YUV_RAW_INPUT_HEIGHT} ${TEST_FRAMES} \
52 "${YUV_RAW_INPUT}" vp8.ivf -
57 if [ "$(vpxenc_can_encode_vp8)" = "yes" ] &&
58 [ "$(webm_io_available)" = "yes" ] ; then
59 vpxenc vp8 ${YUV_RAW_INPUT_WIDTH} ${YUV_RAW_INPUT_HEIGHT} ${TEST_FRAMES} \
60 "${YUV_RAW_INPUT}" vp8.webm
65 if [ "$(vpxenc_can_encode_vp9)" = "yes" ]; then
66 vpxenc vp9 ${YUV_RAW_INPUT_WIDTH} ${YUV_RAW_INPUT_HEIGHT} ${TEST_FRAMES} \
67 "${YUV_RAW_INPUT}" vp9.ivf
72 if [ "$(vpxenc_can_encode_vp9)" = "yes" ] &&
73 [ "$(webm_io_available)" = "yes" ] ; then
74 vpxenc vp9 ${YUV_RAW_INPUT_WIDTH} ${YUV_RAW_INPUT_HEIGHT} ${TEST_FRAMES} \
75 "${YUV_RAW_INPUT}" vp9.webm
79 DISABLED_vpxenc_vp9_ivf_lossless() {
80 if [ "$(vpxenc_can_encode_vp9)" = "yes" ]; then
81 vpxenc vp9 ${YUV_RAW_INPUT_WIDTH} ${YUV_RAW_INPUT_HEIGHT} ${TEST_FRAMES} \
82 "${YUV_RAW_INPUT}" vp9_lossless.ivf --lossless
86 vpxenc_tests="vpxenc_vp8_ivf
88 vpxenc_vp8_ivf_pipe_input
91 DISABLED_vpxenc_vp9_ivf_lossless"
93 run_tests vpxenc_verify_environment "${vpxenc_tests}"