Compare commits
2 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| be548b568b | |||
| f57c114ad0 |
53
mjpegtools-c++-17.patch
Normal file
53
mjpegtools-c++-17.patch
Normal file
@@ -0,0 +1,53 @@
|
||||
|
||||
github.com/gentoo/gentoo/pull/32171
|
||||
github.com/gentoo/gentoo/commit/85deb61
|
||||
|
||||
media-video/mjpegtools: fix compiling at least with c++17 standard
|
||||
|
||||
- fixing usage of 'register' specifier since, since c++17 standard,
|
||||
it's been removed
|
||||
- fixing usage pf 'auto_ptr' since, since c++17 standard, it's been
|
||||
removed
|
||||
|
||||
mjpegtools-2.2.1-c++17-register-fix.patch
|
||||
--- a/utils/fastintfns.h
|
||||
+++ b/utils/fastintfns.h
|
||||
@@ -2,12 +2,12 @@
|
||||
*
|
||||
* WARNING: Assumes 2's complement arithmetic.
|
||||
*/
|
||||
-static inline int intmax( register int x, register int y )
|
||||
+static inline int intmax( int x, int y )
|
||||
{
|
||||
return x < y ? y : x;
|
||||
}
|
||||
|
||||
-static inline int intmin( register int x, register int y )
|
||||
+static inline int intmin( int x, int y )
|
||||
{
|
||||
return x < y ? x : y;
|
||||
}
|
||||
|
||||
|
||||
mjpegtools-2.2.1-c++17-no-auto_ptr-fix.patch
|
||||
--- a/mplex/main.cpp
|
||||
+++ b/mplex/main.cpp
|
||||
@@ -50,7 +50,7 @@
|
||||
#include "multiplexor.hpp"
|
||||
|
||||
|
||||
-using std::auto_ptr;
|
||||
+using std::unique_ptr;
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -138,7 +138,7 @@
|
||||
void
|
||||
FileOutputStream::NextSegment( )
|
||||
{
|
||||
- auto_ptr<char> prev_filename_buf( new char[strlen(cur_filename)+1] );
|
||||
+ unique_ptr<char[]> prev_filename_buf( new char[strlen(cur_filename)+1] );
|
||||
char *prev_filename = prev_filename_buf.get();
|
||||
fclose(strm);
|
||||
++segment_num;
|
||||
|
||||
16
mjpegtools-c99-configure.patch
Normal file
16
mjpegtools-c99-configure.patch
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
https://bugs.gentoo.org/899868
|
||||
https://sourceforge.net/p/mjpeg/bugs/144/
|
||||
https://sourceforge.net/p/mjpeg/Code/3514/
|
||||
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -236,7 +236,7 @@ dnl Check to see if __progname is provided by the system
|
||||
dnl ********************************************************************
|
||||
AC_CACHE_CHECK([for __progname],
|
||||
[mjt_cv_extern___progname],
|
||||
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
|
||||
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]],
|
||||
[[extern char *__progname;
|
||||
puts(__progname);]])],
|
||||
[mjt_cv_extern___progname=yes],
|
||||
352
mjpegtools-gcc15.patch
Normal file
352
mjpegtools-gcc15.patch
Normal file
@@ -0,0 +1,352 @@
|
||||
|
||||
bugs.gentoo.org/936562
|
||||
sourceforge.net/p/mjpeg/patches/63
|
||||
sourceforge.net/p/mjpeg/Code/3513
|
||||
|
||||
--- a/y4mdenoise/Region2D.hh (revision 3512)
|
||||
+++ b/y4mdenoise/Region2D.hh (working copy)
|
||||
@@ -97,35 +97,11 @@
|
||||
// Add the given horizontal extent to the region. Note that
|
||||
// a_tnXEnd is technically one past the end of the extent.
|
||||
|
||||
- template <class REGION, class REGION_TEMP>
|
||||
- void UnionDebug (Status_t &a_reStatus, INDEX a_tnY,
|
||||
- INDEX a_tnXStart, INDEX a_tnXEnd, REGION_TEMP &a_rTemp);
|
||||
- // Add the given horizontal extent to the region. Note that
|
||||
- // a_tnXEnd is technically one past the end of the extent.
|
||||
- // Exhaustively (i.e. slowly) verifies the results, using a
|
||||
- // much simpler algorithm.
|
||||
- // Requires the use of a temporary region, usually of the
|
||||
- // final subclass' type, in order to work. (Since that can't
|
||||
- // be known at this level, a template parameter is included for
|
||||
- // it.)
|
||||
-
|
||||
template <class REGION>
|
||||
void Union (Status_t &a_reStatus, const REGION &a_rOther);
|
||||
// Make the current region represent the union between itself
|
||||
// and the other given region.
|
||||
|
||||
- template <class REGION, class REGION_O, class REGION_TEMP>
|
||||
- void UnionDebug (Status_t &a_reStatus,
|
||||
- REGION_O &a_rOther, REGION_TEMP &a_rTemp);
|
||||
- // Make the current region represent the union between itself
|
||||
- // and the other given region.
|
||||
- // Exhaustively (i.e. slowly) verifies the results, using a
|
||||
- // much simpler algorithm.
|
||||
- // Requires the use of a temporary region, usually of the
|
||||
- // final subclass' type, in order to work. (Since that can't
|
||||
- // be known at this level, a template parameter is included for
|
||||
- // it.)
|
||||
-
|
||||
//void Merge (Status_t &a_reStatus, INDEX a_tnY, INDEX a_tnXStart,
|
||||
// INDEX a_tnXEnd);
|
||||
// Merge this extent into the current region.
|
||||
@@ -166,36 +142,11 @@
|
||||
// Subtract the given horizontal extent from the region. Note
|
||||
// that a_tnXEnd is technically one past the end of the extent.
|
||||
|
||||
- template <class REGION_TEMP>
|
||||
- void SubtractDebug (Status_t &a_reStatus, INDEX a_tnY,
|
||||
- INDEX a_tnXStart, INDEX a_tnXEnd, REGION_TEMP &a_rTemp);
|
||||
- // Subtract the given horizontal extent from the region. Note
|
||||
- // that a_tnXEnd is technically one past the end of the extent.
|
||||
- // Exhaustively (i.e. slowly) verifies the results, using a
|
||||
- // much simpler algorithm.
|
||||
- // Requires the use of a temporary region, usually of the
|
||||
- // final subclass' type, in order to work. (Since that can't
|
||||
- // be known at this level, a template parameter is included for
|
||||
- // it.)
|
||||
-
|
||||
template <class REGION>
|
||||
void Subtract (Status_t &a_reStatus, const REGION &a_rOther);
|
||||
// Subtract the other region from the current region, i.e.
|
||||
// remove from the current region any extents that exist in the
|
||||
// other region.
|
||||
-
|
||||
- template <class REGION, class REGION_O, class REGION_TEMP>
|
||||
- void SubtractDebug (Status_t &a_reStatus, REGION_O &a_rOther,
|
||||
- REGION_TEMP &a_rTemp);
|
||||
- // Subtract the other region from the current region, i.e.
|
||||
- // remove from the current region any extents that exist in the
|
||||
- // other region.
|
||||
- // Exhaustively (i.e. slowly) verifies the results, using a
|
||||
- // much simpler algorithm.
|
||||
- // Requires the use of a temporary region, usually of the
|
||||
- // final subclass' type, in order to work. (Since that can't
|
||||
- // be known at this level, a template parameter is included for
|
||||
- // it.)
|
||||
|
||||
//typedef ... ConstIterator;
|
||||
//ConstIterator Begin (void) const { return m_setExtents.Begin(); }
|
||||
@@ -404,85 +355,6 @@
|
||||
|
||||
|
||||
|
||||
-// Add the given horizontal extent to the region.
|
||||
-template <class INDEX, class SIZE>
|
||||
-template <class REGION, class REGION_TEMP>
|
||||
-void
|
||||
-Region2D<INDEX,SIZE>::UnionDebug (Status_t &a_reStatus, INDEX a_tnY,
|
||||
- INDEX a_tnXStart, INDEX a_tnXEnd, REGION_TEMP &a_rTemp)
|
||||
-{
|
||||
- typename REGION::ConstIterator itHere;
|
||||
- typename REGION_TEMP::ConstIterator itHereO;
|
||||
- INDEX tnX;
|
||||
- // Used to loop through points.
|
||||
-
|
||||
- // Make sure they didn't start us off with an error.
|
||||
- assert (a_reStatus == g_kNoError);
|
||||
-
|
||||
- // Calculate the union.
|
||||
- a_rTemp.Assign (a_reStatus, *this);
|
||||
- if (a_reStatus != g_kNoError)
|
||||
- return;
|
||||
- a_rTemp.Union (a_reStatus, a_tnY, a_tnXStart, a_tnXEnd);
|
||||
- if (a_reStatus != g_kNoError)
|
||||
- return;
|
||||
-
|
||||
- // Loop through every point in the result, make sure it's in
|
||||
- // one of the two input regions.
|
||||
- for (itHereO = a_rTemp.Begin(); itHereO != a_rTemp.End(); ++itHereO)
|
||||
- {
|
||||
- const Extent &rHere = *itHereO;
|
||||
- for (tnX = rHere.m_tnXStart; tnX < rHere.m_tnXEnd; ++tnX)
|
||||
- {
|
||||
- if (!((rHere.m_tnY == a_tnY
|
||||
- && (tnX >= a_tnXStart && tnX < a_tnXEnd))
|
||||
- || this->DoesContainPoint (rHere.m_tnY, tnX)))
|
||||
- goto error;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- // Loop through every point in the original region, make sure
|
||||
- // it's in the result.
|
||||
- for (itHere = this->Begin(); itHere != this->End(); ++itHere)
|
||||
- {
|
||||
- const Extent &rHere = *itHere;
|
||||
- for (tnX = rHere.m_tnXStart; tnX < rHere.m_tnXEnd; ++tnX)
|
||||
- {
|
||||
- if (!a_rTemp.DoesContainPoint (rHere.m_tnY, tnX))
|
||||
- goto error;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- // Loop through every point in the added extent, make sure it's in
|
||||
- // the result.
|
||||
- for (tnX = a_tnXStart; tnX < a_tnXEnd; ++tnX)
|
||||
- {
|
||||
- if (!a_rTemp.DoesContainPoint (a_tnY, tnX))
|
||||
- goto error;
|
||||
- }
|
||||
-
|
||||
- // The operation succeeded. Commit it.
|
||||
- Assign (a_reStatus, a_rTemp);
|
||||
- if (a_reStatus != g_kNoError)
|
||||
- return;
|
||||
-
|
||||
- // All done.
|
||||
- return;
|
||||
-
|
||||
-error:
|
||||
- // Handle deviations.
|
||||
- fprintf (stderr, "Region2D::Union() failed\n");
|
||||
- fprintf (stderr, "Input region:\n");
|
||||
- PrintRegion (*this);
|
||||
- fprintf (stderr, "Input extent: [%d,%d-%d]\n",
|
||||
- int (a_tnY), int (a_tnXStart), int (a_tnXEnd));
|
||||
- fprintf (stderr, "Result:\n");
|
||||
- PrintRegion (a_rTemp);
|
||||
- assert (false);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-
|
||||
// Make the current region represent the union between itself
|
||||
// and the other given region.
|
||||
template <class INDEX, class SIZE>
|
||||
@@ -511,184 +383,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
-
|
||||
-
|
||||
-// Make the current region represent the union between itself
|
||||
-// and the other given region.
|
||||
-template <class INDEX, class SIZE>
|
||||
-template <class REGION, class REGION_O, class REGION_TEMP>
|
||||
-void
|
||||
-Region2D<INDEX,SIZE>::UnionDebug (Status_t &a_reStatus,
|
||||
- REGION_O &a_rOther, REGION_TEMP &a_rTemp)
|
||||
-{
|
||||
- typename REGION::ConstIterator itHere;
|
||||
- typename REGION_O::ConstIterator itHereO;
|
||||
- typename REGION_TEMP::ConstIterator itHereT;
|
||||
- INDEX tnX;
|
||||
- // Used to loop through points.
|
||||
-
|
||||
- // Make sure they didn't start us off with an error.
|
||||
- assert (a_reStatus == g_kNoError);
|
||||
-
|
||||
- // Calculate the union.
|
||||
- a_rTemp.Assign (a_reStatus, *this);
|
||||
- if (a_reStatus != g_kNoError)
|
||||
- return;
|
||||
- a_rTemp.Union (a_reStatus, a_rOther);
|
||||
- if (a_reStatus != g_kNoError)
|
||||
- return;
|
||||
-
|
||||
- // Loop through every point in the result, make sure it's in
|
||||
- // one of the two input regions.
|
||||
- for (itHereT = a_rTemp.Begin(); itHereT != a_rTemp.End(); ++itHereT)
|
||||
- {
|
||||
- const Extent &rHere = *itHereT;
|
||||
- for (tnX = rHere.m_tnXStart; tnX < rHere.m_tnXEnd; ++tnX)
|
||||
- {
|
||||
- if (!a_rOther.DoesContainPoint (rHere.m_tnY, tnX)
|
||||
- && !this->DoesContainPoint (rHere.m_tnY, tnX))
|
||||
- goto error;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- // Loop through every point in the first input region, make sure
|
||||
- // it's in the result.
|
||||
- for (itHere = this->Begin(); itHere != this->End(); ++itHere)
|
||||
- {
|
||||
- const Extent &rHere = *itHere;
|
||||
- for (tnX = rHere.m_tnXStart; tnX < rHere.m_tnXEnd; ++tnX)
|
||||
- {
|
||||
- if (!a_rTemp.DoesContainPoint (rHere.m_tnY, tnX))
|
||||
- goto error;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- // Loop through every point in the second input region, make sure
|
||||
- // it's in the result.
|
||||
- for (itHereO = a_rOther.Begin();
|
||||
- itHereO != a_rOther.End();
|
||||
- ++itHereO)
|
||||
- {
|
||||
- const Extent &rHere = *itHereO;
|
||||
- for (tnX = rHere.m_tnXStart; tnX < rHere.m_tnXEnd; ++tnX)
|
||||
- {
|
||||
- if (!a_rTemp.DoesContainPoint (rHere.m_tnY, tnX))
|
||||
- goto error;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- // The operation succeeded. Commit it.
|
||||
- Assign (a_reStatus, a_rTemp);
|
||||
- if (a_reStatus != g_kNoError)
|
||||
- return;
|
||||
-
|
||||
- // All done.
|
||||
- return;
|
||||
-
|
||||
-error:
|
||||
- // Handle deviations.
|
||||
- fprintf (stderr, "Region2D::Union() failed\n");
|
||||
- fprintf (stderr, "First input region:\n");
|
||||
- PrintRegion (*this);
|
||||
- fprintf (stderr, "Second input region:\n");
|
||||
- PrintRegion (a_rOther);
|
||||
- fprintf (stderr, "Result:\n");
|
||||
- PrintRegion (a_rTemp);
|
||||
- assert (false);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-
|
||||
-// Subtract the other region from the current region, i.e.
|
||||
-// remove from the current region any areas that exist in the
|
||||
-// other region.
|
||||
-template <class INDEX, class SIZE>
|
||||
-template <class REGION, class REGION_O, class REGION_TEMP>
|
||||
-void
|
||||
-Region2D<INDEX,SIZE>::SubtractDebug (Status_t &a_reStatus,
|
||||
- REGION_O &a_rOther, REGION_TEMP &a_rTemp)
|
||||
-{
|
||||
- typename REGION::ConstIterator itHere;
|
||||
- typename REGION_O::ConstIterator itHereO;
|
||||
- typename REGION_TEMP::ConstIterator itHereT;
|
||||
- INDEX tnX;
|
||||
- // Used to loop through points.
|
||||
-
|
||||
- // Make sure they didn't start us off with an error.
|
||||
- assert (a_reStatus == g_kNoError);
|
||||
-
|
||||
- // Calculate the difference.
|
||||
- a_rTemp.Assign (a_reStatus, *this);
|
||||
- if (a_reStatus != g_kNoError)
|
||||
- return;
|
||||
- a_rTemp.Subtract (a_reStatus, a_rOther);
|
||||
- if (a_reStatus != g_kNoError)
|
||||
- return;
|
||||
-
|
||||
- // Loop through every point in the result, make sure it's in
|
||||
- // the first input region but not the second.
|
||||
- for (itHereT = a_rTemp.Begin(); itHereT != a_rTemp.End(); ++itHereT)
|
||||
- {
|
||||
- const Extent &rHere = *itHereT;
|
||||
- for (tnX = rHere.m_tnXStart; tnX < rHere.m_tnXEnd; ++tnX)
|
||||
- {
|
||||
- if (!(this->DoesContainPoint (rHere.m_tnY, tnX)
|
||||
- && !a_rOther.DoesContainPoint (rHere.m_tnY, tnX)))
|
||||
- goto error;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- // Loop through every point in the first input region, and if it's
|
||||
- // not in the second input region, make sure it's in the result.
|
||||
- for (itHere = this->Begin(); itHere != this->End(); ++itHere)
|
||||
- {
|
||||
- const Extent &rHere = *itHere;
|
||||
- for (tnX = rHere.m_tnXStart; tnX < rHere.m_tnXEnd; ++tnX)
|
||||
- {
|
||||
- if (!a_rOther.DoesContainPoint (rHere.m_tnY, tnX))
|
||||
- {
|
||||
- if (!a_rTemp.DoesContainPoint (rHere.m_tnY, tnX))
|
||||
- goto error;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- // Loop through every point in the second input region, make sure
|
||||
- // it's not in the result.
|
||||
- for (itHereO = a_rOther.Begin();
|
||||
- itHereO != a_rOther.End();
|
||||
- ++itHereO)
|
||||
- {
|
||||
- const Extent &rHere = *itHere;
|
||||
- for (tnX = rHere.m_tnXStart; tnX < rHere.m_tnXEnd; ++tnX)
|
||||
- {
|
||||
- if (a_rTemp.DoesContainPoint (rHere.m_tnY, tnX))
|
||||
- goto error;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- // The operation succeeded. Commit it.
|
||||
- Assign (a_reStatus, a_rTemp);
|
||||
- if (a_reStatus != g_kNoError)
|
||||
- return;
|
||||
-
|
||||
- // All done.
|
||||
- return;
|
||||
-
|
||||
-error:
|
||||
- // Handle deviations.
|
||||
- fprintf (stderr, "Region2D::Subtract() failed\n");
|
||||
- fprintf (stderr, "First input region:\n");
|
||||
- PrintRegion (*this);
|
||||
- fprintf (stderr, "Second input region:\n");
|
||||
- PrintRegion (a_rOther);
|
||||
- fprintf (stderr, "Result:\n");
|
||||
- PrintRegion (a_rTemp);
|
||||
- assert (false);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-
|
||||
// Flood-fill the current region.
|
||||
template <class INDEX, class SIZE>
|
||||
template <class CONTROL>
|
||||
|
||||
27
mjpegtools-lto.patch
Normal file
27
mjpegtools-lto.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
bugs.gentoo.org/927103
|
||||
sourceforge.net/p/mjpeg/bugs/143
|
||||
sourceforge.net/p/mjpeg/Code/3515
|
||||
|
||||
--- a/mpeg2enc/quantize_x86.c
|
||||
+++ b/mpeg2enc/quantize_x86.c
|
||||
@@ -41,7 +41,7 @@
|
||||
#include "quantize_precomp.h"
|
||||
#include "quantize_ref.h"
|
||||
|
||||
-int quant_weight_coeff_sum_mmx (int16_t *blk, uint16_t *i_quant_mat );
|
||||
+int32_t quant_weight_coeff_sum_mmx(int16_t *src, int16_t *i_quant_mat);
|
||||
|
||||
void iquantize_non_intra_m1_mmx(int16_t *src, int16_t *dst, uint16_t *qmat);
|
||||
void iquantize_non_intra_m2_mmx(int16_t *src, int16_t *dst, uint16_t *qmat);
|
||||
--- a/lavtools/lav_io.c
|
||||
+++ b/lavtools/lav_io.c
|
||||
@@ -34,7 +34,7 @@
|
||||
#include <libdv/dv.h>
|
||||
#endif
|
||||
|
||||
-extern int AVI_errno;
|
||||
+extern long int AVI_errno;
|
||||
|
||||
static char video_format=' ';
|
||||
static int internal_error=0;
|
||||
@@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 8 16:39:16 UTC 2025 - Friedrich Haubensak <hsk17@mail.de>
|
||||
|
||||
- add patches from upstream to fix gcc15 compile time errors and
|
||||
some warnings: mjpegtools-gcc15.patch, mjpegtools-lto.patch,
|
||||
mjpegtools-c99-configure.patch
|
||||
- add patch mjpegtools-c++-17.patch (from gentoo) to silence
|
||||
std=c++17 warnings
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 16 18:01:58 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
|
||||
@@ -33,6 +33,10 @@ Patch2: mjpegtools-getopt.patch
|
||||
Patch3: mjpegtools-writeable_strings.patch
|
||||
Patch6: mjpegtools-v4l-2.6.38.patch
|
||||
Patch8: mjpegtools-2.0.0-fix-bashisms.patch
|
||||
Patch9: mjpegtools-c++-17.patch
|
||||
Patch10: mjpegtools-gcc15.patch
|
||||
Patch11: mjpegtools-lto.patch
|
||||
Patch12: mjpegtools-c99-configure.patch
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libjpeg-devel
|
||||
BuildRequires: libtool
|
||||
|
||||
Reference in New Issue
Block a user