Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#1776 closed enhancement (fixed)

Support for Libyuv

Reported by: riza Owned by: nanang
Priority: normal Milestone: release-2.3
Component: pjmedia Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported: no

Description (last modified by nanang)

Support for libyuv library which provides YUV scaling and conversion functionality (https://chromium.googlesource.com/libyuv/libyuv/).

Requirement

  • Libyuv library. For building the library, we recommend using the steps described here, except for Android target as explained below.

This implementation will provide video scaling and conversion functionality.

Below are the steps to use the codec:

For GNU targets

  1. Build Libyuv library. Make sure to execute the Release build step (ninja -j7 -C out/Release). The library will be built on ([libyuv_dir]/out/Release).
  2. Run PJSIP's configure and specify the Libyuv folder using --with-libyuv option. E.g:
    ./configure --with-libyuv=/home/user/src/libyuv
    

For iOS targets

  1. Build Libyuv library. Make sure to execute the Release build step (ninja -j7 -C out_ios/Release-iphoneos libyuv_unittest). The library will be built on ([libyuv_dir]/out_ios/Release-iphoneos).
  2. Run PJSIP's configure-iphone and specify the Libyuv folder using --with-libyuv option. E.g:
    ./configure-iphone --with-libyuv=/home/user/src/libyuv
    
  3. Add libyuv.a to application project in XCode. For armv7 architecture, also add libyuv_neon.a to the application project.

Notes for iOS targets:

  • To build for armv7s, just follow the instructions for arm64, which will build libyuv for three architectures: armv7, armv7s, and arm64. armv7s it is still not supported because of the limitation from chromium build tools (documented in libyuv's issue here).

For Android targets

  1. Get libyuv from here (tried to build using the official source, but failed).
  2. From the libyuv-android directory, run ndk-build. The library will be built on ([libyuv_dir]/libs/armeabi).
  3. Create dir out/Release under [libyuv_dir]/jni and copy the libyuv.so there. E.g:
    cd [libyuv_dir]
    mkdir -p jni/out/Release
    cp libs/armeabi/libyuv.so jni/out/Release
    
  4. Run PJSIP's configure and specify the Libyuv folder using --with-libyuv option. E.g:
    ./configure --with-libyuv=[libyuv_dir]/jni
    

For Visual Studio

  1. Build the Libyuv library.
  2. Add Libyuv include and library location paths to Visual Studio search path settings.
  3. Add this to your config_site.h:
    #define PJMEDIA_HAS_LIBYUV		1
    

Change History (9)

comment:1 Changed 10 years ago by riza

In 4875:

Re #1776: Initial implementation of Libyuv wrapper. Supports:

  • library detection via autoconf
  • scaling and conversion function (from/to I420 or BGRA)

comment:2 Changed 10 years ago by riza

  • Description modified (diff)

comment:3 Changed 10 years ago by riza

  • Description modified (diff)

comment:4 Changed 10 years ago by riza

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

comment:5 Changed 10 years ago by bennylp

  • Description modified (diff)

comment:6 Changed 10 years ago by nanang

  • Description modified (diff)

comment:7 Changed 9 years ago by ming

  • Description modified (diff)

comment:8 Changed 9 years ago by ming

  • Description modified (diff)

comment:9 Changed 8 years ago by nanang

  • Description modified (diff)
Note: See TracTickets for help on using tickets.