if [ $# -ne 1 ]; then
echo "usage: $0 <os>"
- echo " <os> = [centos | suse | ubuntu | fedora | mint | debian]"
+ echo " <os> = [centos | suse | ubuntu | fedora | mint | debian | arch]"
fi
dir="$1"
jbigkit-devel libvdpau-devel libva-devel gtk2-devel mesa-vdpau-drivers \
pulseaudio-libs-devel libtool patchelf boost-devel
;;
+"arch")
+ pacman -Syu gtk2 nasm yasm cmake fftw patchelf boost boost-libs \
+ base-devel libvdpau libva perl-xml-parser perl-carp libogg texinfo \
+ libsndfile
+ ;;
"suse" | "leap" | "tumbleweed")
zypper -n install nasm gcc gcc-c++ zlib-devel texinfo libpng16-devel \
freeglut-devel libXv-devel alsa-devel libbz2-devel ncurses-devel \
$(OBJDIR)/filebaseulaw.o \
$(OBJDIR)/filecr2.o \
$(OBJDIR)/filedv.o \
+ $(OBJDIR)/filedpx.o \
$(OBJDIR)/fileexr.o \
$(OBJDIR)/fileffmpeg.o \
$(OBJDIR)/fileflac.o \
#include "filecr2.h"
#include "filedb.h"
#include "filedv.h"
+#include "filedpx.h"
#include "fileexr.h"
#include "fileffmpeg.h"
#include "fileflac.h"
FileJPEG::get_parameters(parent_window, asset, format_window,
audio_options, video_options, edl);
break;
+#ifdef HAVE_LIBDPX
+ case FILE_DPX:
+ case FILE_DPX_LIST:
+ FileDPX::get_parameters(parent_window, asset, format_window,
+ audio_options, video_options, edl);
+ break;
+#endif
#ifdef HAVE_OPENEXR
case FILE_EXR:
case FILE_EXR_LIST:
case FILE_MPEG:
case FILE_FFMPEG:
return 1;
+ case FILE_DPX:
case FILE_EXR:
case FILE_JPEG:
case FILE_PNG:
"PPM",
"JPEG",
"GIF",
+ "DPX",
#ifdef HAVE_OPENEXR
"EXR",
#endif
#endif
"MPEG",
"EDL",
- "FFMPEG_Late",
+ "FFMPEG_Late",
};
const int File::nb_probes =
sizeof(File::default_probes)/sizeof(File::default_probes[0]);
else continue;
return FILE_OK;
}
+#ifdef HAVE_LIBDPX
+ if( !strcmp(pref->name,"DPX") ) { // DPX file
+ if( !FileDPX::check_sig(this->asset, data) ) continue;
+ file = new FileDPX(this->asset, this);
+ return FILE_OK;
+ }
+#endif
#ifdef HAVE_OPENEXR
if( !strcmp(pref->name,"EXR") ) { // EXR file
if( !FileEXR::check_sig(this->asset, data)) continue;
case FILE_GIF_LIST:
file = new FileGIFList(this->asset, this);
break;
-
+#ifdef HAVE_LIBDPX
+ case FILE_DPX:
+ case FILE_DPX_LIST:
+ file = new FileDPX(this->asset, this);
+ break;
+#endif
#ifdef HAVE_OPENEXR
case FILE_EXR:
case FILE_EXR_LIST:
file = new FileEXR(this->asset, this);
break;
#endif
+
case FILE_FLAC:
file = new FileFLAC(this->asset, this);
break;
if( !strcasecmp(format, _(TIFF_LIST_NAME)) ) return FILE_TIFF_LIST;
if( !strcasecmp(format, _(JPEG_NAME)) ) return FILE_JPEG;
if( !strcasecmp(format, _(JPEG_LIST_NAME)) ) return FILE_JPEG_LIST;
+ if( !strcasecmp(format, _(DPX_NAME)) ) return FILE_DPX;
+ if( !strcasecmp(format, _(DPX_LIST_NAME)) ) return FILE_DPX_LIST;
if( !strcasecmp(format, _(EXR_NAME)) ) return FILE_EXR;
if( !strcasecmp(format, _(EXR_LIST_NAME)) ) return FILE_EXR_LIST;
if( !strcasecmp(format, _(FLAC_NAME)) ) return FILE_FLAC;
case FILE_FLAC: return _(FLAC_NAME);
case FILE_GIF: return _(GIF_NAME);
case FILE_GIF_LIST: return _(GIF_LIST_NAME);
+ case FILE_DPX: return _(DPX_NAME);
+ case FILE_DPX_LIST: return _(DPX_LIST_NAME);
case FILE_EXR: return _(EXR_NAME);
case FILE_EXR_LIST: return _(EXR_LIST_NAME);
#ifdef HAVE_LIBZMPEG
case FILE_TGA_LIST: return _(TGA_LIST_NAME);
case FILE_TIFF: return _(TIFF_NAME);
case FILE_TIFF_LIST: return _(TIFF_LIST_NAME);
+#ifdef HAVE_OGG
case FILE_OGG: return _(OGG_NAME);
case FILE_VORBIS: return _(VORBIS_NAME);
+#endif
case FILE_RAWDV: return _(RAWDV_NAME);
case FILE_FFMPEG: return _(FFMPEG_NAME);
case FILE_DB: return _(DBASE_NAME);
#endif
case FILE_JPEG:
case FILE_JPEG_LIST: return FileJPEG::get_best_colormodel(asset, driver);
+#ifdef HAVE_LIBDPX
+ case FILE_DPX:
+ case FILE_DPX_LIST: return FileDPX::get_best_colormodel(asset, driver);
+#endif
#ifdef HAVE_OPENEXR
case FILE_EXR:
case FILE_EXR_LIST: return FileEXR::get_best_colormodel(asset, driver);
case FILE_AU: return "au";
case FILE_RAWDV: return "dv";
case FILE_DB: return "db";
+ case FILE_DPX: return "dpx";
case FILE_EXR: return "exr";
+ case FILE_DPX_LIST: return "dpxs";
case FILE_EXR_LIST: return "exrs";
case FILE_FLAC: return "flac";
case FILE_JPEG: return "jpg";
case FILE_PNG_LIST: return "PNG_LIST";
case FILE_PPM_LIST: return "PPM_LIST";
case FILE_AC3: return "AC3";
+ case FILE_DPX: return "DPX";
+ case FILE_DPX_LIST: return "DPX_LIST";
case FILE_EXR: return "EXR";
case FILE_EXR_LIST: return "EXR_LIST";
case FILE_CR2: return "CR2";
#define FILE_PPM 38
#define FILE_PPM_LIST 39
#define FILE_REF 40
+#define FILE_DPX 41
+#define FILE_DPX_LIST 42
// For formats supported by plugins, the format number is the plugin number in the
// plugin list ORed with 0x8000.
#define VORBIS_NAME "OGG Vorbis"
#define WAV_NAME "Microsoft WAV"
#define REF_NAME "Reference EDL"
+#define DPX_NAME "DPX"
+#define DPX_LIST_NAME "DPX Sequence"
#define BITSLINEAR8 8
#define BITSLINEAR16 16
--- /dev/null
+
+/*
+ * CINELERRA
+ * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+#ifdef HAVE_LIBDPX
+
+#include "asset.h"
+#include "file.h"
+#include "filedpx.h"
+
+class DPXInStream : public InStream
+{
+public:
+ DPXInStream(char * ptr, size_t sz);
+ virtual ~DPXInStream();
+
+ void Close();
+ void Rewind();
+ size_t Read(void * buf, const size_t size);
+ size_t ReadDirect(void * buf, const size_t size);
+ bool EndOfFile() const;
+ bool Seek(long offset, Origin origin);
+
+private:
+ char *databuf;
+ size_t pos;
+ size_t bufsize;
+};
+
+DPXInStream::DPXInStream(char * ptr, size_t sz) :
+ databuf(ptr),
+ pos(0),
+ bufsize(sz)
+{
+}
+
+DPXInStream::~DPXInStream()
+{
+ Close();
+}
+
+void DPXInStream::Close()
+{
+ databuf = nullptr;
+ bufsize = 0;
+ pos = 0;
+}
+
+void DPXInStream::Rewind()
+{
+ pos = 0;
+}
+
+size_t DPXInStream::Read(void * buf, const size_t size)
+{
+ size_t data_to_read = MIN(size, bufsize - pos);
+ if ( data_to_read > 0 )
+ {
+ memcpy(buf, &databuf[pos], data_to_read);
+ pos += data_to_read;
+ }
+ return data_to_read;
+}
+
+size_t DPXInStream::ReadDirect(void * buf, const size_t size)
+{
+ this->Read(buf, size);
+}
+
+bool DPXInStream::EndOfFile() const
+{
+ if ( pos >= bufsize )
+ return true;
+ return false;
+}
+
+bool DPXInStream::Seek(long offset, Origin origin)
+{
+ bool result = true;
+ switch ( origin )
+ {
+ case kStart:
+ if ( (size_t)offset < bufsize )
+ pos = offset;
+ else
+ result = false;
+ break;
+
+ case kCurrent:
+ if ( pos+offset < bufsize )
+ pos += offset;
+ else
+ result = false;
+ break;
+
+ case kEnd:
+ if ( (size_t)offset < bufsize )
+ pos = bufsize - offset - 1;
+ else
+ result = false;
+ break;
+ }
+ return result;
+}
+
+
+
+
+FileDPX::FileDPX(Asset *asset, File *file)
+ : FileList(asset, file, "DPXLIST", ".dpx", FILE_DPX, FILE_DPX_LIST)
+{
+ if(asset->format == FILE_UNKNOWN)
+ asset->format = FILE_DPX_LIST;
+}
+
+FileDPX::~FileDPX()
+{
+}
+
+void FileDPX::get_parameters(BC_WindowBase *parent_window,
+ Asset *asset, BC_WindowBase* &format_window,
+ int audio_options, int video_options, EDL *edl)
+{
+}
+
+int FileDPX::check_sig(Asset *asset, char *test)
+{
+ if(test[0] == 'D' && test[1] == 'P' && test[2] == 'X' &&
+ test[3] == 'L' && test[4] == 'I' && test[5] == 'S' && test[6] == 'T')
+ {
+ return 1;
+ }
+ return 0;
+}
+
+int FileDPX::get_best_colormodel(Asset *asset, int driver)
+{
+ return BC_RGB161616;
+}
+
+int FileDPX::colormodel_supported(int colormodel)
+{
+ return color_model;
+}
+
+int FileDPX::read_frame_header(char *path)
+{
+ int result = 0;
+
+ InStream img;
+ if (!img.Open(path))
+ {
+ return 1;
+ }
+
+ dpx::Header header;
+ if (!header.Read(&img))
+ {
+ return 1;
+ }
+
+ asset->width = header.Width();
+ asset->height = header.Height();
+ switch ( header.ComponentDataSize(0) )
+ {
+ case dpx::DataSize::kByte:
+ color_model = BC_RGB888;
+ break;
+
+ case dpx::DataSize::kWord:
+ color_model = BC_RGB161616;
+ break;
+
+ case dpx::DataSize::kInt:
+ case dpx::DataSize::kFloat:
+ case dpx::DataSize::kDouble:
+ color_model = BC_RGB_FLOAT;
+ break;
+ }
+ return result;
+}
+
+int FileDPX::read_frame(VFrame *frame, VFrame *data)
+{
+ DPXInStream inStream((char*)data->get_data(), data->get_compressed_size());
+ dpx::Reader dpxReader;
+
+ dpxReader.SetInStream(&inStream);
+ dpxReader.ReadHeader();
+ return dpxReader.ReadImage(0, frame->get_data()) ? 0 : 1;
+}
+
+#endif
\ No newline at end of file
--- /dev/null
+
+/*
+ * CINELERRA
+ * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+#ifdef HAVE_LIBDPX
+
+#ifndef FILEDPX_H
+#define FILEDPX_H
+
+#include "file.inc"
+#include "filedpx.inc"
+#include "filelist.h"
+#include "DPX.h"
+
+class FileDPX : public FileList
+{
+public:
+ FileDPX(Asset *asset, File *file);
+ ~FileDPX();
+
+ static void get_parameters(BC_WindowBase *parent_window,
+ Asset *asset, BC_WindowBase* &format_window,
+ int audio_options, int video_options, EDL *edl);
+ static int check_sig(Asset *asset, char *test);
+ static int get_best_colormodel(Asset *asset, int driver);
+ int colormodel_supported(int colormodel);
+ int read_frame_header(char *path);
+ int read_frame(VFrame *frame, VFrame *data);
+
+private:
+ int color_model;
+};
+
+#endif
+#endif
--- /dev/null
+
+/*
+ * CINELERRA
+ * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#ifndef FILEDPX_INC
+#define FILEDPX_INC
+
+class FileDPX;
+
+#endif
int width = asset->width, height = asset->height;
char string[BCTEXTLEN];
int len = strlen(list_prefix);
- int ret = fread(string, 1, strlen(list_prefix), stream);
+ int ret = fread(string, 1, len, stream);
fclose(stream);
result = len == ret ? 0 : 1;
if( !result && !strncasecmp(string, list_prefix, len)) {
CHECK_WITH([noelision],[use noelision/libpthread],[NOELISION],[auto])
CHECK_WITH([booby],[window lock trace booby trap],[BOOBY],[no])
CHECK_WITH([libzmpeg],[build libzmpeg],[LIBZMPEG],[yes])
+CHECK_WITH([libdpx],[build libdpx],[LIBDPX],[auto])
CHECK_WITH([commercial],[enable commercial capture],[COMMERCIAL],[no])
CHECK_WITH([thirdparty],[use thirdparty build],[CIN_3RDPARTY],[yes])
CHECK_WITH([shuttle],[shuttle device],[SHUTTLE],[yes])
[ ],
[ . ])
+PKG_3RD([libdpx],[auto],
+ [libdpx],
+ [ libdpx/libdpx.a ],
+ [ libdpx ])
+
if test [ "$(uname -o)"] = "Android" ; then
PKG_3RD([libbthread],[auto],
PKG_PROVIDE([sord], [$WANT_LV2])
PKG_PROVIDE([suil], [$WANT_LV2])
PKG_PROVIDE([ffnvcodec], [$WANT_NV])
+PKG_PROVIDE([libdpx])
if test "x$WANT_LV2" = "xyes"; then
if test "x$HAVE_lv2" = "xyes" -a "x$BUILD_lilv" = "x0"; then
x265.cfg_vars?=$(call cmake_config,source)
x265.cfg_params?= -DENABLE_SHARED=no
libvpx.cfg_params?= --enable-pic --disable-avx512 --enable-vp9-highbitdepth --disable-examples --disable-unit_tests
+libdpx.cfg_vars?= libtoolize; aclocal; autoconf; automake -a;
DS:=$$$$$$$$
pkg_cfg=$(call bld_path,$(1),usr/local/lib/pkgconfig):
$(call rules,$(call std-build,lilv, lv2 sratom serd sord))
$(call rules,$(call std-build,suil, lv2))
$(call rules,$(call std-build,ffnvcodec))
+$(call rules,$(call std-build,libdpx))
# specialize festival, multiple tarballs
festival:
diff --git a/cinelerra-5.1/thirdparty/Makefile b/cinelerra-5.1/thirdparty/Makefile
--- a/cinelerra-5.1/thirdparty/Makefile
+++ b/cinelerra-5.1/thirdparty/Makefile
-@@ -250,8 +250,9 @@ tiff.cfg_params+= --enable-shared=no --disable-zstd $(call if_pkg,libwebp,\
+@@ -259,8 +259,9 @@ tiff.cfg_params+= --disable-libdeflate --enable-shared=no --disable-zstd $(call
$(call if_npkg,libwebp,--disable-webp)
twolame.cfg_params?=--enable-shared=no
x264.cfg_params?= --enable-static --enable-pic
+x265.cfg_vars?=chmod +x ./configure; chmod +x ./multilib.sh;
+#x265.cfg_vars?=$(call cmake_config,source)
+#x265.cfg_params?= -DENABLE_SHARED=no
- libvpx.cfg_params?= --enable-pic --disable-avx512 --disable-examples --disable-unit_tests
-
+ libvpx.cfg_params?= --enable-pic --disable-avx512 --enable-vp9-highbitdepth --disable-examples --disable-unit_tests
+
DS:=$$$$$$$$
diff --git a/cinelerra-5.1/thirdparty/src/x265_3.5.patch1 b/cinelerra-5.1/thirdparty/src/x265_3.5.patch1
new file mode 100644
--- /dev/null
+--- ./configure.ac.orig 2022-04-03 18:21:04.183058995 +0300
++++ ./configure.ac 2022-04-03 18:26:35.223059015 +0300
+@@ -10,7 +10,7 @@
+ # Checks for programs.
+ AC_PROG_CC
+ AC_PROG_CXX
+-AX_CXX_COMPILE_STDCXX_17
++AX_CXX_COMPILE_STDCXX_11
+
+ # libtool
+ AM_DISABLE_SHARED