From: Good Guy <good1.2guy@gmail.com>
Date: Fri, 4 Nov 2022 21:34:41 +0000 (-0600)
Subject: Credit Andrey for script and Andrew for configure mods
X-Git-Tag: 2022-11~8
X-Git-Url: https://git.cinelerra-gg.org/git/?a=commitdiff_plain;h=929899524176aab570798f0708bad7f29a13ee5c;p=goodguy%2Fcinelerra.git

Credit Andrey for script and Andrew for configure mods
---

diff --git a/cinelerra-5.1/configure.ac b/cinelerra-5.1/configure.ac
index 79533426..1329c96c 100644
--- a/cinelerra-5.1/configure.ac
+++ b/cinelerra-5.1/configure.ac
@@ -599,7 +599,7 @@ if test "x$HAVE_$1" != "xno"; then
 fi
 ])
 
-IMMATH_HEADERS=$(pkg-config --cflags Imath)
+IMMATH_HEADERS=$(pkg-config --cflags Imath 2>/dev/null)
 
 CHECK_LIB([X11], [X11], [XOpenDisplay])
 CHECK_HEADERS([X11], [X11 headers], [X11/X.h X11/Xlib.h X11/Xutil.h X11/cursorfont.h])
@@ -821,16 +821,16 @@ CHECK_WANT([LV2], [auto], [use lv2], [
  CHECK_LIB([sord], [sord-0], [sord_world_new])
  CHECK_LIB([serd], [serd-0], [serd_reader_new])
  CHECK_LIB([sratom], [sratom-0], [sratom_new])
- CFLAGS="-I/usr/include/lilv-0 -I/usr/local/include/lilv-0 `pkg-config --cflags lilv-0`"
+ CFLAGS="-I/usr/include/lilv-0 -I/usr/local/include/lilv-0 `pkg-config --cflags lilv-0 2>/dev/null`"
  CHECK_HEADERS([lilv], [lilv headers], [lilv/lilv.h])
- CFLAGS="-I/usr/include/serd-0 -I/usr/local/include/serd-0 `pkg-config --cflags serd-0`"
+ CFLAGS="-I/usr/include/serd-0 -I/usr/local/include/serd-0 `pkg-config --cflags serd-0 2>/dev/null`"
  CHECK_HEADERS([serd], [serd headers], [serd/serd.h])
- CFLAGS="-I/usr/include/sord-0 -I/usr/local/include/sord-0 `pkg-config --cflags sord-0`"
+ CFLAGS="-I/usr/include/sord-0 -I/usr/local/include/sord-0 `pkg-config --cflags sord-0 2>/dev/null`"
  CHECK_HEADERS([sord], [sord headers], [sord/sord.h])
- CFLAGS="-I/usr/include/sratom-0 -I/usr/local/include/sratom-0 `pkg-config --cflags sratom-0`"
+ CFLAGS="-I/usr/include/sratom-0 -I/usr/local/include/sratom-0 `pkg-config --cflags sratom-0 2>/dev/null`"
  CHECK_HEADERS([sratom], [sratom headers], [sratom/sratom.h])
  CHECK_LIB([suil], [suil-0], [suil_instance_new])
- CFLAGS="-I/usr/include/suil-0 -I/usr/local/include/suil-0 `pkg-config --cflags  suil-0`"
+ CFLAGS="-I/usr/include/suil-0 -I/usr/local/include/suil-0 `pkg-config --cflags  suil-0 2>/dev/null`"
  CHECK_HEADERS([suil], [suil headers], [suil/suil.h])
  CFG_CFLAGS+=" $(pkg-config --cflags lilv-0) $(pkg-config --cflags suil-0)"
  LIBS="$saved_LIBS"
@@ -1082,6 +1082,7 @@ done
 # build extras
 if test "x$WANT_CLANG" = "xyes" ; then
   FFMPEG_EXTRA_CFG+=' --cc=clang --cxx=clang++'
+  CFG_CFLAGS+=" -Wno-unknown-warning-option"
 fi
 if test "x$HAVE_tiff" = "xyes"; then
   if test "x$HAVE_jbig" = "xyes"; then
diff --git a/cinelerra-5.1/doc/vaapi_proxy.sh b/cinelerra-5.1/doc/vaapi_proxy.sh
new file mode 100755
index 00000000..6109f8a3
--- /dev/null
+++ b/cinelerra-5.1/doc/vaapi_proxy.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+filename="$1"
+fileout="${filename%.*}"
+proxy="6"
+# Hardware encode AMD
+ffmpeg -threads 2 -hwaccel vaapi  -vaapi_device /dev/dri/renderD128 \
+ -i  "$1" -c:v h264_vaapi -vf "format=nv12,hwupload,scale_vaapi=iw/'$proxy':ih/'$proxy'" \
+ -vcodec h264_vaapi  -preset fast -c:a copy \
+ -bf 0 -profile:v 66 "$fileout".proxy"$proxy"-mp4.mp4