diff options
Diffstat (limited to 'chromium/third_party/libyuv/libyuv.gyp')
-rw-r--r-- | chromium/third_party/libyuv/libyuv.gyp | 133 |
1 files changed, 72 insertions, 61 deletions
diff --git a/chromium/third_party/libyuv/libyuv.gyp b/chromium/third_party/libyuv/libyuv.gyp index 4130bd0d3f0..d067a05dd33 100644 --- a/chromium/third_party/libyuv/libyuv.gyp +++ b/chromium/third_party/libyuv/libyuv.gyp @@ -7,9 +7,57 @@ # be found in the AUTHORS file in the root of the source tree. { + 'includes': [ + 'libyuv.gypi', + ], 'variables': { - 'use_system_libjpeg%': 0, + 'use_system_libjpeg%': 0, + 'build_neon': 0, + 'conditions': [ + [ '(target_arch == "armv7" or target_arch == "armv7s" or (target_arch == "arm" and arm_version >= 7)) and target_subarch != 64 and (arm_neon == 1 or arm_neon_optional == 1)', { + 'build_neon': 1, + }], + ], }, + 'conditions': [ + [ 'build_neon != 0', { + 'targets': [ + # The NEON-specific components. + { + 'target_name': 'libyuv_neon', + 'type': 'static_library', + 'standalone_static_library': 1, + # TODO(noahric): This should remove whatever mfpu is set, not + # just vfpv3-d16. + 'cflags!': [ + '-mfpu=vfp', + '-mfpu=vfpv3', + '-mfpu=vfpv3-d16', + ], + 'cflags': [ + '-mfpu=neon', + ], + 'include_dirs': [ + 'include', + '.', + ], + 'direct_dependent_settings': { + 'include_dirs': [ + 'include', + '.', + ], + }, + 'sources': [ + # sources. + 'source/compare_neon.cc', + 'source/rotate_neon.cc', + 'source/row_neon.cc', + 'source/scale_neon.cc', + ], + }, + ], + }], + ], 'targets': [ { 'target_name': 'libyuv', @@ -18,25 +66,44 @@ # Allows libyuv.a redistributable library without external dependencies. 'standalone_static_library': 1, 'conditions': [ + [ 'OS == "ios" and target_subarch == 64', { + 'defines': [ + 'LIBYUV_DISABLE_NEON' + ], + }], # TODO(fbarchard): Use gyp define to enable jpeg. [ 'OS != "ios"', { 'defines': [ 'HAVE_JPEG' ], 'conditions': [ - [ 'use_system_libjpeg==0', { + # Caveat system jpeg support may not support motion jpeg + [ 'use_system_libjpeg == 1', { 'dependencies': [ - '<(DEPTH)/third_party/libjpeg_turbo/libjpeg.gyp:libjpeg', + '<(DEPTH)/third_party/libjpeg/libjpeg.gyp:libjpeg', ], }, { + 'dependencies': [ + '<(DEPTH)/third_party/libjpeg_turbo/libjpeg.gyp:libjpeg', + ], + }], + [ 'use_system_libjpeg == 1', { 'link_settings': { 'libraries': [ '-ljpeg', ], - }, + } }], ], }], + [ 'build_neon != 0', { + 'dependencies': [ + 'libyuv_neon', + ], + 'defines': [ + 'LIBYUV_NEON', + ] + }], ], 'defines': [ # Enable the following 3 macros to turn off assembly for specified CPU. @@ -57,63 +124,7 @@ ], }, 'sources': [ - # includes. - 'include/libyuv.h', - 'include/libyuv/basic_types.h', - 'include/libyuv/compare.h', - 'include/libyuv/convert.h', - 'include/libyuv/convert_argb.h', - 'include/libyuv/convert_from.h', - 'include/libyuv/convert_from_argb.h', - 'include/libyuv/cpu_id.h', - 'include/libyuv/format_conversion.h', - 'include/libyuv/mjpeg_decoder.h', - 'include/libyuv/planar_functions.h', - 'include/libyuv/rotate.h', - 'include/libyuv/rotate_argb.h', - 'include/libyuv/row.h', - 'include/libyuv/scale.h', - 'include/libyuv/scale_argb.h', - 'include/libyuv/scale_row.h', - 'include/libyuv/version.h', - 'include/libyuv/video_common.h', - - # sources. - 'source/compare.cc', - 'source/compare_common.cc', - 'source/compare_neon.cc', - 'source/compare_posix.cc', - 'source/compare_win.cc', - 'source/convert.cc', - 'source/convert_argb.cc', - 'source/convert_from.cc', - 'source/convert_from_argb.cc', - 'source/convert_jpeg.cc', - 'source/convert_to_argb.cc', - 'source/convert_to_i420.cc', - 'source/cpu_id.cc', - 'source/format_conversion.cc', - 'source/mjpeg_decoder.cc', - 'source/mjpeg_validate.cc', - 'source/planar_functions.cc', - 'source/rotate.cc', - 'source/rotate_argb.cc', - 'source/rotate_mips.cc', - 'source/rotate_neon.cc', - 'source/row_any.cc', - 'source/row_common.cc', - 'source/row_mips.cc', - 'source/row_neon.cc', - 'source/row_posix.cc', - 'source/row_win.cc', - 'source/scale.cc', - 'source/scale_argb.cc', - 'source/scale_common.cc', - 'source/scale_mips.cc', - 'source/scale_neon.cc', - 'source/scale_posix.cc', - 'source/scale_win.cc', - 'source/video_common.cc', + '<@(libyuv_sources)', ], }, ], # targets. |