ref: 93ac60a65b65b1edef114af6caefb86d1277066b
parent: 8b2abdeed7ddb930eaf79284fdca946bc52e9651
author: Tom Finegan <tomfinegan@google.com>
date: Thu Aug 21 12:30:37 EDT 2014
vpxenc.sh: Make vpxenc() usage agree with implementation. - Make $1 input file at all call sites. - Actually use vpxenc_pipe(). Change-Id: I22f25719aeb3dce60863207b2e2a49e42e27ed06
--- a/test/vpxenc.sh
+++ b/test/vpxenc.sh
@@ -69,13 +69,13 @@
vpxenc_vp8_ivf() {if [ "$(vpxenc_can_encode_vp8)" = "yes" ]; then
local readonly output="${VPX_TEST_OUTPUT_DIR}/vp8.ivf"- vpxenc --codec=vp8 \
+ vpxenc "${YUV_RAW_INPUT}" \+ --codec=vp8 \
--width="${YUV_RAW_INPUT_WIDTH}" \ --height="${YUV_RAW_INPUT_HEIGHT}" \ --limit="${TEST_FRAMES}" \--ivf \
- --output="${output}" \- "${YUV_RAW_INPUT}"+ --output="${output}" if [ ! -e "${output}" ]; thenelog "Output file does not exist."
@@ -88,12 +88,12 @@
if [ "$(vpxenc_can_encode_vp8)" = "yes" ] && \
[ "$(webm_io_available)" = "yes" ]; then
local readonly output="${VPX_TEST_OUTPUT_DIR}/vp8.webm"- vpxenc --codec=vp8 \
+ vpxenc "${YUV_RAW_INPUT}" \+ --codec=vp8 \
--width="${YUV_RAW_INPUT_WIDTH}" \ --height="${YUV_RAW_INPUT_HEIGHT}" \ --limit="${TEST_FRAMES}" \- --output="${output}" \- "${YUV_RAW_INPUT}"+ --output="${output}" if [ ! -e "${output}" ]; thenelog "Output file does not exist."
@@ -142,13 +142,13 @@
if [ "$(vpxenc_can_encode_vp8)" = "yes" ] && \
[ "$(webm_io_available)" = "yes" ]; then
local readonly output="${VPX_TEST_OUTPUT_DIR}/vp8.webm"- vpxenc --codec=vp8 \
+ vpxenc "${YUV_RAW_INPUT}" \+ --codec=vp8 \
--width="${YUV_RAW_INPUT_WIDTH}" \ --height="${YUV_RAW_INPUT_HEIGHT}" \ --limit="${TEST_FRAMES}" \ --output="${output}" \- --passes=2 \
- "${YUV_RAW_INPUT}"+ --passes=2
if [ ! -e "${output}" ]; thenelog "Output file does not exist."
@@ -163,7 +163,8 @@
local readonly lag_total_frames=20
local readonly lag_frames=10
local readonly output="${VPX_TEST_OUTPUT_DIR}/vp8_lag10_frames20.webm"- vpxenc --codec=vp8 \
+ vpxenc "${YUV_RAW_INPUT}" \+ --codec=vp8 \
--width="${YUV_RAW_INPUT_WIDTH}" \ --height="${YUV_RAW_INPUT_HEIGHT}" \ --limit="${lag_total_frames}" \@@ -170,8 +171,7 @@
--lag-in-frames="${lag_frames}" \ --output="${output}" \--auto-alt-ref=1 \
- --passes=2 \
- "${YUV_RAW_INPUT}"+ --passes=2
if [ ! -e "${output}" ]; thenelog "Output file does not exist."
@@ -183,14 +183,13 @@
vpxenc_vp8_ivf_piped_input() {if [ "$(vpxenc_can_encode_vp8)" = "yes" ]; then
local readonly output="${VPX_TEST_OUTPUT_DIR}/vp8_piped_input.ivf"- cat "${YUV_RAW_INPUT}" \- | vpxenc --codec=vp8 \
+ vpxenc_pipe "${YUV_RAW_INPUT}" \+ --codec=vp8 \
--width="${YUV_RAW_INPUT_WIDTH}" \ --height="${YUV_RAW_INPUT_HEIGHT}" \ --limit="${TEST_FRAMES}" \--ivf \
- --output="${output}" \- -
+ --output="${output}" if [ ! -e "${output}" ]; thenelog "Output file does not exist."
@@ -202,13 +201,13 @@
vpxenc_vp9_ivf() {if [ "$(vpxenc_can_encode_vp9)" = "yes" ]; then
local readonly output="${VPX_TEST_OUTPUT_DIR}/vp9.ivf"- vpxenc --codec=vp9 \
+ vpxenc "${YUV_RAW_INPUT}" \+ --codec=vp9 \
--width="${YUV_RAW_INPUT_WIDTH}" \ --height="${YUV_RAW_INPUT_HEIGHT}" \ --limit="${TEST_FRAMES}" \--ivf \
- --output="${output}" \- "${YUV_RAW_INPUT}"+ --output="${output}" if [ ! -e "${output}" ]; thenelog "Output file does not exist."
@@ -221,12 +220,12 @@
if [ "$(vpxenc_can_encode_vp9)" = "yes" ] && \
[ "$(webm_io_available)" = "yes" ]; then
local readonly output="${VPX_TEST_OUTPUT_DIR}/vp9.webm"- vpxenc --codec=vp9 \
+ vpxenc "${YUV_RAW_INPUT}" \+ --codec=vp9 \
--width="${YUV_RAW_INPUT_WIDTH}" \ --height="${YUV_RAW_INPUT_HEIGHT}" \ --limit="${TEST_FRAMES}" \- --output="${output}" \- "${YUV_RAW_INPUT}"+ --output="${output}" if [ ! -e "${output}" ]; thenelog "Output file does not exist."
@@ -275,13 +274,13 @@
if [ "$(vpxenc_can_encode_vp9)" = "yes" ] && \
[ "$(webm_io_available)" = "yes" ]; then
local readonly output="${VPX_TEST_OUTPUT_DIR}/vp9.webm"- vpxenc --codec=vp9 \
+ vpxenc "${YUV_RAW_INPUT}" \+ --codec=vp9 \
--width="${YUV_RAW_INPUT_WIDTH}" \ --height="${YUV_RAW_INPUT_HEIGHT}" \ --limit="${TEST_FRAMES}" \ --output="${output}" \- --passes=2 \
- "${YUV_RAW_INPUT}"+ --passes=2
if [ ! -e "${output}" ]; thenelog "Output file does not exist."
@@ -293,14 +292,14 @@
vpxenc_vp9_ivf_lossless() {if [ "$(vpxenc_can_encode_vp9)" = "yes" ]; then
local readonly output="${VPX_TEST_OUTPUT_DIR}/vp9_lossless.ivf"- vpxenc --codec=vp9 \
+ vpxenc "${YUV_RAW_INPUT}" \+ --codec=vp9 \
--width="${YUV_RAW_INPUT_WIDTH}" \ --height="${YUV_RAW_INPUT_HEIGHT}" \ --limit="${TEST_FRAMES}" \--ivf \
--output="${output}" \- --lossless=1 \
- "${YUV_RAW_INPUT}"+ --lossless=1
if [ ! -e "${output}" ]; thenelog "Output file does not exist."
@@ -312,7 +311,8 @@
vpxenc_vp9_ivf_minq0_maxq0() {if [ "$(vpxenc_can_encode_vp9)" = "yes" ]; then
local readonly output="${VPX_TEST_OUTPUT_DIR}/vp9_lossless_minq0_maxq0.ivf"- vpxenc --codec=vp9 \
+ vpxenc "${YUV_RAW_INPUT}" \+ --codec=vp9 \
--width="${YUV_RAW_INPUT_WIDTH}" \ --height="${YUV_RAW_INPUT_HEIGHT}" \ --limit="${TEST_FRAMES}" \@@ -319,8 +319,7 @@
--ivf \
--output="${output}" \--min-q=0 \
- --max-q=0 \
- "${YUV_RAW_INPUT}"+ --max-q=0
if [ ! -e "${output}" ]; thenelog "Output file does not exist."
@@ -335,7 +334,8 @@
local readonly lag_total_frames=20
local readonly lag_frames=10
local readonly output="${VPX_TEST_OUTPUT_DIR}/vp9_lag10_frames20.webm"- vpxenc --codec=vp9 \
+ vpxenc "${YUV_RAW_INPUT}" \+ --codec=vp9 \
--width="${YUV_RAW_INPUT_WIDTH}" \ --height="${YUV_RAW_INPUT_HEIGHT}" \ --limit="${lag_total_frames}" \@@ -342,8 +342,7 @@
--lag-in-frames="${lag_frames}" \ --output="${output}" \--passes=2 \
- --auto-alt-ref=1 \
- "${YUV_RAW_INPUT}"+ --auto-alt-ref=1
if [ ! -e "${output}" ]; thenelog "Output file does not exist."
--
⑨