Ticket #1937 (closed enhancement: fixed)
Add libyuv to third party component
|Reported by:||riza||Owned by:||bennylp|
|Backport to 1.x milestone:||Backported:||no|
Description (last modified by nanang) (diff)
We recommend libyuv which provides video scaling and conversion method. However, currently we only support libyuv as a stand alone project, with these drawbacks:
- Following the recommended steps to build the library, it is required to also download chromium project which is large in size (approximately 10GB).
- Changes on the libyuv project might break the existing build configuration.
This ticket will add libyuv to the third party folder, use a specific version and include only the necessary source.
Below is the steps to build and use libyuv:
For GNU targets
- By default, libyuv will always be built automatically. This automatic build can be disabled via configure script param --disable-libyuv or --disable-video.
- if you want to use external libyuv, specify --with-external-libyuv and set header/library search paths via CFLAGS and LDFLAGS environment variables.
Additional step for iOS targets
- Add third-party/lib/libyuv-[TARGET].a to application project in XCode.
- GCC 4.2 to 4.7 have a known issue using vectors with const, sample build error message:
../../yuv/source/row_common.cc: In function 'void libyuv::YuvPixel(uint8, uint8, uint8, uint8*, uint8*, uint8*, const libyuv::YuvConstants*)': ../../yuv/source/row_common.cc:1256: error: invalid types 'const signed char __vector__[int]' for array subscript ../../yuv/source/row_common.cc:1257: error: invalid types 'const signed char __vector__[int]' for array subscriptSolution: use GCC 4.8 or newer, or if you don't need video feature, just disable libyuv (i.e: using configure script param --disable-libyuv or --disable-video).
For Visual Studio
- libyuv will always be built automatically.
- To enable libyuv, add this to your config_site.h:
#define PJMEDIA_HAS_LIBYUV 1