Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#1937 closed enhancement (fixed)

Add libyuv to third party component

Reported by: riza Owned by: bennylp
Priority: normal Milestone: release-2.5.5
Component: third-party Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported: no

Description (last modified by nanang)

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

  1. By default, libyuv will always be built automatically. This automatic build can be disabled via configure script param --disable-libyuv or --disable-video.
  2. 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

  1. Add third-party/lib/libyuv-[TARGET].a to application project in XCode.

Known issues

  1. 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 subscript
    
    Solution: 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

  1. libyuv will always be built automatically.
  2. To enable libyuv, add this to your config_site.h:
    #define PJMEDIA_HAS_LIBYUV		1
    

Change History (12)

comment:1 Changed 8 years ago by riza

In 5354:

Re #1937: Add libyuv to Visual Studio 2005 and 2015 solution.

comment:2 Changed 8 years ago by riza

In 5358:

Re #1937: Change project and folder name for consistency with existing third party library.

comment:3 Changed 8 years ago by riza

In 5360:

Re #1937: Change the include header format, so that user can specify external library.

comment:4 Changed 8 years ago by nanang

In 5361:

Re #1937: Added libyuv build configs for GNU build systems.

comment:5 Changed 8 years ago by nanang

In 5362:

Re #1937: Fixed compile warnings because of duplicate lines in libyuv's Makefile.

comment:6 Changed 8 years ago by nanang

  • Resolution set to fixed
  • Status changed from new to closed

comment:7 Changed 8 years ago by nanang

  • Description modified (diff)

comment:8 Changed 8 years ago by nanang

In 5364:

Re #1937: Keep libyuv enabled in configure script even when ffmpeg swscale is detected because video orientation feature requires libyuv. However, put ffmpeg swscale priority higher than libyuv in video converter.

comment:9 Changed 8 years ago by nanang

  • Description modified (diff)

comment:10 Changed 8 years ago by nanang

  • Description modified (diff)

comment:11 Changed 8 years ago by nanang

  • Description modified (diff)

comment:12 Changed 8 years ago by ming

In 5378:

Re #1937: Do not build libyuv in shared mode if video is disabled.

Thanks to Ross Beer for the report.

Note: See TracTickets for help on using tickets.