[avidemux] Really fix building with GCC6, patch provided by Dan Horák <dan at danny.cz>

Hans de Goede jwrdegoede at rpmfusion.org
Mon Jul 11 14:19:56 CEST 2016


commit 9209640cfbc1a7da4480e9bab0f3f198a90be761
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Mon Jul 11 14:19:55 2016 +0200

    Really fix building with GCC6, patch provided by Dan Horák <dan at danny.cz>

 avidemux-2.6.12-gcc6.patch | 150 ++++++++++++++++++++++++++++++++++++++++++++-
 avidemux.spec              |   5 +-
 2 files changed, 152 insertions(+), 3 deletions(-)
---
diff --git a/avidemux-2.6.12-gcc6.patch b/avidemux-2.6.12-gcc6.patch
index 489d040..5aeee25 100644
--- a/avidemux-2.6.12-gcc6.patch
+++ b/avidemux-2.6.12-gcc6.patch
@@ -56,6 +56,40 @@
  bool tsPacket::decodePesHeader(TS_PESpacket *pes)
  {
      uint8_t  *start=pes->payload+6;
+diff --git a/avidemux_plugins/ADM_videoEncoder/ffFlv1/ADM_ffFlv1.h b/avidemux_plugins/ADM_videoEncoder/ffFlv1/ADM_ffFlv1.h
+index be2c4fe..c5761bc 100644
+--- a/avidemux_plugins/ADM_videoEncoder/ffFlv1/ADM_ffFlv1.h
++++ b/avidemux_plugins/ADM_videoEncoder/ffFlv1/ADM_ffFlv1.h
+@@ -43,9 +43,9 @@
+           0,				/* max_b_frames */ \
+           0,				/* mpeg_quant */ \
+           1,				/* is_luma_elim_threshold */ \
+-          -2,				/* luma_elim_threshold */ \
++          0,				/* luma_elim_threshold */ \
+           1,				/* is_chroma_elim_threshold */ \
+-          -5,				/* chroma_elim_threshold */ \
++          0,				/* chroma_elim_threshold */ \
+           0.05,				/*lumi_masking */ \
+           1,				/* is lumi */ \
+           0.01,				/*dark_masking */ \
+diff --git a/avidemux_plugins/ADM_videoEncoder/ffMpeg2/ADM_ffMpeg2.h b/avidemux_plugins/ADM_videoEncoder/ffMpeg2/ADM_ffMpeg2.h
+index 77e73c8..c037cf0 100644
+--- a/avidemux_plugins/ADM_videoEncoder/ffMpeg2/ADM_ffMpeg2.h
++++ b/avidemux_plugins/ADM_videoEncoder/ffMpeg2/ADM_ffMpeg2.h
+@@ -53,9 +53,9 @@ enum
+           2,				/* max_b_frames */ \
+           1,				/* mpeg_quant */ \
+           1,				/* is_luma_elim_threshold */ \
+-          -2,				/* luma_elim_threshold */ \
++          0,				/* luma_elim_threshold */ \
+           1,				/* is_chroma_elim_threshold */ \
+-          -5,				/* chroma_elim_threshold */ \
++          0,				/* chroma_elim_threshold */ \
+           0.05,				/*lumi_masking */ \
+           1,				/* is lumi */ \
+           0.01,				/*dark_masking */ \
+diff --git a/avidemux_plugins/ADM_videoEncoder/ffMpeg4/ADM_ffMpeg4.h b/avidemux_plugins/ADM_videoEncoder/ffMpeg4/ADM_ffMpeg4.h
+index c0e2ede..751d2b4 100644
 --- a/avidemux_plugins/ADM_videoEncoder/ffMpeg4/ADM_ffMpeg4.h
 +++ b/avidemux_plugins/ADM_videoEncoder/ffMpeg4/ADM_ffMpeg4.h
 @@ -43,9 +43,9 @@
@@ -63,10 +97,122 @@
  		0,				/* mpeg_quant */ \
  		1,				/* is_luma_elim_threshold */ \
 -		-2,				/* luma_elim_threshold */ \
-+		(uint32)-2,			/* luma_elim_threshold */ \
++		0,				/* luma_elim_threshold */ \
  		1,				/* is_chroma_elim_threshold */ \
 -		-5,				/* chroma_elim_threshold */ \
-+		(uint32)-5,			/* chroma_elim_threshold */ \
++		0,				/* chroma_elim_threshold */ \
  		0.05,				/*lumi_masking */ \
  		1,				/* is lumi */ \
  		0.01,				/*dark_masking */ \
+diff --git a/avidemux_plugins/ADM_videoEncoder/ffDv/ADM_ffDv.cpp b/avidemux_plugins/ADM_videoEncoder/ffDv/ADM_ffDv.cpp
+index 38d8bed..8ad7ba5 100644
+--- a/avidemux_plugins/ADM_videoEncoder/ffDv/ADM_ffDv.cpp
++++ b/avidemux_plugins/ADM_videoEncoder/ffDv/ADM_ffDv.cpp
+@@ -44,7 +44,7 @@ typedef struct
+ 
+ static const dvProfileClass supportedProfiles[]=
+ {
+-    {720,480,29.97,dvColor422},
++    {720,480,30,dvColor422},
+     {720,576,25,dvColor420},
+ };
+ 
+diff --git a/avidemux_plugins/ADM_videoEncoder/xvid4/ADM_xvid4.cpp b/avidemux_plugins/ADM_videoEncoder/xvid4/ADM_xvid4.cpp
+index cf09168..5f6939a 100644
+--- a/avidemux_plugins/ADM_videoEncoder/xvid4/ADM_xvid4.cpp
++++ b/avidemux_plugins/ADM_videoEncoder/xvid4/ADM_xvid4.cpp
+@@ -54,7 +54,7 @@ typedef enum
+         RD_SQUARE = RD_HPEL_QPEL_8 | XVID_ME_EXTSEARCH_RD
+ } RateDistortionMode;
+ 
+-uint32_t rdMode[5]=
++int32_t rdMode[5]=
+ {
+     RD_NONE,
+     RD_DCT_ME,
+diff --git a/avidemux_plugins/ADM_videoEncoder/x264/ADM_x264.h b/avidemux_plugins/ADM_videoEncoder/x264/ADM_x264.h
+index 6ad2830..d9de814 100644
+--- a/avidemux_plugins/ADM_videoEncoder/x264/ADM_x264.h
++++ b/avidemux_plugins/ADM_videoEncoder/x264/ADM_x264.h
+@@ -108,7 +108,7 @@ extern "C"
+ 	1.0,	/* float rate_tolerance; */ \
+ 	0,	/* uint32_t vbv_max_bitrate; */ \
+ 	0,	/* uint32_t vbv_buffer_size; */ \
+-	0.9,	/* uint32_t vbv_buffer_init; */ \
++	1,	/* uint32_t vbv_buffer_init; */ \
+ 	1.4,	/* float ip_factor; */ \
+ 	1.3,	/* float pb_factor; */ \
+ 	1,	/* uint32_t aq_mode; */ \
+diff --git a/avidemux_plugins/ADM_videoEncoder/x265/ADM_x265.h b/avidemux_plugins/ADM_videoEncoder/x265/ADM_x265.h
+index 6ac5742..b2d6cc3 100644
+--- a/avidemux_plugins/ADM_videoEncoder/x265/ADM_x265.h
++++ b/avidemux_plugins/ADM_videoEncoder/x265/ADM_x265.h
+@@ -85,7 +85,7 @@ extern "C"
+ 	1.0,	/* float rate_tolerance; */ \
+ 	0,	/* uint32_t vbv_max_bitrate; */ \
+ 	0,	/* uint32_t vbv_buffer_size; */ \
+-	0.9,	/* uint32_t vbv_buffer_init; */ \
++	1,	/* uint32_t vbv_buffer_init; */ \
+ 	1.4,	/* float ip_factor; */ \
+ 	1.3,	/* float pb_factor; */ \
+ 	2,	/* uint32_t aq_mode; */ \
+commit 7dee579d3ac16d731898305d24bb771834ae0ce0
+Author: Andrew J. Schultz <ajschult at verizon.net>
+Date:   Sun Jul 3 14:56:41 2016 -0400
+
+    Explicitly cast to unsigned int
+
+diff --git a/avidemux_plugins/ADM_videoEncoder/x264/qt4/Q_x264.cpp b/avidemux_plugins/ADM_videoEncoder/x264/qt4/Q_x264.cpp
+index 4c3b5dc..ab5b21e 100644
+--- a/avidemux_plugins/ADM_videoEncoder/x264/qt4/Q_x264.cpp
++++ b/avidemux_plugins/ADM_videoEncoder/x264/qt4/Q_x264.cpp
+@@ -38,7 +38,7 @@ typedef struct
+ }idcToken;
+ 
+ static const idcToken listOfIdc[]={
+-        {-1,"Auto"},
++        {(unsigned int)-1,"Auto"},
+         {10,"1"},
+         {11,"1.1"},
+         {12,"1.2"},
+diff --git a/avidemux_plugins/ADM_videoEncoder/x265/qt4/Q_x265.cpp b/avidemux_plugins/ADM_videoEncoder/x265/qt4/Q_x265.cpp
+index 21172ab..fe94dd8 100644
+--- a/avidemux_plugins/ADM_videoEncoder/x265/qt4/Q_x265.cpp
++++ b/avidemux_plugins/ADM_videoEncoder/x265/qt4/Q_x265.cpp
+@@ -38,7 +38,7 @@ typedef struct
+ }idcToken;
+ 
+ static const idcToken listOfIdc[]={
+-        {-1,"Auto"},
++        {(unsigned int)-1,"Auto"},
+         {10,"1"},
+         {20,"2"},
+         {21,"2.1"},
+commit 6ad028d9f9caf929819c1afcb693611aade0af0b
+Author: Andrew J. Schultz <ajschult at verizon.net>
+Date:   Sun Jul 3 14:50:55 2016 -0400
+
+    Cast to int so we can take abs()
+
+diff --git a/avidemux_plugins/ADM_videoFilters6/telecide/Telecide_getFrame.cpp b/avidemux_plugins/ADM_videoFilters6/telecide/Telecide_getFrame.cpp
+index d8e6f24..e8d9a9c 100644
+--- a/avidemux_plugins/ADM_videoFilters6/telecide/Telecide_getFrame.cpp
++++ b/avidemux_plugins/ADM_videoFilters6/telecide/Telecide_getFrame.cpp
+@@ -240,7 +240,7 @@ teleCide *_param=&configuration;
+                         {
+                                 // The chosen frame doesn't match the prediction.
+                                 if (predicted_metric == 0) mismatch = 0.0;
+-                                else mismatch = (100.0*abs(predicted_metric - lowest))/predicted_metric;
++                                else mismatch = (100.0*abs((int)predicted_metric - (int)lowest))/predicted_metric;
+                                 if (mismatch < gthresh)
+                                 {
+                                         // It's close enough, so use the predicted one.
+@@ -283,7 +283,7 @@ teleCide *_param=&configuration;
+                                         {
+                                                 // The chosen frame doesn't match the prediction.
+                                                 if (predicted_metric == 0) mismatch = 0.0;
+-                                                else mismatch = (100.0*abs(predicted_metric - lowest))/predicted_metric;
++                                                else mismatch = (100.0*abs((int)predicted_metric - (int)lowest))/predicted_metric;
+                                                 if ((int) mismatch <= gthresh)
+                                                 {
+                                                         // It's close enough, so use the predicted one.
diff --git a/avidemux.spec b/avidemux.spec
index d5c2ac0..6ee6869 100644
--- a/avidemux.spec
+++ b/avidemux.spec
@@ -2,7 +2,7 @@
 
 Name:           avidemux
 Version:        2.6.12
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Graphical video editing and transcoding tool
 
 License:        GPLv2+
@@ -370,6 +370,9 @@ fi
 
 
 %changelog
+* Mon Jul 11 2016 Hans de Goede <j.w.r.degoede at gmail.com> - 2.6.12-3
+- Really fix building with GCC6, patch provided by Dan Horák <dan at danny.cz>
+
 * Sat Jun 25 2016 Richard Shaw <hobbes1069 at gmail.com> - 2.6.12-2
 - Bump for rebuild in new infra.
 - Add patch for GCC 6 narrowing conversion and other GCC 6 errors.


More information about the rpmfusion-commits mailing list