diff --git a/README.chromium b/README.chromium index 38eb69959..e58eb6fec 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 1037 +Version: 1038 License: BSD License File: LICENSE diff --git a/include/libyuv/version.h b/include/libyuv/version.h index ca1e7c8fb..1ab8c5c84 100644 --- a/include/libyuv/version.h +++ b/include/libyuv/version.h @@ -11,6 +11,6 @@ #ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT #define INCLUDE_LIBYUV_VERSION_H_ -#define LIBYUV_VERSION 1037 +#define LIBYUV_VERSION 1038 #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT diff --git a/libyuv.gyp b/libyuv.gyp index cc4b0f88f..246d662e1 100644 --- a/libyuv.gyp +++ b/libyuv.gyp @@ -12,6 +12,7 @@ ], 'variables': { 'use_system_libjpeg%': 0, + 'libyuv_disable_jpeg%': 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)', { @@ -71,8 +72,7 @@ 'LIBYUV_DISABLE_NEON' ], }], - # TODO(fbarchard): Use gyp define to enable jpeg. - [ 'OS != "ios"', { + [ 'OS != "ios" and libyuv_disable_jpeg != 1', { 'defines': [ 'HAVE_JPEG' ], diff --git a/libyuv_test.gyp b/libyuv_test.gyp index ab04cde43..140ba6c90 100644 --- a/libyuv_test.gyp +++ b/libyuv_test.gyp @@ -7,6 +7,9 @@ # be found in the AUTHORS file in the root of the source tree. { + 'variables': { + 'libyuv_disable_jpeg%': 0, + }, 'targets': [ { 'target_name': 'libyuv_unittest', @@ -62,7 +65,7 @@ 'DEBUG_INFORMATION_FORMAT' : 'dwarf-with-dsym', }, }], - [ 'OS != "ios"', { + [ 'OS != "ios" and libyuv_disable_jpeg != 1', { 'defines': [ 'HAVE_JPEG', ], @@ -116,22 +119,24 @@ 'util/psnr.cc', 'util/ssim.cc', ], + 'dependencies': [ + 'libyuv.gyp:libyuv', + ], 'conditions': [ [ 'OS == "ios" and target_subarch == 64', { 'defines': [ 'LIBYUV_DISABLE_NEON' ], }], - [ 'OS != "ios"', { + + [ 'OS != "ios" and libyuv_disable_jpeg != 1', { 'defines': [ 'HAVE_JPEG', ], }], ], # conditions - 'dependencies': [ - 'libyuv.gyp:libyuv', - ], }, + { 'target_name': 'cpuid', 'type': 'executable', diff --git a/unit_test/convert_test.cc b/unit_test/convert_test.cc index d70a479d8..99480742b 100644 --- a/unit_test/convert_test.cc +++ b/unit_test/convert_test.cc @@ -1253,4 +1253,12 @@ TEST_F(libyuvTest, CropNV12) { free_aligned_buffer_64(src_y); } +TEST_F(libyuvTest, HaveJPEG) { +#ifdef HAVE_JPEG + printf("JPEG enabled\n."); +#else + printf("JPEG disabled\n."); +#endif +} + } // namespace libyuv