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

Side by Side Diff: generate_gypi.sh

Issue 236183003: Enable AVX2 optimizations for libvpx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 8 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 | « no previous file | libvpx.gyp » ('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/bash -e 1 #!/bin/bash -e
2 # 2 #
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # This script is used to generate .gypi files and files in the config/platform 7 # This script is used to generate .gypi files and files in the config/platform
8 # directories needed to build libvpx. 8 # directories needed to build libvpx.
9 # Every time libvpx source code is updated just run this script. 9 # Every time libvpx source code is updated just run this script.
10 # 10 #
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 #write_target_definition sse4_1_sources[@] $2 libvpx_intrinsics_sse4_1 sse4. 1 137 #write_target_definition sse4_1_sources[@] $2 libvpx_intrinsics_sse4_1 sse4. 1
138 echo "ERROR: Uncomment sse4_1 sections in libvpx.gyp" 138 echo "ERROR: Uncomment sse4_1 sections in libvpx.gyp"
139 exit 1 139 exit 1
140 fi 140 fi
141 if [ 0 -ne ${#avx_sources} ]; then 141 if [ 0 -ne ${#avx_sources} ]; then
142 #write_target_definition avx_sources[@] $2 libvpx_intrinsics_avx avx 142 #write_target_definition avx_sources[@] $2 libvpx_intrinsics_avx avx
143 echo "ERROR: Uncomment avx sections in libvpx.gyp" 143 echo "ERROR: Uncomment avx sections in libvpx.gyp"
144 exit 1 144 exit 1
145 fi 145 fi
146 if [ 0 -ne ${#avx2_sources} ]; then 146 if [ 0 -ne ${#avx2_sources} ]; then
147 #write_target_definition avx2_sources[@] $2 libvpx_intrinsics_avx2 avx2 147 write_target_definition avx2_sources[@] $2 libvpx_intrinsics_avx2 avx2
148 echo "ERROR: Uncomment avx2 sections in libvpx.gyp"
149 exit 1
150 fi 148 fi
151 149
152 # arm neon 150 # arm neon
153 if [ 0 -ne ${#neon_sources} ]; then 151 if [ 0 -ne ${#neon_sources} ]; then
154 write_target_definition neon_sources[@] $2 libvpx_intrinsics_neon fpu=neon 152 write_target_definition neon_sources[@] $2 libvpx_intrinsics_neon fpu=neon
155 fi 153 fi
156 154
157 echo " ]," >> $2 155 echo " ]," >> $2
158 156
159 write_gypi_footer $2 157 write_gypi_footer $2
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 $BASE_DIR/lint_config.sh -p \ 257 $BASE_DIR/lint_config.sh -p \
260 -h $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.h \ 258 -h $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.h \
261 -a $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.asm \ 259 -a $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_config.asm \
262 -o $BASE_DIR/$TEMP_DIR/libvpx.config 260 -o $BASE_DIR/$TEMP_DIR/libvpx.config
263 fi 261 fi
264 262
265 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \ 263 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \
266 --arch=$2 \ 264 --arch=$2 \
267 --sym=vp8_rtcd \ 265 --sym=vp8_rtcd \
268 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \ 266 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \
269 --disable-avx2 \
270 $BASE_DIR/$LIBVPX_SRC_DIR/vp8/common/rtcd_defs.pl \ 267 $BASE_DIR/$LIBVPX_SRC_DIR/vp8/common/rtcd_defs.pl \
271 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vp8_rtcd.h 268 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vp8_rtcd.h
272 269
273 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \ 270 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \
274 --arch=$2 \ 271 --arch=$2 \
275 --sym=vp9_rtcd \ 272 --sym=vp9_rtcd \
276 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \ 273 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \
277 --disable-avx2 \
278 $BASE_DIR/$LIBVPX_SRC_DIR/vp9/common/vp9_rtcd_defs.pl \ 274 $BASE_DIR/$LIBVPX_SRC_DIR/vp9/common/vp9_rtcd_defs.pl \
279 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vp9_rtcd.h 275 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vp9_rtcd.h
280 276
281 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \ 277 $BASE_DIR/$LIBVPX_SRC_DIR/build/make/rtcd.pl \
282 --arch=$2 \ 278 --arch=$2 \
283 --sym=vpx_scale_rtcd \ 279 --sym=vpx_scale_rtcd \
284 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \ 280 --config=$BASE_DIR/$TEMP_DIR/libvpx.config \
285 --disable-avx2 \
286 $BASE_DIR/$LIBVPX_SRC_DIR/vpx_scale/vpx_scale_rtcd.pl \ 281 $BASE_DIR/$LIBVPX_SRC_DIR/vpx_scale/vpx_scale_rtcd.pl \
287 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_scale_rtcd.h 282 > $BASE_DIR/$LIBVPX_CONFIG_DIR/$1/vpx_scale_rtcd.h
288 283
289 rm -rf $BASE_DIR/$TEMP_DIR/libvpx.config 284 rm -rf $BASE_DIR/$TEMP_DIR/libvpx.config
290 } 285 }
291 286
292 # Generate Config files. "--enable-external-build" must be set to skip 287 # Generate Config files. "--enable-external-build" must be set to skip
293 # detection of capabilities on specific targets. 288 # detection of capabilities on specific targets.
294 # $1 - Header file directory. 289 # $1 - Header file directory.
295 # $2 - Config command line. 290 # $2 - Config command line.
(...skipping 14 matching lines...) Expand all
310 rm -rf vpx_config.* 305 rm -rf vpx_config.*
311 } 306 }
312 307
313 echo "Create temporary directory." 308 echo "Create temporary directory."
314 TEMP_DIR="$LIBVPX_SRC_DIR.temp" 309 TEMP_DIR="$LIBVPX_SRC_DIR.temp"
315 rm -rf $TEMP_DIR 310 rm -rf $TEMP_DIR
316 cp -R $LIBVPX_SRC_DIR $TEMP_DIR 311 cp -R $LIBVPX_SRC_DIR $TEMP_DIR
317 cd $TEMP_DIR 312 cd $TEMP_DIR
318 313
319 echo "Generate Config Files" 314 echo "Generate Config Files"
320 all_platforms="--enable-external-build --enable-postproc --disable-install-srcs --enable-multi-res-encoding --enable-temporal-denoising --disable-unit-tests --d isable-install-docs --disable-examples --disable-avx2" 315 all_platforms="--enable-external-build --enable-postproc --disable-install-srcs --enable-multi-res-encoding --enable-temporal-denoising --disable-unit-tests --d isable-install-docs --disable-examples"
321 gen_config_files linux/ia32 "--target=x86-linux-gcc --disable-ccache --enable-pi c --enable-realtime-only ${all_platforms}" 316 gen_config_files linux/ia32 "--target=x86-linux-gcc --disable-ccache --enable-pi c --enable-realtime-only ${all_platforms}"
322 gen_config_files linux/x64 "--target=x86_64-linux-gcc --disable-ccache --enable- pic --enable-realtime-only ${all_platforms}" 317 gen_config_files linux/x64 "--target=x86_64-linux-gcc --disable-ccache --enable- pic --enable-realtime-only ${all_platforms}"
323 gen_config_files linux/arm "--target=armv6-linux-gcc --enable-pic --enable-realt ime-only --disable-install-bins --disable-install-libs ${all_platforms}" 318 gen_config_files linux/arm "--target=armv6-linux-gcc --enable-pic --enable-realt ime-only --disable-install-bins --disable-install-libs ${all_platforms}"
324 gen_config_files linux/arm-neon "--target=armv7-linux-gcc --enable-pic --enable- realtime-only ${all_platforms}" 319 gen_config_files linux/arm-neon "--target=armv7-linux-gcc --enable-pic --enable- realtime-only ${all_platforms}"
325 gen_config_files linux/arm-neon-cpu-detect "--target=armv7-linux-gcc --enable-pi c --enable-realtime-only --enable-runtime-cpu-detect ${all_platforms}" 320 gen_config_files linux/arm-neon-cpu-detect "--target=armv7-linux-gcc --enable-pi c --enable-realtime-only --enable-runtime-cpu-detect ${all_platforms}"
326 gen_config_files linux/mipsel "--target=mips32-linux-gcc --disable-fast-unaligne d ${all_platforms}" 321 gen_config_files linux/mipsel "--target=mips32-linux-gcc --disable-fast-unaligne d ${all_platforms}"
327 gen_config_files linux/generic "--target=generic-gnu --enable-pic --enable-realt ime-only ${all_platforms}" 322 gen_config_files linux/generic "--target=generic-gnu --enable-pic --enable-realt ime-only ${all_platforms}"
328 gen_config_files win/ia32 "--target=x86-win32-vs7 --enable-realtime-only ${all_p latforms}" 323 gen_config_files win/ia32 "--target=x86-win32-vs7 --enable-realtime-only ${all_p latforms}"
329 gen_config_files win/x64 "--target=x86_64-win64-vs9 --enable-realtime-only ${all _platforms}" 324 gen_config_files win/x64 "--target=x86_64-win64-vs9 --enable-realtime-only ${all _platforms}"
330 gen_config_files mac/ia32 "--target=x86-darwin9-gcc --enable-pic --enable-realti me-only ${all_platforms}" 325 gen_config_files mac/ia32 "--target=x86-darwin9-gcc --enable-pic --enable-realti me-only ${all_platforms}"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 make_clean 416 make_clean
422 make libvpx_srcs.txt target=libs $config > /dev/null 417 make libvpx_srcs.txt target=libs $config > /dev/null
423 convert_srcs_to_gypi libvpx_srcs.txt libvpx_srcs_generic 418 convert_srcs_to_gypi libvpx_srcs.txt libvpx_srcs_generic
424 419
425 echo "Remove temporary directory." 420 echo "Remove temporary directory."
426 cd $BASE_DIR 421 cd $BASE_DIR
427 rm -rf $TEMP_DIR 422 rm -rf $TEMP_DIR
428 423
429 # TODO(fgalligan): Is "--disable-fast-unaligned" needed on mipsel? 424 # TODO(fgalligan): Is "--disable-fast-unaligned" needed on mipsel?
430 # TODO(fgalligan): Can we turn on "--enable-realtime-only" for mipsel? 425 # TODO(fgalligan): Can we turn on "--enable-realtime-only" for mipsel?
OLDNEW
« no previous file with comments | « no previous file | libvpx.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698