| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 yuv_input_hantro_collage() { | 53 yuv_input_hantro_collage() { |
| 54 echo ""${YUV_RAW_INPUT}" | 54 echo ""${YUV_RAW_INPUT}" |
| 55 --width="${YUV_RAW_INPUT_WIDTH}" | 55 --width="${YUV_RAW_INPUT_WIDTH}" |
| 56 --height="${YUV_RAW_INPUT_HEIGHT}"" | 56 --height="${YUV_RAW_INPUT_HEIGHT}"" |
| 57 } | 57 } |
| 58 | 58 |
| 59 y4m_input_non_square_par() { | 59 y4m_input_non_square_par() { |
| 60 echo ""${Y4M_NOSQ_PAR_INPUT}"" | 60 echo ""${Y4M_NOSQ_PAR_INPUT}"" |
| 61 } | 61 } |
| 62 | 62 |
| 63 y4m_input_720p() { |
| 64 echo ""${Y4M_720P_INPUT}"" |
| 65 } |
| 66 |
| 63 # Echo default vpxenc real time encoding params. $1 is the codec, which defaults | 67 # Echo default vpxenc real time encoding params. $1 is the codec, which defaults |
| 64 # to vp8 if unspecified. | 68 # to vp8 if unspecified. |
| 65 vpxenc_rt_params() { | 69 vpxenc_rt_params() { |
| 66 local readonly codec="${1:-vp8}" | 70 local readonly codec="${1:-vp8}" |
| 67 echo "--codec=${codec} | 71 echo "--codec=${codec} |
| 68 --buf-initial-sz=500 | 72 --buf-initial-sz=500 |
| 69 --buf-optimal-sz=600 | 73 --buf-optimal-sz=600 |
| 70 --buf-sz=1000 | 74 --buf-sz=1000 |
| 71 --cpu-used=-5 | 75 --cpu-used=-6 |
| 72 --end-usage=cbr | 76 --end-usage=cbr |
| 73 --error-resilient=1 | 77 --error-resilient=1 |
| 74 --kf-max-dist=90000 | 78 --kf-max-dist=90000 |
| 75 --lag-in-frames=0 | 79 --lag-in-frames=0 |
| 76 --max-intra-rate=300 | 80 --max-intra-rate=300 |
| 77 --max-q=56 | 81 --max-q=56 |
| 78 --min-q=2 | 82 --min-q=2 |
| 79 --noise-sensitivity=0 | 83 --noise-sensitivity=0 |
| 80 --overshoot-pct=50 | 84 --overshoot-pct=50 |
| 81 --passes=1 | 85 --passes=1 |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 $(vpxenc_rt_params vp9) \ | 255 $(vpxenc_rt_params vp9) \ |
| 252 --output="${output}" | 256 --output="${output}" |
| 253 | 257 |
| 254 if [ ! -e "${output}" ]; then | 258 if [ ! -e "${output}" ]; then |
| 255 elog "Output file does not exist." | 259 elog "Output file does not exist." |
| 256 return 1 | 260 return 1 |
| 257 fi | 261 fi |
| 258 fi | 262 fi |
| 259 } | 263 } |
| 260 | 264 |
| 265 vpxenc_vp9_webm_rt_multithread_tiled() { |
| 266 if [ "$(vpxenc_can_encode_vp9)" = "yes" ] && \ |
| 267 [ "$(webm_io_available)" = "yes" ]; then |
| 268 local readonly output="${VPX_TEST_OUTPUT_DIR}/vp9_rt_multithread_tiled.webm" |
| 269 local readonly tilethread_min=2 |
| 270 local readonly tilethread_max=4 |
| 271 local readonly num_threads="$(seq ${tilethread_min} ${tilethread_max})" |
| 272 local readonly num_tile_cols="$(seq ${tilethread_min} ${tilethread_max})" |
| 273 |
| 274 for threads in ${num_threads}; do |
| 275 for tile_cols in ${num_tile_cols}; do |
| 276 vpxenc $(y4m_input_720p) \ |
| 277 $(vpxenc_rt_params vp9) \ |
| 278 --threads=${threads} \ |
| 279 --tile-columns=${tile_cols} \ |
| 280 --output="${output}" |
| 281 done |
| 282 done |
| 283 |
| 284 if [ ! -e "${output}" ]; then |
| 285 elog "Output file does not exist." |
| 286 return 1 |
| 287 fi |
| 288 |
| 289 rm "${output}" |
| 290 fi |
| 291 } |
| 292 |
| 293 vpxenc_vp9_webm_rt_multithread_tiled_frameparallel() { |
| 294 if [ "$(vpxenc_can_encode_vp9)" = "yes" ] && \ |
| 295 [ "$(webm_io_available)" = "yes" ]; then |
| 296 local readonly output="${VPX_TEST_OUTPUT_DIR}/vp9_rt_mt_t_fp.webm" |
| 297 local readonly tilethread_min=2 |
| 298 local readonly tilethread_max=4 |
| 299 local readonly num_threads="$(seq ${tilethread_min} ${tilethread_max})" |
| 300 local readonly num_tile_cols="$(seq ${tilethread_min} ${tilethread_max})" |
| 301 |
| 302 for threads in ${num_threads}; do |
| 303 for tile_cols in ${num_tile_cols}; do |
| 304 vpxenc $(y4m_input_720p) \ |
| 305 $(vpxenc_rt_params vp9) \ |
| 306 --threads=${threads} \ |
| 307 --tile-columns=${tile_cols} \ |
| 308 --frame-parallel=1 \ |
| 309 --output="${output}" |
| 310 done |
| 311 done |
| 312 |
| 313 if [ ! -e "${output}" ]; then |
| 314 elog "Output file does not exist." |
| 315 return 1 |
| 316 fi |
| 317 |
| 318 rm "${output}" |
| 319 fi |
| 320 } |
| 321 |
| 261 vpxenc_vp9_webm_2pass() { | 322 vpxenc_vp9_webm_2pass() { |
| 262 if [ "$(vpxenc_can_encode_vp9)" = "yes" ] && \ | 323 if [ "$(vpxenc_can_encode_vp9)" = "yes" ] && \ |
| 263 [ "$(webm_io_available)" = "yes" ]; then | 324 [ "$(webm_io_available)" = "yes" ]; then |
| 264 local readonly output="${VPX_TEST_OUTPUT_DIR}/vp9.webm" | 325 local readonly output="${VPX_TEST_OUTPUT_DIR}/vp9.webm" |
| 265 vpxenc $(yuv_input_hantro_collage) \ | 326 vpxenc $(yuv_input_hantro_collage) \ |
| 266 --codec=vp9 \ | 327 --codec=vp9 \ |
| 267 --limit="${TEST_FRAMES}" \ | 328 --limit="${TEST_FRAMES}" \ |
| 268 --output="${output}" \ | 329 --output="${output}" \ |
| 269 --passes=2 | 330 --passes=2 |
| 270 | 331 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 | 411 |
| 351 vpxenc_tests="vpxenc_vp8_ivf | 412 vpxenc_tests="vpxenc_vp8_ivf |
| 352 vpxenc_vp8_webm | 413 vpxenc_vp8_webm |
| 353 vpxenc_vp8_webm_rt | 414 vpxenc_vp8_webm_rt |
| 354 vpxenc_vp8_webm_2pass | 415 vpxenc_vp8_webm_2pass |
| 355 vpxenc_vp8_webm_lag10_frames20 | 416 vpxenc_vp8_webm_lag10_frames20 |
| 356 vpxenc_vp8_ivf_piped_input | 417 vpxenc_vp8_ivf_piped_input |
| 357 vpxenc_vp9_ivf | 418 vpxenc_vp9_ivf |
| 358 vpxenc_vp9_webm | 419 vpxenc_vp9_webm |
| 359 vpxenc_vp9_webm_rt | 420 vpxenc_vp9_webm_rt |
| 421 vpxenc_vp9_webm_rt_multithread_tiled |
| 422 vpxenc_vp9_webm_rt_multithread_tiled_frameparallel |
| 360 vpxenc_vp9_webm_2pass | 423 vpxenc_vp9_webm_2pass |
| 361 vpxenc_vp9_ivf_lossless | 424 vpxenc_vp9_ivf_lossless |
| 362 vpxenc_vp9_ivf_minq0_maxq0 | 425 vpxenc_vp9_ivf_minq0_maxq0 |
| 363 vpxenc_vp9_webm_lag10_frames20 | 426 vpxenc_vp9_webm_lag10_frames20 |
| 364 vpxenc_vp9_webm_non_square_par" | 427 vpxenc_vp9_webm_non_square_par" |
| 365 | 428 |
| 366 run_tests vpxenc_verify_environment "${vpxenc_tests}" | 429 run_tests vpxenc_verify_environment "${vpxenc_tests}" |
| OLD | NEW |