From: Good Guy Date: Thu, 15 Feb 2018 02:47:27 +0000 (-0700) Subject: build tweaks, x264/nasm + x265/10bit, plugin xlats, y4m pipe fmt, fix leaks X-Git-Url: https://cinelerra-gg.org/git/?a=commitdiff_plain;h=066bf914215f31bbfe598f2cbce10d130f7fc519;p=goodguy%2Fhistory.git build tweaks, x264/nasm + x265/10bit, plugin xlats, y4m pipe fmt, fix leaks --- diff --git a/cinelerra-5.1/cinelerra/fileffmpeg.C b/cinelerra-5.1/cinelerra/fileffmpeg.C index 10f685c1..6cc3f588 100644 --- a/cinelerra-5.1/cinelerra/fileffmpeg.C +++ b/cinelerra-5.1/cinelerra/fileffmpeg.C @@ -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(); } diff --git a/cinelerra-5.1/cinelerra/fileffmpeg.h b/cinelerra-5.1/cinelerra/fileffmpeg.h index e3a9196c..5453b77c 100644 --- a/cinelerra-5.1/cinelerra/fileffmpeg.h +++ b/cinelerra-5.1/cinelerra/fileffmpeg.h @@ -124,13 +124,20 @@ public: int handle_event(); }; +class FFMpegPixFmtItems : public ArrayList +{ +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 pixfmts; + FFMpegPixFmtItems pixfmts; int handle_event(); void update_formats(); diff --git a/cinelerra-5.1/cinelerra/plugindialog.C b/cinelerra-5.1/cinelerra/plugindialog.C index 5ce006c0..878d1d00 100644 --- a/cinelerra-5.1/cinelerra/plugindialog.C +++ b/cinelerra-5.1/cinelerra/plugindialog.C @@ -722,7 +722,7 @@ void PluginDialog::load_plugin_list(int redraw) const char *text = search_text->get_text(); for( int i=0; ititle; + const char *title = _(plugindb.values[i]->title); if( text && text[0] && !bstrcasestr(title, text) ) continue; standalone_data.append(new PluginDialogListItem(title, i)); } diff --git a/cinelerra-5.1/cinelerra/pluginfclient.C b/cinelerra-5.1/cinelerra/pluginfclient.C index bb821d34..3a2dfc83 100644 --- a/cinelerra-5.1/cinelerra/pluginfclient.C +++ b/cinelerra-5.1/cinelerra/pluginfclient.C @@ -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; isize(); ++i ) { diff --git a/cinelerra-5.1/configure.ac b/cinelerra-5.1/configure.ac index ff203afe..d54d4905 100644 --- a/cinelerra-5.1/configure.ac +++ b/cinelerra-5.1/configure.ac @@ -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 ]) 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 index 00000000..328e734d --- /dev/null +++ b/cinelerra-5.1/ffmpeg/video/y4m.dfl @@ -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 index 00000000..995893cd --- /dev/null +++ b/cinelerra-5.1/ffmpeg/video/y4m.y4m @@ -0,0 +1,2 @@ +yuv4mpegpipe wrapped_avframe +strict -1