Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: source/libvpx/test/resize_util.sh

Issue 390713002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: libvpx: Pull from upstream Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/test/register_state_check.h ('k') | source/libvpx/test/sad_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 20 matching lines...) Expand all
31 local frames_to_resize="10" 31 local frames_to_resize="10"
32 local target_dimensions="$1" 32 local target_dimensions="$1"
33 33
34 # resize_util is available only when CONFIG_SHARED is disabled. 34 # resize_util is available only when CONFIG_SHARED is disabled.
35 if [ -z "$(vpx_config_option_enabled CONFIG_SHARED)" ]; then 35 if [ -z "$(vpx_config_option_enabled CONFIG_SHARED)" ]; then
36 if [ ! -x "${resizer}" ]; then 36 if [ ! -x "${resizer}" ]; then
37 elog "${resizer} does not exist or is not executable." 37 elog "${resizer} does not exist or is not executable."
38 return 1 38 return 1
39 fi 39 fi
40 40
41 eval "${resizer}" "${YUV_RAW_INPUT}" \ 41 eval "${VPX_TEST_PREFIX}" "${resizer}" "${YUV_RAW_INPUT}" \
42 "${YUV_RAW_INPUT_WIDTH}x${YUV_RAW_INPUT_HEIGHT}" \ 42 "${YUV_RAW_INPUT_WIDTH}x${YUV_RAW_INPUT_HEIGHT}" \
43 "${target_dimensions}" "${output_file}" ${frames_to_resize} \ 43 "${target_dimensions}" "${output_file}" ${frames_to_resize} \
44 ${devnull} 44 ${devnull}
45 45
46 [ -e "${output_file}" ] || return 1 46 [ -e "${output_file}" ] || return 1
47 fi 47 fi
48 } 48 }
49 49
50 # Halves each dimension of $YUV_RAW_INPUT using resize_util(). 50 # Halves each dimension of $YUV_RAW_INPUT using resize_util().
51 resize_down() { 51 resize_down() {
52 local target_width=$((${YUV_RAW_INPUT_WIDTH} / 2)) 52 local target_width=$((${YUV_RAW_INPUT_WIDTH} / 2))
53 local target_height=$((${YUV_RAW_INPUT_HEIGHT} / 2)) 53 local target_height=$((${YUV_RAW_INPUT_HEIGHT} / 2))
54 54
55 resize_util "${target_width}x${target_height}" 55 resize_util "${target_width}x${target_height}"
56 } 56 }
57 57
58 # Doubles each dimension of $YUV_RAW_INPUT using resize_util(). 58 # Doubles each dimension of $YUV_RAW_INPUT using resize_util().
59 resize_up() { 59 resize_up() {
60 local target_width=$((${YUV_RAW_INPUT_WIDTH} * 2)) 60 local target_width=$((${YUV_RAW_INPUT_WIDTH} * 2))
61 local target_height=$((${YUV_RAW_INPUT_HEIGHT} * 2)) 61 local target_height=$((${YUV_RAW_INPUT_HEIGHT} * 2))
62 62
63 resize_util "${target_width}x${target_height}" 63 resize_util "${target_width}x${target_height}"
64 } 64 }
65 65
66 resize_util_tests="resize_down 66 resize_util_tests="resize_down
67 resize_up" 67 resize_up"
68 68
69 run_tests resize_util_verify_environment "${resize_util_tests}" 69 run_tests resize_util_verify_environment "${resize_util_tests}"
OLDNEW
« no previous file with comments | « source/libvpx/test/register_state_check.h ('k') | source/libvpx/test/sad_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698