From adb553d113aadfb00e96bf37ffd9cfe654259059230fe298c6abf577f6ce4d08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 3 May 2024 12:04:41 +0200 Subject: [PATCH] Sync from SUSE:SLFO:Main dirac revision e96485b15e5a115091694e907d844f0f --- .gitattributes | 23 +++ ...d-memory-read-that-causes-the-encode.patch | 52 +++++++ baselibs.conf | 6 + dirac-1.0.2-gcc45.patch | 22 +++ dirac-1.0.2.tar.gz | 3 + dirac.changes | 115 ++++++++++++++ dirac.spec | 143 ++++++++++++++++++ 7 files changed, 364 insertions(+) create mode 100644 .gitattributes create mode 100644 0001-Fix-uninitialised-memory-read-that-causes-the-encode.patch create mode 100644 baselibs.conf create mode 100644 dirac-1.0.2-gcc45.patch create mode 100644 dirac-1.0.2.tar.gz create mode 100644 dirac.changes create mode 100644 dirac.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/0001-Fix-uninitialised-memory-read-that-causes-the-encode.patch b/0001-Fix-uninitialised-memory-read-that-causes-the-encode.patch new file mode 100644 index 0000000..0392ec5 --- /dev/null +++ b/0001-Fix-uninitialised-memory-read-that-causes-the-encode.patch @@ -0,0 +1,52 @@ +From 88fae6224b54ecf92ac6e3ae5083c3f352adc798 Mon Sep 17 00:00:00 2001 +From: Anuradha Suraparaju +Date: Fri, 17 Apr 2009 17:47:27 +1000 +Subject: [PATCH] Fix uninitialised memory read that causes the encoder to crash when using + non-overlapping blocks. + +--- + libdirac_common/mot_comp.cpp | 21 +++++++++++++++------ + 1 files changed, 15 insertions(+), 6 deletions(-) + +diff --git a/libdirac_common/mot_comp.cpp b/libdirac_common/mot_comp.cpp +index aa8d37c..e0ec2ff 100644 +--- a/libdirac_common/mot_comp.cpp ++++ b/libdirac_common/mot_comp.cpp +@@ -306,6 +306,8 @@ void MotionCompensator::CompensateComponent( Picture* pic , + + int save_from_row = m_bparams.Ybsep()-m_bparams.Yoffset(); + ++ bool row_overlap = ((m_bparams.Yblen() - m_bparams.Ybsep()) > 0); ++ + // unpadded picture dimensions + const int x_end_data = pic_data_out.FirstX() + std::min(pic_data_out.LengthX(), pic_size.x ); + const int y_end_data = pic_data_out.FirstY() + std::min(pic_data_out.LengthY(), pic_size.y ); +@@ -489,12 +491,19 @@ void MotionCompensator::CompensateComponent( Picture* pic , + //Increment the block vertical position + pos.y += m_bparams.Ybsep(); + +- // Copy the rows required to motion compensate the next row of block. +- // This is usually Yblen-Ybsep rows. +- memmove (pic_data[0], pic_data[save_from_row], (m_bparams.Yblen() - save_from_row)*pic_data.LengthX()*sizeof(ValueType)); +- memset( pic_data[m_bparams.Yblen() - save_from_row], 0, save_from_row*pic_data.LengthX()*sizeof(ValueType) ); +- save_from_row = m_bparams.Ybsep(); +- ++ if (row_overlap) ++ { ++ // Copy the rows required to motion compensate the next row of ++ // blocks. This is usually Yblen-Ybsep rows. ++ memmove (pic_data[0], pic_data[save_from_row], (m_bparams.Yblen() - save_from_row)*pic_data.LengthX()*sizeof(ValueType)); ++ memset( pic_data[m_bparams.Yblen() - save_from_row], 0, save_from_row*pic_data.LengthX()*sizeof(ValueType) ); ++ save_from_row = m_bparams.Ybsep(); ++ } ++ else ++ { ++ // no row overlap. So reset pic_data to 0. ++ memset( pic_data[0], 0, m_bparams.Yblen()*pic_data.LengthX()*sizeof(ValueType) ); ++ } + }//yblock + + if ( m_add_or_sub == SUBTRACT) +-- +1.7.0.3 + diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..b8e5c00 --- /dev/null +++ b/baselibs.conf @@ -0,0 +1,6 @@ +libdirac_decoder0 +libdirac_encoder0 +dirac-devel + requires -dirac- + requires "libdirac_decoder0- = " + requires "libdirac_encoder0- = " diff --git a/dirac-1.0.2-gcc45.patch b/dirac-1.0.2-gcc45.patch new file mode 100644 index 0000000..7ae1b85 --- /dev/null +++ b/dirac-1.0.2-gcc45.patch @@ -0,0 +1,22 @@ +Index: dirac-1.0.2/libdirac_encoder/quant_chooser.cpp +=================================================================== +--- dirac-1.0.2.orig/libdirac_encoder/quant_chooser.cpp ++++ dirac-1.0.2/libdirac_encoder/quant_chooser.cpp +@@ -340,7 +340,7 @@ void QuantChooser::SetSkip( CodeBlock& c + { + for (int i=cblock.Xstart(); i= u_threshold ) ++ if ( (static_cast(std::abs(m_coeff_data[j][i]))<<2) >= u_threshold ) + can_skip = false; + } + } +@@ -355,7 +355,7 @@ CoeffType QuantChooser::BlockAbsMax( con + { + for (int i=node.Xp() ; i(std::abs(m_coeff_data[j][i])) ); + }// i + }// j + diff --git a/dirac-1.0.2.tar.gz b/dirac-1.0.2.tar.gz new file mode 100644 index 0000000..c8e4bba --- /dev/null +++ b/dirac-1.0.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:816b16f18d235ff8ccd40d95fc5b4fad61ae47583e86607932929d70bf1f00fd +size 918366 diff --git a/dirac.changes b/dirac.changes new file mode 100644 index 0000000..5112abb --- /dev/null +++ b/dirac.changes @@ -0,0 +1,115 @@ +------------------------------------------------------------------- +Tue Jul 4 10:27:05 UTC 2017 - tchvatal@suse.com + +- Cleanu pwith spec-cleaner +- Switch to upstream tarball instead of repacking +- Update dependencies to match reality +- Explicitely enable configuration switches +- Disable docu building as they are kinda empty unless we would + add latex and dot + +------------------------------------------------------------------- +Tue May 26 09:17:16 UTC 2015 - jkeil@suse.com + +- Add baselibs.conf as Source + +------------------------------------------------------------------- +Sun Apr 12 02:00:27 UTC 2015 - plinnell@opensuse.org + +- added existing baselibs.conf to fix build + +------------------------------------------------------------------- +Sat Apr 4 18:11:09 UTC 2015 - dmueller@suse.com + +- remove unneeded texlive-latex dependency + +------------------------------------------------------------------- +Sat Dec 7 23:30:21 UTC 2013 - matz@suse.de + +- Don't buildrequire valgrind-devel anywhere, it's unused. + +------------------------------------------------------------------- +Thu Dec 20 01:00:27 CET 2012 - ro@suse.de + +- buildrequire pkg-config regardless of build-architecture + +------------------------------------------------------------------- +Fri Dec 9 11:49:18 UTC 2011 - coolo@suse.com + +- fix license to be in spdx.org format + +------------------------------------------------------------------- +Fri Sep 30 20:07:55 UTC 2011 - coolo@suse.com + +- add libtool as buildrequire to make the spec file more reliable + +------------------------------------------------------------------- +Sun Sep 18 17:17:12 UTC 2011 - jengelh@medozas.de + +- Remove redundant tags/sections from specfile + (cf. packaging guidelines) +- Use %_smp_mflags for parallel build +- Add dirac-devel to baselibs + +------------------------------------------------------------------- +Fri Apr 14 13:38:21 UTC 2011 - toddrme2178@gmail.com + +- added 32bit compatibility libraries + +------------------------------------------------------------------- +Mon May 24 13:25:36 UTC 2010 - davejplater@gmail.com + +- Split off doc subpackage + +------------------------------------------------------------------- +Mon May 24 07:01:37 UTC 2010 - davejplater@gmail.com + +- Added Provides: and Obsoletes: for packman libdirac-devel +- Included patch from dirac git to fix uninitialised memory read + that causes the encoder to crash when using non-overlapping blocks. + +------------------------------------------------------------------- +Sun May 9 08:49:10 UTC 2010 - davejplater@gmail.com + +- Fixed factory build with patch from git dirac-1.0.2-gcc45.patch + +------------------------------------------------------------------- +Fri Dec 18 22:46:01 CET 2009 - jengelh@medozas.de + +- exclude valgrind-devel on SPARC + +------------------------------------------------------------------- +Sun Jul 12 14:31:22 CEST 2009 - coolo@novell.com + +- fix build in disabling as-needed + +------------------------------------------------------------------- +Wed Jul 1 17:44:48 CEST 2009 - sbrabec@suse.cz + +- Updated to version 1.0.2: + * minor release complying with the latest Dirac Bytestream + Specification 2.2.3. + * Improved compression performance for small picture sizes. + * Improved compression performance at low bit-rates. + * Included macros to check the API version. + * Improved motion estimation. + * New 422 <-> 420 conversion utilities for interlaced video. + * New functionality added to encoder API. + * Fixed bugs in handling DC subband. + +------------------------------------------------------------------- +Wed Apr 29 19:26:44 CEST 2009 - sbrabec@suse.cz + +- Worked around internal compiler error on 11.0-x86_64. + +------------------------------------------------------------------- +Tue Nov 25 10:26:27 CET 2008 - ro@suse.de + +- do not buildrequire valgrind on ia64 s390 s390x + (does not exist on these platforms) + +------------------------------------------------------------------- +Thu Nov 6 10:40:56 CET 2008 - sbrabec@suse.cz + +- New SuSE package (bnc#441855). + diff --git a/dirac.spec b/dirac.spec new file mode 100644 index 0000000..a49bc8e --- /dev/null +++ b/dirac.spec @@ -0,0 +1,143 @@ +# +# spec file for package dirac +# +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +Name: dirac +Version: 1.0.2 +Release: 0 +Summary: The Dirac_Video Codec +License: MPL-1.1 +Group: Productivity/Multimedia/Video/Editors and Convertors +Url: https://sourceforge.net/projects/dirac/ +Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +Source1: baselibs.conf +Patch0: 0001-Fix-uninitialised-memory-read-that-causes-the-encode.patch +Patch1: %{name}-%{version}-gcc45.patch +BuildRequires: fdupes +BuildRequires: gcc-c++ +BuildRequires: libtool +BuildRequires: pkgconfig +BuildRequires: pkgconfig(cppunit) + +%description +Dirac is an open source video codec. It uses a traditional hybrid video +codec architecture, but with the wavelet transform instead of the usual +block transforms. Motion compensation uses overlapped blocks to reduce +block artefacts that would upset the transform coding stage. + +Dirac can code just about any size of video, from streaming up to HD +and beyond, although certain presets are defined for different +applications and standards. These cover the parameters that need to be +set for the encoder to work, such as block sizes and temporal +prediction structures, which must otherwise be set by hand. + +%package -n libdirac_decoder0 +Summary: Dirac Video Codec Decoder Library +Group: System/Libraries + +%description -n libdirac_decoder0 +Dirac is an open source video codec. It uses a traditional hybrid video +codec architecture, but with the wavelet transform instead of the usual +block transforms. Motion compensation uses overlapped blocks to reduce +block artefacts that would upset the transform coding stage. + +Dirac can code just about any size of video, from streaming up to HD +and beyond, although certain presets are defined for different +applications and standards. These cover the parameters that need to be +set for the encoder to work, such as block sizes and temporal +prediction structures, which must otherwise be set by hand. + +%package -n libdirac_encoder0 +Summary: Dirac Video Codec Encoder Library +Group: System/Libraries + +%description -n libdirac_encoder0 +Dirac is an open source video codec. It uses a traditional hybrid video +codec architecture, but with the wavelet transform instead of the usual +block transforms. Motion compensation uses overlapped blocks to reduce +block artefacts that would upset the transform coding stage. + +Dirac can code just about any size of video, from streaming up to HD +and beyond, although certain presets are defined for different +applications and standards. These cover the parameters that need to be +set for the encoder to work, such as block sizes and temporal +prediction structures, which must otherwise be set by hand. + +%package devel +Summary: Development Files for Dirac Video Codec +Group: Development/Libraries/C and C++ +Requires: libdirac_decoder0 = %{version} +Requires: libdirac_encoder0 = %{version} +Provides: libdirac-devel = %{version}-%{release} +Obsoletes: libdirac-devel < %{version}-%{release} + +%description devel +Dirac is an open source video codec. It uses a traditional hybrid video +codec architecture, but with the wavelet transform instead of the usual +block transforms. Motion compensation uses overlapped blocks to reduce +block artefacts that would upset the transform coding stage. + +Dirac can code just about any size of video, from streaming up to HD +and beyond, although certain presets are defined for different +applications and standards. These cover the parameters that need to be +set for the encoder to work, such as block sizes and temporal +prediction structures, which must otherwise be set by hand. + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 +# Code is not mature enough for -Werror (unused results) +sed -i 's/-Werror//' configure.ac + +%build +ACLOCAL="aclocal -I m4" autoreconf -fvi +%configure \ + --disable-silent-rules \ + --disable-static \ + --docdir=%{_docdir}/packages/%{name} \ + --enable-mmx \ + --enable-overlay +make %{?_smp_mflags} + +%install +%make_install htmldir=%{_docdir}/%{name}/code/api_html +# remove the docs we want with main pkg +find %{buildroot} -type f -name "*.la" -delete -print +%fdupes %{buildroot}%{_docdir}/%{name} + +%post -n libdirac_decoder0 -p /sbin/ldconfig +%postun -n libdirac_decoder0 -p /sbin/ldconfig +%post -n libdirac_encoder0 -p /sbin/ldconfig +%postun -n libdirac_encoder0 -p /sbin/ldconfig + +%files +%doc AUTHORS COPYING ChangeLog NEWS README TODO +%{_bindir}/* + +%files -n libdirac_decoder0 +%{_libdir}/libdirac_decoder.so.0* + +%files -n libdirac_encoder0 +%{_libdir}/libdirac_encoder.so.0* + +%files devel +%{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc +%{_includedir}/%{name} + +%changelog