build tweaks, x264/nasm + x265/10bit, plugin xlats, y4m pipe fmt, fix leaks
authorGood Guy <good1.2guy@gmail.com>
Thu, 15 Feb 2018 02:47:27 +0000 (19:47 -0700)
committerGood Guy <good1.2guy@gmail.com>
Thu, 15 Feb 2018 02:47:27 +0000 (19:47 -0700)
cinelerra-5.1/cinelerra/fileffmpeg.C
cinelerra-5.1/cinelerra/fileffmpeg.h
cinelerra-5.1/cinelerra/plugindialog.C
cinelerra-5.1/cinelerra/pluginfclient.C
cinelerra-5.1/configure.ac
cinelerra-5.1/ffmpeg/video/y4m.dfl [new file with mode: 0644]
cinelerra-5.1/ffmpeg/video/y4m.y4m [new file with mode: 0644]

index 10f685c12769f3b4edcbbe675ab6ac700d20fa24..6cc3f58886c5a7887fe77d0229e218cc11dc19c1 100644 (file)
@@ -627,6 +627,8 @@ FFMPEGConfigVideo::FFMPEGConfigVideo(BC_WindowBase *parent_window, Asset *asset,
        this->asset = asset;
        this->edl = edl;
        preset_popup = 0;
+       ff_options_dialog = 0;
+       pixel_format = 0;
 
        bitrate = 0;
        quality = 0;
@@ -635,9 +637,10 @@ FFMPEGConfigVideo::FFMPEGConfigVideo(BC_WindowBase *parent_window, Asset *asset,
 
 FFMPEGConfigVideo::~FFMPEGConfigVideo()
 {
-       delete ff_options_dialog;
        lock_window("FFMPEGConfigVideo::~FFMPEGConfigVideo");
-       if(preset_popup) delete preset_popup;
+       delete ff_options_dialog;
+       delete pixel_format;
+       delete preset_popup;
        presets.remove_all_objects();
        unlock_window();
 }
index e3a9196c5ebcd3d924aa5db14f3bfd72415c1664..5453b77ca61d0f0c692484fd4c45b11d93747170 100644 (file)
@@ -124,13 +124,20 @@ public:
        int handle_event();
 };
 
+class FFMpegPixFmtItems : public ArrayList<BC_ListBoxItem*>
+{
+public:
+       FFMpegPixFmtItems() {}
+       ~FFMpegPixFmtItems() { remove_all_objects(); }
+};
+
 class FFMpegPixelFormat : public BC_PopupTextBox
 {
 public:
        FFMpegPixelFormat(FFMPEGConfigVideo *vid_config, int x, int y, int w, int list_h);
 
         FFMPEGConfigVideo *vid_config;
-       ArrayList<BC_ListBoxItem*> pixfmts;
+       FFMpegPixFmtItems pixfmts;
 
        int handle_event();
        void update_formats();
index 5ce006c00fc2dc1bbf87da3601935da78267cfa9..878d1d00b496537d28f9707fd4dd09ec853543a2 100644 (file)
@@ -722,7 +722,7 @@ void PluginDialog::load_plugin_list(int redraw)
        const char *text = search_text->get_text();
 
        for( int i=0; i<plugindb.total; ++i ) {
-               const char *title = plugindb.values[i]->title;
+               const char *title = _(plugindb.values[i]->title);
                if( text && text[0] && !bstrcasestr(title, text) ) continue;
                standalone_data.append(new PluginDialogListItem(title, i));
        }
index bb821d344fb68a865d37082339543faddae660f8..3a2dfc8375a7f240368b79f6e69f6513dd01bf9a 100644 (file)
@@ -1098,8 +1098,8 @@ int PluginFFilter::init(const char *name, PluginFClientConfig *conf)
                graph->nb_threads  = 0;
        }
        fctx = avfilter_graph_alloc_filter(graph, filter, inst_name);
-       fctx->thread_type = graph->thread_type; // bug in avfilter
        if( !fctx ) return AVERROR(ENOMEM);
+       fctx->thread_type = graph->thread_type; // bug in avfilter
        if( conf ) {
                AVDictionary *opts = 0;
                for( int i=0; i<conf->size(); ++i ) {
index ff203afe27627c00dd1c26aaad10c92417c942ec..d54d490547e7dcd79c14b83353fd1d7cc010454b 100644 (file)
@@ -333,7 +333,6 @@ AC_ARG_ENABLE([$1],
 
 CHECK_ENABLE([static-build], [STATIC_BUILD], [build static], [auto])
 CHECK_ENABLE([x264_hidepth], [X264_HIDEPTH], [build x264 10bit], [no])
-CHECK_ENABLE([x265_hidepth], [X265_HIDEPTH], [build x265 10/12bit], [no])
 
 test "x$WANT_STATIC_BUILD" = "xauto" && WANT_STATIC_BUILD=$WANT_CINBIN_BUILD
 
@@ -359,6 +358,19 @@ fi
 CHECK_PROG(PACTL, [pactl])
 WANT_PACTL=$PROG_PACTL
 
+# libx264 nasm fix
+AC_MSG_CHECKING([nasm x264 compatible])
+echo "vmovdqa32 [[eax]]{k1}{z}, zmm0" > conftest.asm
+nasm conftest.asm -o conftest.o > /dev/null 2>&1
+if test $? != 0 ; then
+ AC_MSG_RESULT([no])
+ AC_MSG_WARN([libx264 built without assembly code])
+ X264_CFG_PARAMS="$X264_CFG_PARAMS --disable-asm"
+else
+ AC_MSG_RESULT([yes])
+fi
+rm -f conftest.asm conftest.o
+
 AC_CHECK_DECL([X_HAVE_UTF8_STRING],,[no_utf=yes],[#include <X11/Xlib.h>])
 if test "$no_utf" = "yes"; then
   AC_MSG_ERROR([Cinelerra requires utf8 support in X Windows.])
@@ -734,7 +746,6 @@ fi
 AC_SUBST(EXTRA_LIBS)
 AC_SUBST(FFMPEG_EXTRA_CFG)
 AC_SUBST(WANT_X264_HIDEPTH)
-AC_SUBST(WANT_X265_HIDEPTH)
 
 AC_SUBST(CFG_CFLAGS)
 AC_SUBST(CFG_CXXFLAGS)
@@ -792,10 +803,7 @@ for flg in $CFG_CXXFLAGS; do echo "CXXFLAGS += $flg"; done
 echo ""
 
 if test  $WANT_X264_HIDEPTH = "yes" ; then
-  echo "x264.cfg_params := --enable-static --bit-depth=10"
-fi
-if test  $WANT_X265_HIDEPTH = "yes" ; then
-  echo "x265.cfg_params := -DENABLE_SHARED=no -DHIGH_BIT_DEPTH:BOOL=ON" # -DMAIN12:BOOL=ON"
+  X264_CFG_PARAMS="$X264_CFG_PARAMS --bit-depth=10"
 fi
 
 for pkg in $STATIC_PKGS; do
@@ -860,3 +868,6 @@ fi
 if test "x$HAVE_opus" = "xyes"; then
 echo 'ffmpeg.cflags+=" -I/usr/include/opus"'
 fi
+if test "x$X264_CFG_PARAMS" != "x" ; then
+  echo "x264.cfg_params :=$X264_CFG_PARAMS --enable-static --enable-pic"
+fi
diff --git a/cinelerra-5.1/ffmpeg/video/y4m.dfl b/cinelerra-5.1/ffmpeg/video/y4m.dfl
new file mode 100644 (file)
index 0000000..328e734
--- /dev/null
@@ -0,0 +1 @@
+y4m.y4m
diff --git a/cinelerra-5.1/ffmpeg/video/y4m.y4m b/cinelerra-5.1/ffmpeg/video/y4m.y4m
new file mode 100644 (file)
index 0000000..995893c
--- /dev/null
@@ -0,0 +1,2 @@
+yuv4mpegpipe wrapped_avframe
+strict -1