Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Mar 2018 17:58:07 +0000 (UTC)
From:      Thomas Zander <riggs@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r465620 - in head/multimedia: avidemux-plugins avidemux/files
Message-ID:  <201803261758.w2QHw7Zr038994@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: riggs
Date: Mon Mar 26 17:58:07 2018
New Revision: 465620
URL: https://svnweb.freebsd.org/changeset/ports/465620

Log:
  Un-break avidemux and plugins (import C++11 fixes from upstream)
  
  PR:		224384
  Submitted by:	rkoberman@gmail.com
  MFH:		2018Q1

Added:
  head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__demuxers_MpegTS_dmxTSPacket.cpp   (contents, props changed)
  head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_ffDv_ADM__ffDv.cpp   (contents, props changed)
  head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_ffFlv1_ADM__ffFlv1.h   (contents, props changed)
  head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_ffMpeg2_ADM__ffMpeg2.h   (contents, props changed)
  head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_ffMpeg4_ADM__ffMpeg4.h   (contents, props changed)
  head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x264_ADM__x264.cpp   (contents, props changed)
  head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x264_ADM__x264.h   (contents, props changed)
  head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x264_qt4_Q__x264.cpp   (contents, props changed)
  head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x265_ADM__x265.cpp   (contents, props changed)
  head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x265_ADM__x265.h   (contents, props changed)
  head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x265_qt4_Q__x265.cpp   (contents, props changed)
  head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_xvid4_ADM__xvid4.cpp   (contents, props changed)
  head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoFilters6_telecide_Telecide__getFrame.cpp   (contents, props changed)
Modified:
  head/multimedia/avidemux-plugins/Makefile

Modified: head/multimedia/avidemux-plugins/Makefile
==============================================================================
--- head/multimedia/avidemux-plugins/Makefile	Mon Mar 26 17:33:29 2018	(r465619)
+++ head/multimedia/avidemux-plugins/Makefile	Mon Mar 26 17:58:07 2018	(r465620)
@@ -12,8 +12,6 @@ COMMENT=	Simple GUI based video editor (Plugins)
 
 LIB_DEPENDS=	libADM6avutil.so.54:multimedia/avidemux
 
-BROKEN=		fails to build
-
 MASTERDIR=	${.CURDIR}/../avidemux
 PLIST=		${.CURDIR}/pkg-plist
 

