Ignore:
Timestamp:
Jul 14, 2014 2:37:06 AM (10 years ago)
Author:
riza
Message:

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

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

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/aconfigure

    r4846 r4875  
    619619openssl_h_present 
    620620ac_no_ssl 
     621ac_libyuv_ldflags 
     622ac_libyuv_cflags 
    621623ac_openh264_ldflags 
    622624ac_openh264_cflags 
     
    775777with_openh264 
    776778enable_openh264 
     779with_libyuv 
     780enable_libyuv 
    777781enable_ipp 
    778782with_ipp 
     
    14411445  --disable-v4l2          Disable Video4Linux2 (default: not disabled) 
    14421446  --disable-openh264      Disable OpenH264 (default: not disabled) 
     1447  --disable-libyuv        Exclude libyuv in the build 
    14431448  --enable-ipp            Enable Intel IPP support. Specify the Intel IPP 
    14441449                          package and samples location using IPPROOT and 
     
    14801485  --with-ffmpeg=DIR       Specify alternate FFMPEG prefix 
    14811486  --with-openh264=DIR     Specify alternate OpenH264 prefix 
     1487  --with-libyuv=DIR       Specify alternate libyuv prefix 
    14821488  --with-ipp=DIR          Specify the Intel IPP location 
    14831489  --with-ipp-samples=DIR  Specify the Intel IPP samples location 
     
    71437149 
    71447150 
     7151# Check whether --with-libyuv was given. 
     7152if test "${with_libyuv+set}" = set; then : 
     7153  withval=$with_libyuv; 
     7154else 
     7155  with_libyuv=no 
     7156 
     7157fi 
     7158 
     7159 
     7160if test "x$ac_cross_compile" != "x" -a "x$with_libyuv" = "xno"; then 
     7161    enable_libyuv=no 
     7162fi 
     7163 
     7164 
     7165 
     7166# Check whether --enable-libyuv was given. 
     7167if test "${enable_libyuv+set}" = set; then : 
     7168  enableval=$enable_libyuv; if test "$enable_libyuv" = "no"; then 
     7169                { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if libyuv is disabled...yes" >&5 
     7170$as_echo "Checking if libyuv is disabled...yes" >&6; } 
     7171               fi 
     7172else 
     7173 
     7174                  if test "x$with_libyuv" != "xno" -a "x$with_libyuv" != "x"; then 
     7175                        LIBYUV_PREFIX=$with_libyuv 
     7176                        LIBYUV_CFLAGS="-I$LIBYUV_PREFIX/include" 
     7177 
     7178                        case $target in 
     7179                            arm-apple-darwin*) 
     7180                                LIBYUV_LDFLAGS="-L$LIBYUV_PREFIX/out_ios/Release-iphoneos" 
     7181                                case $ARCH in 
     7182                                    *armv7*) 
     7183                                    LIBYUV_LIBS="-lyuv_neon" 
     7184                                    ;; 
     7185                                *) 
     7186                                    ;; 
     7187                                esac 
     7188                                ;; 
     7189                            *mingw* | *cygw* | *win32* | *w32* | *darwin* | *linux* | *android*) 
     7190                                LIBYUV_LDFLAGS="-L$LIBYUV_PREFIX/out/Release" 
     7191                                ;; 
     7192                            *) 
     7193                                LIBYUV_CFLAGS="" 
     7194                                LIBYUV_LDFLAGS="" 
     7195                                ;; 
     7196                        esac 
     7197 
     7198                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using libyuv prefix... $with_libyuv" >&5 
     7199$as_echo "Using libyuv prefix... $with_libyuv" >&6; } 
     7200                  else 
     7201                        LIBYUV_CFLAGS="" 
     7202                        LIBYUV_LDFLAGS="" 
     7203                  fi 
     7204 
     7205                  LIBYUV_LIBS="$LIBYUV_LIBS -lyuv" 
     7206 
     7207                  SAVED_LIBS="$LIBS" 
     7208                  SAVED_LDFLAGS="$LDFLAGS" 
     7209                  SAVED_CFLAGS="$CFLAGS" 
     7210 
     7211                  LIBS="$LIBYUV_LIBS $LIBS" 
     7212                  LDFLAGS="$LIBYUV_LDFLAGS $LDFLAGS" 
     7213                  CFLAGS="$LIBYUV_CFLAGS $CFLAGS" 
     7214 
     7215                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for I420Scale in -lyuv" >&5 
     7216$as_echo_n "checking for I420Scale in -lyuv... " >&6; } 
     7217if ${ac_cv_lib_yuv_I420Scale+:} false; then : 
     7218  $as_echo_n "(cached) " >&6 
     7219else 
     7220  ac_check_lib_save_LIBS=$LIBS 
     7221LIBS="-lyuv 
     7222                                $LIBS" 
     7223cat confdefs.h - <<_ACEOF >conftest.$ac_ext 
     7224/* end confdefs.h.  */ 
     7225 
     7226/* Override any GCC internal prototype to avoid an error. 
     7227   Use char because int might match the return type of a GCC 
     7228   builtin and then its argument prototype would still apply.  */ 
     7229#ifdef __cplusplus 
     7230extern "C" 
     7231#endif 
     7232char I420Scale (); 
     7233int 
     7234main () 
     7235{ 
     7236return I420Scale (); 
     7237  ; 
     7238  return 0; 
     7239} 
     7240_ACEOF 
     7241if ac_fn_c_try_link "$LINENO"; then : 
     7242  ac_cv_lib_yuv_I420Scale=yes 
     7243else 
     7244  ac_cv_lib_yuv_I420Scale=no 
     7245fi 
     7246rm -f core conftest.err conftest.$ac_objext \ 
     7247    conftest$ac_exeext conftest.$ac_ext 
     7248LIBS=$ac_check_lib_save_LIBS 
     7249fi 
     7250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_yuv_I420Scale" >&5 
     7251$as_echo "$ac_cv_lib_yuv_I420Scale" >&6; } 
     7252if test "x$ac_cv_lib_yuv_I420Scale" = xyes; then : 
     7253   ac_libyuv_cflags="-DPJMEDIA_HAS_LIBYUV=1 $LIBYUV_CFLAGS" 
     7254                                 ac_libyuv_ldflags="$LIBYUV_LDFLAGS $LIBYUV_LIBS" 
     7255 
     7256else 
     7257   LIBS="$SAVED_LIBS" 
     7258                                 LDFLAGS="$SAVED_LDFLAGS" 
     7259                                 CFLAGS="$SAVED_CFLAGS" 
     7260 
     7261fi 
     7262 
     7263 
     7264fi 
     7265 
     7266 
    71457267 
    71467268# Check whether --enable-ipp was given. 
Note: See TracChangeset for help on using the changeset viewer.