From: Good Guy Date: Mon, 28 Aug 2023 16:56:28 +0000 (-0600) Subject: Credit Andrew with additional vaapi options and update Copyright X-Git-Tag: 2023-08~5 X-Git-Url: https://git.cinelerra-gg.org/git/?a=commitdiff_plain;h=7befc439d48ecf3591a0e8f420a447e8c1ec7250;p=goodguy%2Fcinelerra.git Credit Andrew with additional vaapi options and update Copyright --- diff --git a/cinelerra-5.1/cinelerra/aboutprefs.C b/cinelerra-5.1/cinelerra/aboutprefs.C index 03a6f9d0..0ffb8072 100644 --- a/cinelerra-5.1/cinelerra/aboutprefs.C +++ b/cinelerra-5.1/cinelerra/aboutprefs.C @@ -28,10 +28,12 @@ #include "vframe.h" #include "versioninfo.h" + #ifndef COMPILEDATE #define COMPILEDATE "built: " __DATE__ " " __TIME__ #endif const char *AboutPrefs::build_timestamp = COMPILEDATE; +const char *AboutPrefs::ffmpeg_version = CINELERRA_LIBAV_VERSION; AboutPrefs::AboutPrefs(MWindow *mwindow, PreferencesWindow *pwindow) : PreferencesDialog(mwindow, pwindow) @@ -51,11 +53,6 @@ void AboutPrefs::create_objects() int x, y; BC_Resources *resources = BC_WindowBase::get_resources(); -// add_subwindow(new BC_Title(mwindow->theme->preferencestitle_x, -// mwindow->theme->preferencestitle_y, -// _("About"), -// LARGEFONT, -// resources->text_default)); x = mwindow->theme->preferencesoptions_x; y = mwindow->theme->preferencesoptions_y + @@ -72,7 +69,12 @@ void AboutPrefs::create_objects() COPYRIGHTTEXT2 #endif ); - y += get_text_height(MEDIUMFONT) * 3; + y += 2*get_text_height(MEDIUMFONT); + draw_text(x,y, COPYRIGHTTEXT3); + y += get_text_height(MEDIUMFONT); + draw_text(x,y, COPYRIGHTTEXT4); + + y += get_text_height(MEDIUMFONT) * 2; const char *cfg_path = File::get_cindat_path(); @@ -99,7 +101,7 @@ void AboutPrefs::create_objects() about.append(new BC_ListBoxItem(msg)); } BC_ListBox *listbox; - add_subwindow(listbox = new BC_ListBox(x, y, xS(450), yS(280), + add_subwindow(listbox = new BC_ListBox(x, y, xS(450), yS(250), LISTBOX_TEXT, &about, 0, 0, 1)); y += listbox->get_h() + get_text_height(LARGEFONT) + yS(10); } @@ -125,6 +127,12 @@ void AboutPrefs::create_objects() y += get_text_height(MEDIUMFONT, license3); draw_text(x, y, build_timestamp); + x += get_text_width(MEDIUMFONT, build_timestamp); + draw_text(x,y, " "); + x += get_text_width(MEDIUMFONT, " "); + draw_text(x,y, ffmpeg_version); + x -= get_text_width(MEDIUMFONT, build_timestamp); + x -= get_text_width(MEDIUMFONT, " "); #if defined(REPOMAINTXT) y += get_text_height(MEDIUMFONT, build_timestamp); draw_text(x, y, REPOMAINTXT); diff --git a/cinelerra-5.1/cinelerra/aboutprefs.h b/cinelerra-5.1/cinelerra/aboutprefs.h index ee87dcf1..1b50374c 100644 --- a/cinelerra-5.1/cinelerra/aboutprefs.h +++ b/cinelerra-5.1/cinelerra/aboutprefs.h @@ -32,6 +32,7 @@ public: ~AboutPrefs(); static const char *build_timestamp; + static const char *ffmpeg_version; void create_objects(); ArrayList about; }; diff --git a/cinelerra-5.1/cinelerra/ffmpeg.C b/cinelerra-5.1/cinelerra/ffmpeg.C index 4923eded..e95cc87e 100644 --- a/cinelerra-5.1/cinelerra/ffmpeg.C +++ b/cinelerra-5.1/cinelerra/ffmpeg.C @@ -1160,7 +1160,14 @@ int FFVideoStream::decode_hw_format(AVCodec *decoder, AVHWDeviceType type) if( hw_pix_fmt >= 0 ) { hw_pixfmt = hw_pix_fmt; avctx->get_format = get_hw_format; + const char *drm_node = getenv("CIN_DRM_DEC"); + if(drm_node && type==AV_HWDEVICE_TYPE_VAAPI) { + ret = av_hwdevice_ctx_create(&hw_device_ctx, type, drm_node, 0, 0); + } + else { ret = av_hwdevice_ctx_create(&hw_device_ctx, type, 0, 0, 0); + } + if( ret >= 0 ) { avctx->hw_device_ctx = av_buffer_ref(hw_device_ctx); ret = 1; @@ -1176,6 +1183,7 @@ int FFVideoStream::decode_hw_format(AVCodec *decoder, AVHWDeviceType type) AVHWDeviceType FFVideoStream::encode_hw_activate(const char *hw_dev) { + const char *drm_node_enc = getenv("CIN_DRM_ENC"); AVBufferRef *hw_device_ctx = 0; AVBufferRef *hw_frames_ref = 0; AVHWDeviceType type = AV_HWDEVICE_TYPE_NONE; @@ -1187,7 +1195,12 @@ AVHWDeviceType FFVideoStream::encode_hw_activate(const char *hw_dev) } } if( type != AV_HWDEVICE_TYPE_NONE ) { - int ret = av_hwdevice_ctx_create(&hw_device_ctx, AV_HWDEVICE_TYPE_VAAPI, 0, 0, 0); + int ret = 0; + if (drm_node_enc) { + ret = av_hwdevice_ctx_create(&hw_device_ctx, AV_HWDEVICE_TYPE_VAAPI, drm_node_enc, 0, 0); + } else { + ret = av_hwdevice_ctx_create(&hw_device_ctx, AV_HWDEVICE_TYPE_VAAPI, 0, 0, 0); + } if( ret < 0 ) { ff_err(ret, "Failed to create a HW device.\n"); type = AV_HWDEVICE_TYPE_NONE; diff --git a/cinelerra-5.1/cinelerra/main.C b/cinelerra-5.1/cinelerra/main.C index ed403d9e..b1f1fb69 100644 --- a/cinelerra-5.1/cinelerra/main.C +++ b/cinelerra-5.1/cinelerra/main.C @@ -309,9 +309,18 @@ int main(int argc, char *argv[]) #ifndef COPYRIGHTTEXT2 #define COPYRIGHTTEXT2 "" #endif +#ifndef COPYRIGHTTEXT3 +#define COPYRIGHTTEXT3 "" +#endif + fprintf(stderr, "%s %s - %s\n%s", PROGRAM_NAME,CINELERRA_VERSION, AboutPrefs::build_timestamp, REPOMAINTXT COPYRIGHTTEXT1 COPYRIGHTTEXT2); + fprintf(stderr, "%s", COPYRIGHTTEXT3); + fprintf(stderr, "%s", COPYRIGHTTEXT4); + fprintf(stderr,"\n"); + fprintf(stderr, "%s \n", AboutPrefs::ffmpeg_version); + fprintf(stderr,"\n"); fprintf(stderr, "%s is free software, covered by the GNU General Public License,\n" "and you are welcome to change it and/or distribute copies of it under\n" "certain conditions. There is absolutely no warranty for %s.\n\n", diff --git a/cinelerra-5.1/cinelerra/versioninfo.h b/cinelerra-5.1/cinelerra/versioninfo.h index d6e20b7c..7e2a528f 100644 --- a/cinelerra-5.1/cinelerra/versioninfo.h +++ b/cinelerra-5.1/cinelerra/versioninfo.h @@ -1,11 +1,16 @@ #ifndef __VERSIONINFO_H__ #define __VERSIONINFO_H__ +#include +#define CINELERRA_LIBAV_VERSION "Libav version: " LIBAVCODEC_IDENT; #define CINELERRA_VERSION "Infinity" #define REPOMAINTXT "git://git.cinelerra-gg.org/goodguy/cinelerra.git\n" #define COPYRIGHT_DATE "2019" #define COPYRIGHTTEXT1 "(c) 2006-2019 Heroine Virtual Ltd. by Adam Williams\n" #define COPYRIGHTTEXT2 "2007-2020 mods for Cinelerra-GG by W.P.Morrow aka goodguy\n" +#define COPYRIGHTTEXT3 "2003-2017 mods for Cinelerra-CV by CinelerraCV team\n" +#define COPYRIGHTTEXT4 "2015-2023 mods for Cinelerra-GG by Cinelerra-GG team\n" + #undef COMPILEDATE #endif diff --git a/cinelerra-5.1/info/plugins.txt b/cinelerra-5.1/info/plugins.txt index e1b8ca9c..f9637210 100644 --- a/cinelerra-5.1/info/plugins.txt +++ b/cinelerra-5.1/info/plugins.txt @@ -124,6 +124,9 @@ Live Video: Reads video directly from the capture card input and replaces any video on the track. Loop video: Loop video by specifying the length of the region to loop. +Mirror: Mirror horizontal or vertical with the ability to + swap left to right or top to bottom. And if enable + reflection center checked, can vary X/Y centering. Mandelbrot: Render a Mandelbrot fractal using Cuda. Motion: Tracks translation and rotation motion to stabilize shaky video.