Added: head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__demuxers_MpegTS_dmxTSPacket.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__demuxers_MpegTS_dmxTSPacket.cpp	Mon Mar 26 17:58:07 2018	(r465620)
@@ -0,0 +1,53 @@
+--- avidemux_plugins/ADM_demuxers/MpegTS/dmxTSPacket.cpp.orig	2016-01-29 08:47:25 UTC
++++ avidemux_plugins/ADM_demuxers/MpegTS/dmxTSPacket.cpp
+@@ -144,7 +144,7 @@ bool    tsPacket::setPos(uint64_t pos)
+ {
+     if(!_file->setpos(pos))
+     {
+-        printf("[tsPacket] Cannot seek to %"PRIx64"\n", pos);
++        printf("[tsPacket] Cannot seek to %" PRIx64"\n", pos);
+         return false;
+     }
+     return true;
+@@ -387,7 +387,7 @@ nextPack3:
+     zprintf("[TS Demuxer] Code=0x%x pid=0x%x\n",code,pes->pid);
+     if((code&0xffffff00)!=0x100)
+     {
+-        printf("[Ts Demuxer] No PES startcode at 0x%"PRIx64"\n",pkt.startAt);
++        printf("[Ts Demuxer] No PES startcode at 0x%" PRIx64"\n",pkt.startAt);
+         printf("0x:%02x %02x %02x %02x\n",pkt.payload[4],pkt.payload[5],pkt.payload[6],pkt.payload[7]);
+         goto nextPack3;
+     }
+@@ -433,7 +433,7 @@ nextPack3:
+ /**
+     \fn decodePesHeader
+ */
+-#define fail(x) {printf("[Ts Demuxer]*********"x"*******\n");return false;}
++#define fail(x) {printf("[Ts Demuxer]*********" x"*******\n");return false;}
+ bool tsPacket::decodePesHeader(TS_PESpacket *pes)
+ {
+     uint8_t  *start=pes->payload+6;
+@@ -735,7 +735,7 @@ bool    tsPacketLinear::read(uint32_t le
+ */
+ bool    tsPacketLinear::getInfo(dmxPacketInfo *info)
+ {
+-#warning FIXME
++//#warning FIXME
+     if(pesPacket->offset<4)
+     {
+         info->startAt=this->oldStartAt;
+@@ -780,12 +780,12 @@ bool    tsPacketLinear::seek(uint64_t pa
+ {
+     if(!_file->setpos(packetStart))
+     {
+-        printf("[tsPacket] Cannot seek to %"PRIx64"\n",packetStart);
++        printf("[tsPacket] Cannot seek to %" PRIx64"\n",packetStart);
+         return 0;
+     }
+     if(!refill())
+     {
+-        printf("[tsPacketLinear] Seek to %"PRIx64":%"PRIx32" failed\n",packetStart,offset);
++        printf("[tsPacketLinear] Seek to %" PRIx64":%" PRIx32" failed\n",packetStart,offset);
+         return false;
+     }
+     ADM_assert(offset<pesPacket->payloadSize);

Added: head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_ffDv_ADM__ffDv.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_ffDv_ADM__ffDv.cpp	Mon Mar 26 17:58:07 2018	(r465620)
@@ -0,0 +1,11 @@
+--- avidemux_plugins/ADM_videoEncoder/ffDv/ADM_ffDv.cpp.orig	2016-01-29 08:47:25 UTC
++++ 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},
+ };
+ 

Added: head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_ffFlv1_ADM__ffFlv1.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_ffFlv1_ADM__ffFlv1.h	Mon Mar 26 17:58:07 2018	(r465620)
@@ -0,0 +1,14 @@
+--- avidemux_plugins/ADM_videoEncoder/ffFlv1/ADM_ffFlv1.h.orig	2016-01-29 08:47:25 UTC
++++ 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 */ \

Added: head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_ffMpeg2_ADM__ffMpeg2.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_ffMpeg2_ADM__ffMpeg2.h	Mon Mar 26 17:58:07 2018	(r465620)
@@ -0,0 +1,14 @@
+--- avidemux_plugins/ADM_videoEncoder/ffMpeg2/ADM_ffMpeg2.h.orig	2016-01-29 08:47:25 UTC
++++ 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 */ \

Added: head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_ffMpeg4_ADM__ffMpeg4.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_ffMpeg4_ADM__ffMpeg4.h	Mon Mar 26 17:58:07 2018	(r465620)
@@ -0,0 +1,14 @@
+--- avidemux_plugins/ADM_videoEncoder/ffMpeg4/ADM_ffMpeg4.h.orig	2016-01-29 08:47:25 UTC
++++ avidemux_plugins/ADM_videoEncoder/ffMpeg4/ADM_ffMpeg4.h
+@@ -43,9 +43,9 @@
+ 		2,				/* 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 */ \

Added: head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x264_ADM__x264.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x264_ADM__x264.cpp	Mon Mar 26 17:58:07 2018	(r465620)
@@ -0,0 +1,34 @@
+--- avidemux_plugins/ADM_videoEncoder/x264/ADM_x264.cpp.orig	2016-01-29 08:47:25 UTC
++++ avidemux_plugins/ADM_videoEncoder/x264/ADM_x264.cpp
+@@ -173,7 +173,7 @@ again:    
+         //return false;
+     }else
+     {
+-        //printf("[PPPP] x264 Incoming : %"PRIu64"us \n",image->Pts);    
++        //printf("[PPPP] x264 Incoming : %" PRIu64"us \n",image->Pts);    
+         // 2-preamble   
+         if(false==preAmble(image))
+         {
+@@ -289,11 +289,11 @@ bool x264Encoder::postAmble (ADMBitstrea
+         }
+         //------
+         aprintf("encoder delay=%d, pic out dts=%d picout pts=%d\n",getEncoderDelay(),picout->i_dts,picout->i_pts);
+-        aprintf("pts = %"PRIu64", dts=%"PRIu64", pts+delay=%"PRIu64" delta=%"PRIu64"\n",picout->i_pts,out->dts,out->pts,
++        aprintf("pts = %" PRIu64", dts=%" PRIu64", pts+delay=%" PRIu64" delta=%" PRIu64"\n",picout->i_pts,out->dts,out->pts,
+                     out->pts-out->dts);
+         if(out->dts>out->pts)
+         {
+-            ADM_warning("DTS > PTS, that can happen when there are holes in the source (%"PRIu64"/%"PRIu64")\n",
++            ADM_warning("DTS > PTS, that can happen when there are holes in the source (%" PRIu64"/%" PRIu64")\n",
+                         out->dts,out->pts);
+             if(picout->i_type!=X264_TYPE_B && picout->i_type!=X264_TYPE_BREF)
+             {
+@@ -341,7 +341,7 @@ bool x264Encoder::postAmble (ADMBitstrea
+           ADM_error ("[x264] Unknown image type: %d\n", picout->i_type);
+           //ADM_assert(0);
+         }
+-        //printf("[OOOO] x264 Outgoing : %"PRIu64"us \n",out->dts);    
++        //printf("[OOOO] x264 Outgoing : %" PRIu64"us \n",out->dts);    
+         out->out_quantizer = picout->i_qpplus1;
+         return true;
+ }

Added: head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x264_ADM__x264.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x264_ADM__x264.h	Mon Mar 26 17:58:07 2018	(r465620)
@@ -0,0 +1,11 @@
+--- avidemux_plugins/ADM_videoEncoder/x264/ADM_x264.h.orig	2016-01-29 08:47:25 UTC
++++ 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; */ \

Added: head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x264_qt4_Q__x264.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x264_qt4_Q__x264.cpp	Mon Mar 26 17:58:07 2018	(r465620)
@@ -0,0 +1,11 @@
+--- avidemux_plugins/ADM_videoEncoder/x264/qt4/Q_x264.cpp.orig	2016-01-29 08:47:25 UTC
++++ 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"},

Added: head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x265_ADM__x265.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x265_ADM__x265.cpp	Mon Mar 26 17:58:07 2018	(r465620)
@@ -0,0 +1,16 @@
+--- avidemux_plugins/ADM_videoEncoder/x265/ADM_x265.cpp.orig	2016-01-29 08:47:25 UTC
++++ avidemux_plugins/ADM_videoEncoder/x265/ADM_x265.cpp
+@@ -284,11 +284,11 @@ bool x265Encoder::postAmble (ADMBitstrea
+         }
+         //------
+         aprintf("encoder delay=%d, pic out dts=%d picout pts=%d\n",getEncoderDelay(),picout->i_dts,picout->i_pts);
+-        aprintf("pts = %"PRIu64", dts=%"PRIu64", pts+delay=%"PRIu64" delta=%"PRIu64"\n",picout->i_pts,out->dts,out->pts,
++        aprintf("pts = %" PRIu64", dts=%" PRIu64", pts+delay=%" PRIu64" delta=%" PRIu64"\n",picout->i_pts,out->dts,out->pts,
+                     out->pts-out->dts);
+         if(out->dts>out->pts)
+         {
+-            ADM_warning("DTS > PTS, that can happen when there are holes in the source (%"PRIu64"/%"PRIu64")\n",
++            ADM_warning("DTS > PTS, that can happen when there are holes in the source (%" PRIu64"/%" PRIu64")\n",
+                         out->dts,out->pts);
+             if(picout->sliceType!=X265_TYPE_B && picout->sliceType!=X265_TYPE_BREF)
+             {

Added: head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x265_ADM__x265.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x265_ADM__x265.h	Mon Mar 26 17:58:07 2018	(r465620)
@@ -0,0 +1,11 @@
+--- avidemux_plugins/ADM_videoEncoder/x265/ADM_x265.h.orig	2016-01-29 08:47:25 UTC
++++ 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; */ \

Added: head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x265_qt4_Q__x265.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_x265_qt4_Q__x265.cpp	Mon Mar 26 17:58:07 2018	(r465620)
@@ -0,0 +1,11 @@
+--- avidemux_plugins/ADM_videoEncoder/x265/qt4/Q_x265.cpp.orig	2016-01-29 08:47:25 UTC
++++ 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"},

Added: head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_xvid4_ADM__xvid4.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoEncoder_xvid4_ADM__xvid4.cpp	Mon Mar 26 17:58:07 2018	(r465620)
@@ -0,0 +1,20 @@
+--- avidemux_plugins/ADM_videoEncoder/xvid4/ADM_xvid4.cpp.orig	2016-01-29 08:47:25 UTC
++++ 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,
+@@ -332,7 +332,7 @@ again:    
+     // Store Pts/DTS
+     ADM_timeMapping map; // Store real PTS <->lav value mapping
+     map.realTS=image->Pts+getEncoderDelay();
+-    aprintf("Pushing fn=%d Time=%"PRIu64"\n",frameNum,map.realTS);
++    aprintf("Pushing fn=%d Time=%" PRIu64"\n",frameNum,map.realTS);
+    
+     map.internalTS=frameNum++;
+     mapper.push_back(map);

Added: head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoFilters6_telecide_Telecide__getFrame.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/avidemux/files/patch-avidemux__plugins_ADM__videoFilters6_telecide_Telecide__getFrame.cpp	Mon Mar 26 17:58:07 2018	(r465620)
@@ -0,0 +1,29 @@
+--- avidemux_plugins/ADM_videoFilters6/telecide/Telecide_getFrame.cpp.orig	2016-01-29 08:47:25 UTC
++++ 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.
+@@ -394,7 +394,7 @@ teleCide *_param=&configuration;
+         {
+                 unsigned char *dstpp, *dstpn;
+                 int v1, v2, z;
+-                #warning blend in place is wrong!
++                //#warning blend in place is wrong!
+                 final=dst;
+                 // MeanX:We should copy here as we blend from source and destination
+                 // for the moment we do it in place, it is wrong.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803261758.w2QHw7Zr038994>