diff options
-rwxr-xr-x | test/decode_to_md5.sh | 3 | ||||
-rwxr-xr-x | test/decode_with_drops.sh | 3 | ||||
-rwxr-xr-x | test/postproc.sh | 3 | ||||
-rwxr-xr-x | test/resize_util.sh | 2 | ||||
-rwxr-xr-x | test/simple_decoder.sh | 3 | ||||
-rwxr-xr-x | test/simple_encoder.sh | 2 | ||||
-rwxr-xr-x | test/tools_common.sh | 30 | ||||
-rwxr-xr-x | test/twopass_encoder.sh | 2 | ||||
-rwxr-xr-x | test/vp8cx_set_ref.sh | 6 | ||||
-rwxr-xr-x | test/vp9_spatial_svc_encoder.sh | 7 | ||||
-rwxr-xr-x | test/vpx_temporal_svc_encoder.sh | 8 | ||||
-rw-r--r-- | vp9/encoder/vp9_pickmode.c | 14 |
12 files changed, 47 insertions, 36 deletions
diff --git a/test/decode_to_md5.sh b/test/decode_to_md5.sh index 28e29c683..6cb7d0e6e 100755 --- a/test/decode_to_md5.sh +++ b/test/decode_to_md5.sh @@ -39,7 +39,8 @@ decode_to_md5() { return 1 fi - eval "${decoder}" "${input_file}" "${output_file}" ${devnull} + eval "${VPX_TEST_PREFIX}" "${decoder}" "${input_file}" "${output_file}" \ + ${devnull} [ -e "${output_file}" ] || return 1 diff --git a/test/decode_with_drops.sh b/test/decode_with_drops.sh index 12e17de38..9b2edb642 100755 --- a/test/decode_with_drops.sh +++ b/test/decode_with_drops.sh @@ -39,7 +39,8 @@ decode_with_drops() { return 1 fi - eval "${decoder}" "${input_file}" "${output_file}" "${drop_mode}" ${devnull} + eval "${VPX_TEST_PREFIX}" "${decoder}" "${input_file}" "${output_file}" \ + "${drop_mode}" ${devnull} [ -e "${output_file}" ] || return 1 } diff --git a/test/postproc.sh b/test/postproc.sh index c9c4e5813..939a3e762 100755 --- a/test/postproc.sh +++ b/test/postproc.sh @@ -37,7 +37,8 @@ postproc() { return 1 fi - eval "${decoder}" "${input_file}" "${output_file}" ${devnull} + eval "${VPX_TEST_PREFIX}" "${decoder}" "${input_file}" "${output_file}" \ + ${devnull} [ -e "${output_file}" ] || return 1 } diff --git a/test/resize_util.sh b/test/resize_util.sh index ab3dfd151..5e472716d 100755 --- a/test/resize_util.sh +++ b/test/resize_util.sh @@ -38,7 +38,7 @@ resize_util() { return 1 fi - eval "${resizer}" "${YUV_RAW_INPUT}" \ + eval "${VPX_TEST_PREFIX}" "${resizer}" "${YUV_RAW_INPUT}" \ "${YUV_RAW_INPUT_WIDTH}x${YUV_RAW_INPUT_HEIGHT}" \ "${target_dimensions}" "${output_file}" ${frames_to_resize} \ ${devnull} diff --git a/test/simple_decoder.sh b/test/simple_decoder.sh index 0be48e6b7..7eeaf71b1 100755 --- a/test/simple_decoder.sh +++ b/test/simple_decoder.sh @@ -37,7 +37,8 @@ simple_decoder() { return 1 fi - eval "${decoder}" "${input_file}" "${output_file}" ${devnull} + eval "${VPX_TEST_PREFIX}" "${decoder}" "${input_file}" "${output_file}" \ + ${devnull} [ -e "${output_file}" ] || return 1 } diff --git a/test/simple_encoder.sh b/test/simple_encoder.sh index a0b0e132e..c4a628030 100755 --- a/test/simple_encoder.sh +++ b/test/simple_encoder.sh @@ -34,7 +34,7 @@ simple_encoder() { return 1 fi - eval "${encoder}" "${codec}" "${YUV_RAW_INPUT_WIDTH}" \ + eval "${VPX_TEST_PREFIX}" "${encoder}" "${codec}" "${YUV_RAW_INPUT_WIDTH}" \ "${YUV_RAW_INPUT_HEIGHT}" "${YUV_RAW_INPUT}" "${output_file}" 9999 \ ${devnull} diff --git a/test/tools_common.sh b/test/tools_common.sh index 7f32905f2..3e69c3687 100755 --- a/test/tools_common.sh +++ b/test/tools_common.sh @@ -16,6 +16,7 @@ VPX_TEST_TOOLS_COMMON_SH=included set -e devnull='> /dev/null 2>&1' +VPX_TEST_PREFIX="" elog() { echo "$@" 1>&2 @@ -204,9 +205,12 @@ vpxdec() { local decoder="${LIBVPX_BIN_PATH}/vpxdec${VPX_TEST_EXE_SUFFIX}" if [ -z "${pipe_input}" ]; then - eval "${decoder}" "$input" --summary --noblit "$@" ${devnull} + eval "${VPX_TEST_PREFIX}" "${decoder}" "$input" --summary --noblit "$@" \ + ${devnull} else - cat "${input}" | eval "${decoder}" - --summary --noblit "$@" ${devnull} + cat "${input}" \ + | eval "${VPX_TEST_PREFIX}" "${decoder}" - --summary --noblit "$@" \ + ${devnull} fi } @@ -252,16 +256,14 @@ vpxenc() { fi if [ -z "${pipe_input}" ]; then - eval "${encoder}" --codec=${codec} --width=${width} --height=${height} \ - --limit=${frames} ${use_ivf} ${extra_flags} --output="${output}" \ - "${input}" \ - ${devnull} + eval "${VPX_TEST_PREFIX}" "${encoder}" --codec=${codec} --width=${width} \ + --height=${height} --limit=${frames} ${use_ivf} ${extra_flags} \ + --output="${output}" "${input}" ${devnull} else cat "${input}" \ - | eval "${encoder}" --codec=${codec} --width=${width} \ - --height=${height} --limit=${frames} ${use_ivf} ${extra_flags} \ - --output="${output}" - \ - ${devnull} + | eval "${VPX_TEST_PREFIX}" "${encoder}" --codec=${codec} \ + --width=${width} --height=${height} --limit=${frames} ${use_ivf} \ + ${extra_flags} --output="${output}" - ${devnull} fi if [ ! -e "${output}" ]; then @@ -351,6 +353,9 @@ cat << EOF --help: Display this message and exit. --test-data-path <path to libvpx test data directory> --show-program-output: Shows output from all programs being tested. + --prefix: Allows for a user specified prefix to be inserted before all test + programs. Grants the ability, for example, to run test programs + within valgrind. --verbose: Verbose output. When the --bin-path option is not specified the script attempts to use @@ -400,6 +405,10 @@ while [ -n "$1" ]; do LIBVPX_TEST_DATA_PATH="$2" shift ;; + --prefix) + VPX_TEST_PREFIX="$2" + shift + ;; --verbose) VPX_TEST_VERBOSE_OUTPUT=yes ;; @@ -466,6 +475,7 @@ vlog "$(basename "${0%.*}") test configuration: VPX_TEST_EXE_SUFFIX=${VPX_TEST_EXE_SUFFIX} VPX_TEST_FILTER=${VPX_TEST_FILTER} VPX_TEST_OUTPUT_DIR=${VPX_TEST_OUTPUT_DIR} + VPX_TEST_PREFIX=${VPX_TEST_PREFIX} VPX_TEST_RAND=${VPX_TEST_RAND} VPX_TEST_RUN_DISABLED_TESTS=${VPX_TEST_RUN_DISABLED_TESTS} VPX_TEST_SHOW_PROGRAM_OUTPUT=${VPX_TEST_SHOW_PROGRAM_OUTPUT} diff --git a/test/twopass_encoder.sh b/test/twopass_encoder.sh index 95d49d6e8..1189e5131 100755 --- a/test/twopass_encoder.sh +++ b/test/twopass_encoder.sh @@ -34,7 +34,7 @@ twopass_encoder() { return 1 fi - eval "${encoder}" "${codec}" "${YUV_RAW_INPUT_WIDTH}" \ + eval "${VPX_TEST_PREFIX}" "${encoder}" "${codec}" "${YUV_RAW_INPUT_WIDTH}" \ "${YUV_RAW_INPUT_HEIGHT}" "${YUV_RAW_INPUT}" "${output_file}" \ ${devnull} diff --git a/test/vp8cx_set_ref.sh b/test/vp8cx_set_ref.sh index ee1005678..5d760bcde 100755 --- a/test/vp8cx_set_ref.sh +++ b/test/vp8cx_set_ref.sh @@ -39,9 +39,9 @@ vpx_set_ref() { return 1 fi - eval "${encoder}" "${YUV_RAW_INPUT_WIDTH}" "${YUV_RAW_INPUT_HEIGHT}" \ - "${YUV_RAW_INPUT}" "${output_file}" "${ref_frame_num}" \ - ${devnull} + eval "${VPX_TEST_PREFIX}" "${encoder}" "${YUV_RAW_INPUT_WIDTH}" \ + "${YUV_RAW_INPUT_HEIGHT}" "${YUV_RAW_INPUT}" "${output_file}" \ + "${ref_frame_num}" ${devnull} [ -e "${output_file}" ] || return 1 } diff --git a/test/vp9_spatial_svc_encoder.sh b/test/vp9_spatial_svc_encoder.sh index 8c9d13072..a5728f677 100755 --- a/test/vp9_spatial_svc_encoder.sh +++ b/test/vp9_spatial_svc_encoder.sh @@ -39,10 +39,9 @@ vp9_spatial_svc_encoder() { return 1 fi - eval "${encoder}" -w "${YUV_RAW_INPUT_WIDTH}" -h "${YUV_RAW_INPUT_HEIGHT}" \ - -k "${max_kf}" -f "${frames_to_encode}" "$@" "${YUV_RAW_INPUT}" \ - "${output_file}" \ - ${devnull} + eval "${VPX_TEST_PREFIX}" "${encoder}" -w "${YUV_RAW_INPUT_WIDTH}" \ + -h "${YUV_RAW_INPUT_HEIGHT}" -k "${max_kf}" -f "${frames_to_encode}" \ + "$@" "${YUV_RAW_INPUT}" "${output_file}" ${devnull} [ -e "${output_file}" ] || return 1 } diff --git a/test/vpx_temporal_svc_encoder.sh b/test/vpx_temporal_svc_encoder.sh index b2e968fa8..fcc8cb4ff 100755 --- a/test/vpx_temporal_svc_encoder.sh +++ b/test/vpx_temporal_svc_encoder.sh @@ -21,6 +21,10 @@ vpx_tsvc_encoder_verify_environment() { echo "Libvpx test data must exist in LIBVPX_TEST_DATA_PATH." return 1 fi + if [ "$(vpx_config_option_enabled CONFIG_TEMPORAL_DENOISING)" != "yes" ]; then + elog "Warning: Temporal denoising is disabled! Spatial denoising will be " \ + "used instead, which is probably not what you want for this test." + fi } # Runs vpx_temporal_svc_encoder using the codec specified by $1 and output file @@ -44,8 +48,8 @@ vpx_tsvc_encoder() { return 1 fi - eval "${encoder}" "${YUV_RAW_INPUT}" "${output_file}" "${codec}" \ - "${YUV_RAW_INPUT_WIDTH}" "${YUV_RAW_INPUT_HEIGHT}" \ + eval "${VPX_TEST_PREFIX}" "${encoder}" "${YUV_RAW_INPUT}" "${output_file}" \ + "${codec}" "${YUV_RAW_INPUT_WIDTH}" "${YUV_RAW_INPUT_HEIGHT}" \ "${timebase_num}" "${timebase_den}" "${speed}" "${frame_drop_thresh}" \ "$@" \ ${devnull} diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c index c915e5c07..b2ab714e3 100644 --- a/vp9/encoder/vp9_pickmode.c +++ b/vp9/encoder/vp9_pickmode.c @@ -127,6 +127,10 @@ static int combined_motion_search(VP9_COMP *cpi, MACROBLOCK *x, int rv = 0; const YV12_BUFFER_CONFIG *scaled_ref_frame = vp9_get_scaled_ref_frame(cpi, ref); + if (cpi->common.show_frame && + (x->pred_mv_sad[ref] >> 3) > x->pred_mv_sad[LAST_FRAME]) + return rv; + if (scaled_ref_frame) { int i; // Swap out the reference frame for a version that's been scaled to @@ -138,16 +142,6 @@ static int combined_motion_search(VP9_COMP *cpi, MACROBLOCK *x, } vp9_set_mv_search_range(x, &ref_mv); - if (cpi->common.show_frame && - (x->pred_mv_sad[ref] >> 3) > x->pred_mv_sad[LAST_FRAME]) { - tmp_mv->as_int = INVALID_MV; - if (scaled_ref_frame) { - int i; - for (i = 0; i < MAX_MB_PLANE; i++) - xd->plane[i].pre[0] = backup_yv12[i]; - } - return rv; - } assert(x->mv_best_ref_index[ref] <= 2); if (x->mv_best_ref_index[ref] < 2) mvp_full = mbmi->ref_mvs[ref][x->mv_best_ref_index[ref]].as_mv; |