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

Side by Side Diff: libvpx.gyp

Issue 11555023: libvpx: Add VP9 decoder. (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 8 years 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 | « generate_gypi.sh ('k') | libvpx_srcs_arm.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 { 4 {
5 'variables': { 5 'variables': {
6 'use_system_libvpx%': 0, 6 'use_system_libvpx%': 0,
7 }, 7 },
8 'conditions': [ 8 'conditions': [
9 ['use_system_libvpx==0', { 9 ['use_system_libvpx==0', {
10 'variables': { 10 'variables': {
(...skipping 25 matching lines...) Expand all
36 # See http://crbug.com/140121 36 # See http://crbug.com/140121
37 'win_third_party_warn_as_error': 'false', 37 'win_third_party_warn_as_error': 'false',
38 }, 38 },
39 39
40 'conditions': [ 40 'conditions': [
41 # TODO(jimbankoski): Hack to ensure we pass -msse2 for files containing 41 # TODO(jimbankoski): Hack to ensure we pass -msse2 for files containing
42 # SSE intrinsics. See http://crbug/162675 42 # SSE intrinsics. See http://crbug/162675
43 ['target_arch=="ia32" or target_arch=="x64"', { 43 ['target_arch=="ia32" or target_arch=="x64"', {
44 'targets' : [ 44 'targets' : [
45 { 45 {
46 'target_name': 'libvpx_sse2', 46 'target_name': 'libvpx_intrinsics',
47 'type': 'static_library', 47 'type': 'static_library',
48 'include_dirs': [ 48 'include_dirs': [
49 'source/config/<(OS_CATEGORY)/<(target_arch)', 49 'source/config/<(OS_CATEGORY)/<(target_arch)',
50 'source/libvpx', 50 'source/libvpx',
51 'source/libvpx/vp8/common', 51 'source/libvpx/vp8/common',
52 'source/libvpx/vp8/decoder', 52 'source/libvpx/vp8/decoder',
53 'source/libvpx/vp8/encoder', 53 'source/libvpx/vp8/encoder',
54 ], 54 ],
55 'sources': [ 55 'sources': [
56 'source/libvpx/vp8/encoder/x86/denoising_sse2.c', 56 'source/libvpx/vp8/encoder/x86/denoising_sse2.c',
57 'source/libvpx/vp9/common/x86/vp9_filter_sse2.c',
58 'source/libvpx/vp9/common/x86/vp9_loopfilter_x86.c',
59 'source/libvpx/vp9/common/x86/vp9_sadmxn_x86.c',
60 'source/libvpx/vp9/common/x86/vp9_filter_sse4.c',
57 ], 61 ],
58 'conditions': [ 62 'conditions': [
59 ['os_posix==1 and OS!="mac"', { 63 ['os_posix==1 and OS!="mac"', {
60 'cflags': [ '-msse2', ], 64 'cflags': [ '-msse2', '-msse4', ],
61 }], 65 }],
62 ['OS=="mac"', { 66 ['OS=="mac"', {
63 'xcode_settings': { 67 'xcode_settings': {
64 'OTHER_CFLAGS': [ '-msse2', ], 68 'OTHER_CFLAGS': [ '-msse2', '-msse4', ],
65 }, 69 },
66 }], 70 }],
67 ], 71 ],
68 }, 72 },
69 ], 73 ],
70 }], 74 }],
71 [ 'target_arch != "arm" and target_arch != "mipsel"', { 75 [ 'target_arch != "arm" and target_arch != "mipsel"', {
72 'targets': [ 76 'targets': [
73 { 77 {
74 # This libvpx target contains both encoder and decoder. 78 # This libvpx target contains both encoder and decoder.
75 # Encoder is configured to be realtime only. 79 # Encoder is configured to be realtime only.
76 'target_name': 'libvpx', 80 'target_name': 'libvpx',
77 'type': 'static_library', 81 'type': 'static_library',
78 'variables': { 82 'variables': {
79 'yasm_output_path': '<(SHARED_INTERMEDIATE_DIR)/third_party/libv px', 83 'yasm_output_path': '<(SHARED_INTERMEDIATE_DIR)/third_party/libv px',
80 'OS_CATEGORY%': '<(OS_CATEGORY)', 84 'OS_CATEGORY%': '<(OS_CATEGORY)',
81 'yasm_flags': [ 85 'yasm_flags': [
82 '-D', 'CHROMIUM', 86 '-D', 'CHROMIUM',
83 '-I', 'source/config/<(OS_CATEGORY)/<(target_arch)', 87 '-I', 'source/config/<(OS_CATEGORY)/<(target_arch)',
84 '-I', 'source/config', 88 '-I', 'source/config',
85 '-I', 'source/libvpx', 89 '-I', 'source/libvpx',
86 '-I', '<(shared_generated_dir)', # Generated assembly offsets 90 '-I', '<(shared_generated_dir)', # Generated assembly offsets
87 ], 91 ],
88 }, 92 },
89 'dependencies': [ 93 'dependencies': [
90 'gen_asm_offsets', 94 'gen_asm_offsets_vp8',
95 'gen_asm_offsets_vp9',
91 ], 96 ],
92 'includes': [ 97 'includes': [
93 '../yasm/yasm_compile.gypi' 98 '../yasm/yasm_compile.gypi'
94 ], 99 ],
95 'include_dirs': [ 100 'include_dirs': [
96 'source/config/<(OS_CATEGORY)/<(target_arch)', 101 'source/config/<(OS_CATEGORY)/<(target_arch)',
97 'source/config', 102 'source/config',
98 'source/libvpx', 103 'source/libvpx',
99 'source/libvpx/vp8/common', 104 'source/libvpx/vp8/common',
100 'source/libvpx/vp8/decoder', 105 'source/libvpx/vp8/decoder',
101 'source/libvpx/vp8/encoder', 106 'source/libvpx/vp8/encoder',
102 '<(shared_generated_dir)', # Provides vpx_rtcd.h. 107 '<(shared_generated_dir)', # Provides vpx_rtcd.h.
103 ], 108 ],
104 'direct_dependent_settings': { 109 'direct_dependent_settings': {
105 'include_dirs': [ 110 'include_dirs': [
106 'source/libvpx', 111 'source/libvpx',
107 ], 112 ],
108 }, 113 },
109 # VS2010 does not correctly incrementally link obj files generated 114 # VS2010 does not correctly incrementally link obj files generated
110 # from asm files. This flag disables UseLibraryDependencyInputs to 115 # from asm files. This flag disables UseLibraryDependencyInputs to
111 # avoid this problem. 116 # avoid this problem.
112 'msvs_2010_disable_uldi_when_referenced': 1, 117 'msvs_2010_disable_uldi_when_referenced': 1,
113 'conditions': [ 118 'conditions': [
114 [ 'target_arch=="ia32"', { 119 [ 'target_arch=="ia32"', {
115 'includes': [ 120 'includes': [
116 'libvpx_srcs_x86.gypi', 121 'libvpx_srcs_x86.gypi',
117 ], 122 ],
118 'dependencies': [ 'libvpx_sse2', ], 123 'dependencies': [ 'libvpx_intrinsics', ],
119 }], 124 }],
120 [ 'target_arch=="x64"', { 125 [ 'target_arch=="x64"', {
121 'includes': [ 126 'includes': [
122 'libvpx_srcs_x86_64.gypi', 127 'libvpx_srcs_x86_64.gypi',
123 ], 128 ],
124 'dependencies': [ 'libvpx_sse2', ], 129 'dependencies': [ 'libvpx_intrinsics', ],
125 }], 130 }],
126 ['clang == 1', { 131 ['clang == 1', {
127 'xcode_settings': { 132 'xcode_settings': {
128 'WARNING_CFLAGS': [ 133 'WARNING_CFLAGS': [
129 # libvpx heavily relies on implicit enum casting. 134 # libvpx heavily relies on implicit enum casting.
130 '-Wno-conversion', 135 '-Wno-conversion',
131 # libvpx does `if ((a == b))` in some places. 136 # libvpx does `if ((a == b))` in some places.
132 '-Wno-parentheses-equality', 137 '-Wno-parentheses-equality',
133 ], 138 ],
134 }, 139 },
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 ], 195 ],
191 # 'libvpx' target for ARM builds. 196 # 'libvpx' target for ARM builds.
192 [ 'target_arch=="arm" ', { 197 [ 'target_arch=="arm" ', {
193 'targets': [ 198 'targets': [
194 { 199 {
195 # This libvpx target contains both encoder and decoder. 200 # This libvpx target contains both encoder and decoder.
196 # Encoder is configured to be realtime only. 201 # Encoder is configured to be realtime only.
197 'target_name': 'libvpx', 202 'target_name': 'libvpx',
198 'type': 'static_library', 203 'type': 'static_library',
199 'dependencies': [ 204 'dependencies': [
200 'gen_asm_offsets', 205 'gen_asm_offsets_vp8',
206 'gen_asm_offsets_vp9',
201 ], 207 ],
202 208
203 # Copy the script to the output folder so that we can use it with 209 # Copy the script to the output folder so that we can use it with
204 # absolute path. 210 # absolute path.
205 'copies': [{ 211 'copies': [{
206 'destination': '<(shared_generated_dir)', 212 'destination': '<(shared_generated_dir)',
207 'files': [ 213 'files': [
208 '<(ads2gas_script_path)', 214 '<(ads2gas_script_path)',
209 ], 215 ],
210 }], 216 }],
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 'source/libvpx', 315 'source/libvpx',
310 ], 316 ],
311 'conditions': [ 317 'conditions': [
312 ['asan==1', { 318 ['asan==1', {
313 'cflags!': [ '-fsanitize=address' ], 319 'cflags!': [ '-fsanitize=address' ],
314 'xcode_settings': { 'OTHER_CFLAGS!': [ '-fsanitize=address' ] }, 320 'xcode_settings': { 'OTHER_CFLAGS!': [ '-fsanitize=address' ] },
315 'ldflags!': [ '-fsanitize=address' ], 321 'ldflags!': [ '-fsanitize=address' ],
316 }], 322 }],
317 ], 323 ],
318 'sources': [ 324 'sources': [
319 '<(shared_generated_dir)/vpx_rtcd.h',
320 'source/libvpx/vp8/common/asm_com_offsets.c',
321 'source/libvpx/vp8/decoder/asm_dec_offsets.c',
322 'source/libvpx/vp8/encoder/asm_enc_offsets.c', 325 'source/libvpx/vp8/encoder/asm_enc_offsets.c',
323 ], 326 ],
324 }, 327 },
325 { 328 {
329 # A library that contains assembly offsets needed.
330 # TODO(fgalligan): Merge libvpx_asm_offsets_vp9 into
331 # libvpx_asm_offsets.
332 'target_name': 'libvpx_asm_offsets_vp9',
333 'type': 'static_library',
334 'hard_dependency': 1,
335 'include_dirs': [
336 'source/config/<(OS_CATEGORY)/<(target_arch_full)',
337 'source/config',
338 'source/libvpx',
339 ],
340 'conditions': [
341 ['asan==1', {
342 'cflags!': [ '-faddress-sanitizer', '-fsanitize=address', ],
343 'xcode_settings': {
344 'OTHER_CFLAGS!': [ '-faddress-sanitizer','-fsanitize=address' ],
345 },
346 'ldflags!': [ '-faddress-sanitizer', '-fsanitize=address', ],
347 }],
348 ],
349 'sources': [
350 'source/libvpx/vp9/encoder/vp9_asm_enc_offsets.c',
351 ],
352 },
353 {
326 # A target that takes assembly offsets library and generate the 354 # A target that takes assembly offsets library and generate the
327 # corresponding assembly files. 355 # corresponding assembly files.
328 # This target is a hard dependency because the generated .asm files 356 # This target is a hard dependency because the generated .asm files
329 # are needed all assembly optimized files in libvpx. 357 # are needed all assembly optimized files in libvpx.
330 'target_name': 'gen_asm_offsets', 358 'target_name': 'gen_asm_offsets_vp8',
331 'type': 'none', 359 'type': 'none',
332 'hard_dependency': 1, 360 'hard_dependency': 1,
333 'dependencies': [ 361 'dependencies': [
334 'libvpx_asm_offsets', 362 'libvpx_asm_offsets',
335 'libvpx_obj_int_extract#host', 363 'libvpx_obj_int_extract#host',
336 ], 364 ],
337 'conditions': [ 365 'conditions': [
338 ['OS=="win"', { 366 ['OS=="win"', {
339 'variables': { 367 'variables': {
340 'ninja_obj_dir': '<(PRODUCT_DIR)/obj/third_party/libvpx/source/l ibvpx/vp8', 368 'ninja_obj_dir': '<(PRODUCT_DIR)/obj/third_party/libvpx/source/l ibvpx/vp8',
341 }, 369 },
342 'actions': [ 370 'actions': [
343 { 371 {
344 'action_name': 'copy_enc_offsets_obj', 372 'action_name': 'copy_enc_offsets_obj',
345 'inputs': [ 'copy_obj.sh' ], 373 'inputs': [ 'copy_obj.sh' ],
346 'outputs': [ '<(INTERMEDIATE_DIR)/asm_enc_offsets.obj' ], 374 'outputs': [ '<(INTERMEDIATE_DIR)/asm_enc_offsets.obj' ],
347 'action': [ 375 'action': [
348 '<(DEPTH)/third_party/libvpx/copy_obj.sh', 376 '<(DEPTH)/third_party/libvpx/copy_obj.sh',
349 '-d', '<@(_outputs)', 377 '-d', '<@(_outputs)',
350 '-s', '<(PRODUCT_DIR)/obj/libvpx_asm_offsets/asm_enc_offsets .obj', 378 '-s', '<(PRODUCT_DIR)/obj/libvpx_asm_offsets/asm_enc_offsets .obj',
351 '-s', '<(ninja_obj_dir)/encoder/libvpx_asm_offsets.asm_enc_o ffsets.obj', 379 '-s', '<(ninja_obj_dir)/encoder/libvpx_asm_offsets.asm_enc_o ffsets.obj',
352 ], 380 ],
353 'process_output_as_sources': 1, 381 'process_output_as_sources': 1,
354 }, 382 },
355 {
356 'action_name': 'copy_dec_offsets_obj',
357 'inputs': [ 'copy_obj.sh' ],
358 'outputs': [ '<(INTERMEDIATE_DIR)/asm_dec_offsets.obj' ],
359 'action': [
360 '<(DEPTH)/third_party/libvpx/copy_obj.sh',
361 '-d', '<@(_outputs)',
362 '-s', '<(PRODUCT_DIR)/obj/libvpx_asm_offsets/asm_dec_offsets .obj',
363 '-s', '<(ninja_obj_dir)/decoder/libvpx_asm_offsets.asm_dec_o ffsets.obj',
364 ],
365 'process_output_as_sources': 1,
366 },
367 {
368 'action_name': 'copy_com_offsets_obj',
369 'inputs': [ 'copy_obj.sh' ],
370 'outputs': [ '<(INTERMEDIATE_DIR)/asm_com_offsets.obj' ],
371 'action': [
372 '<(DEPTH)/third_party/libvpx/copy_obj.sh',
373 '-d', '<@(_outputs)',
374 '-s', '<(PRODUCT_DIR)/obj/libvpx_asm_offsets/asm_com_offsets .obj',
375 '-s', '<(ninja_obj_dir)/common/libvpx_asm_offsets.asm_com_of fsets.obj',
376 ],
377 'process_output_as_sources': 1,
378 },
379 ], 383 ],
380 'sources': [ 384 'sources': [
381 '<(INTERMEDIATE_DIR)/asm_com_offsets.obj',
382 '<(INTERMEDIATE_DIR)/asm_dec_offsets.obj',
383 '<(INTERMEDIATE_DIR)/asm_enc_offsets.obj', 385 '<(INTERMEDIATE_DIR)/asm_enc_offsets.obj',
384 ], 386 ],
385 }, { 387 }, {
386 'actions': [ 388 'actions': [
389 {
390 # Take archived .a file and unpack it unto .o files.
391 'action_name': 'unpack_lib_posix',
392 'inputs': [
393 'unpack_lib_posix.sh',
394 ],
395 'outputs': [
396 '<(INTERMEDIATE_DIR)/asm_enc_offsets.o',
397 ],
398 'action': [
399 '<(DEPTH)/third_party/libvpx/unpack_lib_posix.sh',
400 '-d', '<(INTERMEDIATE_DIR)',
401 '-a', '<(LIB_DIR)/libvpx_asm_offsets.a',
402 '-a', '<(LIB_DIR)/third_party/libvpx/libvpx_asm_offsets.a',
403 '-f', 'asm_enc_offsets.o',
404 ],
405 'process_output_as_sources': 1,
406 },
407 ],
408 # Need this otherwise gyp won't run the rule on them.
409 'sources': [
410 '<(INTERMEDIATE_DIR)/asm_enc_offsets.o',
411 ],
412 }],
413 ],
414 'rules': [
415 {
holmer 2012/12/13 08:08:08 It's not clear to me what is different with this a
fgalligan1 2012/12/13 17:09:23 There is no difference. Actually the side by side
holmer 2012/12/14 08:51:23 Weird. It does look okay in the unified diff. On
416 # Rule to extract integer values for each symbol from an object fi le.
417 'rule_name': 'obj_int_extract',
418 'extension': '<(asm_obj_extension)',
419 'inputs': [
420 '<(PRODUCT_DIR)/libvpx_obj_int_extract',
421 'obj_int_extract.sh',
422 ],
423 'outputs': [
424 '<(shared_generated_dir)/<(RULE_INPUT_ROOT).asm',
425 ],
426 'variables': {
427 'conditions': [
428 ['target_arch=="arm"', {
429 'asm_format': 'gas',
430 }, {
431 'asm_format': 'rvds',
432 }],
433 ],
434 },
435 'action': [
436 '<(DEPTH)/third_party/libvpx/obj_int_extract.sh',
437 '-e', '<(PRODUCT_DIR)/libvpx_obj_int_extract',
438 '-f', '<(asm_format)',
439 '-b', '<(RULE_INPUT_PATH)',
440 '-o', '<(shared_generated_dir)/vp8_<(RULE_INPUT_ROOT).asm',
441 ],
442 'message': 'Generate assembly offsets <(RULE_INPUT_PATH).',
443 },
444 ],
445 },
446 {
447 # A target that takes assembly offsets library and generate the
448 # corresponding assembly files.
449 # This target is a hard dependency because the generated .asm files
450 # are needed all assembly optimized files in libvpx.
451 'target_name': 'gen_asm_offsets_vp9',
452 'type': 'none',
453 'hard_dependency': 1,
454 'dependencies': [
455 'libvpx_asm_offsets_vp9',
456 'libvpx_obj_int_extract#host',
457 ],
458 'conditions': [
459 ['OS=="win"', {
460 'variables': {
461 'ninja_obj_dir': '<(PRODUCT_DIR)/obj/third_party/libvpx/source/l ibvpx/vp9',
462 },
463 'actions': [
464 {
465 'action_name': 'copy_enc_offsets_obj',
466 'inputs': [ 'copy_obj.sh' ],
467 'outputs': [ '<(INTERMEDIATE_DIR)/vp9_asm_enc_offsets.obj' ],
468 'action': [
469 '<(DEPTH)/third_party/libvpx/copy_obj.sh',
470 '-d', '<@(_outputs)',
471 '-s', '<(PRODUCT_DIR)/obj/libvpx_asm_offsets_vp9/vp9_asm_enc _offsets.obj',
472 '-s', '<(ninja_obj_dir)/encoder/libvpx_asm_offsets_vp9.vp9_a sm_enc_offsets.obj',
473 ],
474 'process_output_as_sources': 1,
475 },
476 ],
477 'sources': [
478 '<(INTERMEDIATE_DIR)/vp9_asm_enc_offsets.obj',
479 ],
480 }, {
481 'actions': [
387 { 482 {
388 # Take archived .a file and unpack it unto .o files. 483 # Take archived .a file and unpack it unto .o files.
389 'action_name': 'unpack_lib_posix', 484 'action_name': 'unpack_lib_posix',
390 'inputs': [ 485 'inputs': [
391 'unpack_lib_posix.sh', 486 'unpack_lib_posix.sh',
392 ], 487 ],
393 'outputs': [ 488 'outputs': [
394 '<(INTERMEDIATE_DIR)/asm_com_offsets.o', 489 '<(INTERMEDIATE_DIR)/vp9_asm_enc_offsets.o',
395 '<(INTERMEDIATE_DIR)/asm_dec_offsets.o',
396 '<(INTERMEDIATE_DIR)/asm_enc_offsets.o',
397 ], 490 ],
398 'action': [ 491 'action': [
399 '<(DEPTH)/third_party/libvpx/unpack_lib_posix.sh', 492 '<(DEPTH)/third_party/libvpx/unpack_lib_posix.sh',
400 '-d', '<(INTERMEDIATE_DIR)', 493 '-d', '<(INTERMEDIATE_DIR)',
401 '-a', '<(LIB_DIR)/libvpx_asm_offsets.a', 494 '-a', '<(LIB_DIR)/libvpx_asm_offsets_vp9.a',
402 '-a', '<(LIB_DIR)/third_party/libvpx/libvpx_asm_offsets.a', 495 '-a', '<(LIB_DIR)/third_party/libvpx/libvpx_asm_offsets_vp9. a',
403 '-f', 'asm_com_offsets.o', 496 '-f', 'vp9_asm_enc_offsets.o',
404 '-f', 'asm_dec_offsets.o',
405 '-f', 'asm_enc_offsets.o',
406 ], 497 ],
407 'process_output_as_sources': 1, 498 'process_output_as_sources': 1,
408 }, 499 },
409 ], 500 ],
410 # Need this otherwise gyp won't run the rule on them. 501 # Need this otherwise gyp won't run the rule on them.
411 'sources': [ 502 'sources': [
412 '<(INTERMEDIATE_DIR)/asm_com_offsets.o', 503 '<(INTERMEDIATE_DIR)/vp9_asm_enc_offsets.o',
413 '<(INTERMEDIATE_DIR)/asm_dec_offsets.o',
414 '<(INTERMEDIATE_DIR)/asm_enc_offsets.o',
415 ], 504 ],
416 }], 505 }],
417 ], 506 ],
418 'rules': [ 507 'rules': [
419 { 508 {
420 # Rule to extract integer values for each symbol from an object fi le. 509 # Rule to extract integer values for each symbol from an object fi le.
421 'rule_name': 'obj_int_extract', 510 'rule_name': 'obj_int_extract',
422 'extension': '<(asm_obj_extension)', 511 'extension': '<(asm_obj_extension)',
423 'inputs': [ 512 'inputs': [
424 '<(PRODUCT_DIR)/libvpx_obj_int_extract', 513 '<(PRODUCT_DIR)/libvpx_obj_int_extract',
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 ], 638 ],
550 }], 639 }],
551 ], 640 ],
552 } 641 }
553 642
554 # Local Variables: 643 # Local Variables:
555 # tab-width:2 644 # tab-width:2
556 # indent-tabs-mode:nil 645 # indent-tabs-mode:nil
557 # End: 646 # End:
558 # vim: set expandtab tabstop=2 shiftwidth=2: 647 # vim: set expandtab tabstop=2 shiftwidth=2:
OLDNEW
« no previous file with comments | « generate_gypi.sh ('k') | libvpx_srcs_arm.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698