View | Details | Raw Unified | Return to bug 215240 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-4 / +2 lines)
Lines 2-8 Link Here
2
2
3
PORTNAME=	amide
3
PORTNAME=	amide
4
PORTVERSION=	1.0.5
4
PORTVERSION=	1.0.5
5
PORTREVISION=	4
5
PORTREVISION=	5
6
CATEGORIES=	graphics
6
CATEGORIES=	graphics
7
MASTER_SITES=	SF
7
MASTER_SITES=	SF
8
8
Lines 39-45 Link Here
39
FAME_CONFIGURE_ENABLE=		libfame
39
FAME_CONFIGURE_ENABLE=		libfame
40
FAME_LIB_DEPENDS=		libfame.so:multimedia/libfame
40
FAME_LIB_DEPENDS=		libfame.so:multimedia/libfame
41
FFMPEG_CONFIGURE_ENABLE=	ffmpeg
41
FFMPEG_CONFIGURE_ENABLE=	ffmpeg
42
FFMPEG_LIB_DEPENDS=		libavcodec0.so:multimedia/ffmpeg0
42
FFMPEG_LIB_DEPENDS=		libavcodec.so:multimedia/ffmpeg
43
GSL_CONFIGURE_ENABLE=		libgsl
43
GSL_CONFIGURE_ENABLE=		libgsl
44
GSL_LIB_DEPENDS=		libgsl.so:math/gsl
44
GSL_LIB_DEPENDS=		libgsl.so:math/gsl
45
VOLPACK_CONFIGURE_ENABLE=	libvolpack
45
VOLPACK_CONFIGURE_ENABLE=	libvolpack
Lines 53-60 Link Here
53
		${WRKSRC}/amide_config.h.in
53
		${WRKSRC}/amide_config.h.in
54
	@${REINPLACE_CMD} \
54
	@${REINPLACE_CMD} \
55
		-e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
55
		-e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
56
		-e 's|libavcodec|libavcodec0|g' \
57
		-e 's|libavutil|libavutil0|g' \
58
		${WRKSRC}/configure
56
		${WRKSRC}/configure
59
57
60
.include <bsd.port.mk>
58
.include <bsd.port.mk>
(-)files/patch-Makefile.in (-3 / +3 lines)
Lines 1-6 Link Here
1
--- Makefile.in.orig	2014-01-25 23:25:32.000000000 +0100
1
--- Makefile.in.orig	2014-01-27 03:04:32 UTC
2
+++ Makefile.in	2014-01-27 13:14:16.876831395 +0100
2
+++ Makefile.in
3
@@ -89,8 +89,7 @@
3
@@ -89,8 +89,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/g
4
 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
4
 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
5
 	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
5
 	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
6
 	$(top_srcdir)/configure.ac
6
 	$(top_srcdir)/configure.ac
(-)files/patch-configure (-8 / +8 lines)
Lines 1-6 Link Here
1
--- configure.orig	2014-01-27 04:04:34.000000000 +0100
1
--- configure.orig	2014-01-27 03:04:34 UTC
2
+++ configure	2014-01-29 13:12:46.268622841 +0100
2
+++ configure
3
@@ -16216,7 +16216,7 @@
3
@@ -16216,7 +16216,7 @@ if test "x$ac_cv_func_bind_textdomain_co
4
                DATADIRNAME=share
4
                DATADIRNAME=share
5
 else
5
 else
6
   CATOBJEXT=.mo
6
   CATOBJEXT=.mo
Lines 9-15 Link Here
9
 fi
9
 fi
10
 
10
 
11
 	    ;;
11
 	    ;;
12
@@ -16226,7 +16226,7 @@
12
@@ -16226,7 +16226,7 @@ fi
13
 	    ;;
13
 	    ;;
14
 	    *)
14
 	    *)
15
 	    CATOBJEXT=.mo
15
 	    CATOBJEXT=.mo
Lines 18-24 Link Here
18
 	    ;;
18
 	    ;;
19
 	    esac
19
 	    esac
20
 fi
20
 fi
21
@@ -16914,12 +16914,12 @@
21
@@ -16914,12 +16914,12 @@ else
22
 if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
22
 if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
23
   DATADIRNAME=share
23
   DATADIRNAME=share
24
 else
24
 else
Lines 33-39 Link Here
33
     ;;
33
     ;;
34
     esac
34
     esac
35
 fi
35
 fi
36
@@ -17612,8 +17612,8 @@
36
@@ -17612,8 +17612,8 @@ else
37
   THREAD_LIBS=""
37
   THREAD_LIBS=""
38
 fi
38
 fi
39
 
39
 
Lines 44-50 Link Here
44
 saved_libs="${LIBS}"
44
 saved_libs="${LIBS}"
45
 LIBS="${LIBS} ${AMIDE_LIBDCMDATA_LIBS}"
45
 LIBS="${LIBS} ${AMIDE_LIBDCMDATA_LIBS}"
46
 saved_cxxflags="${CXXFLAGS}"
46
 saved_cxxflags="${CXXFLAGS}"
47
@@ -18154,6 +18154,7 @@
47
@@ -18154,6 +18154,7 @@ $as_echo_n "checking for libfame - versi
48
       ac_save_CFLAGS="$CFLAGS"
48
       ac_save_CFLAGS="$CFLAGS"
49
       ac_save_LIBS="$LIBS"
49
       ac_save_LIBS="$LIBS"
50
       CFLAGS="$CFLAGS $LIBFAME_CFLAGS"
50
       CFLAGS="$CFLAGS $LIBFAME_CFLAGS"
Lines 52-58 Link Here
52
       LIBS="$LIBFAME_LIBS $LIBS"
52
       LIBS="$LIBFAME_LIBS $LIBS"
53
       rm -f conf.libfametest
53
       rm -f conf.libfametest
54
       if test "$cross_compiling" = yes; then :
54
       if test "$cross_compiling" = yes; then :
55
@@ -18165,6 +18166,7 @@
55
@@ -18165,6 +18166,7 @@ else
56
 #include <fame.h>
56
 #include <fame.h>
57
 #include <stdio.h>
57
 #include <stdio.h>
58
 #include <stdlib.h>
58
 #include <stdlib.h>
(-)files/patch-src-alignment_mutual_information.c (-3 / +3 lines)
Lines 1-5 Link Here
1
--- src/alignment_mutual_information.c.orig	2012-01-22 17:25:06.000000000 +0100
1
--- src/alignment_mutual_information.c.orig	2012-01-22 16:25:06 UTC
2
+++ src/alignment_mutual_information.c	2013-08-28 10:30:30.265534615 +0200
2
+++ src/alignment_mutual_information.c
3
@@ -28,6 +28,13 @@
3
@@ -28,6 +28,13 @@
4
 #include "amitk_data_set_DOUBLE_0D_SCALING.h"
4
 #include "amitk_data_set_DOUBLE_0D_SCALING.h"
5
 #include "alignment_mutual_information.h"
5
 #include "alignment_mutual_information.h"
Lines 14-20 Link Here
14
 /* this algorithm will calculate the amount of mutual information between two data sets in their current orientations    */
14
 /* this algorithm will calculate the amount of mutual information between two data sets in their current orientations    */
15
 /* it is a re-write of the original algorithm for purposes of improved speed. the hope is that it won't affect accuracy. */
15
 /* it is a re-write of the original algorithm for purposes of improved speed. the hope is that it won't affect accuracy. */
16
 /* rather than computing mutual information for the whole volume of data, the algorithm computes it for three orthogonal */
16
 /* rather than computing mutual information for the whole volume of data, the algorithm computes it for three orthogonal */
17
@@ -209,7 +216,7 @@
17
@@ -209,7 +216,7 @@ gdouble calculate_mutual_information(Ami
18
       //g_print("\t\%i", mutual_information_array[i][j] );  // for point-wise counts
18
       //g_print("\t\%i", mutual_information_array[i][j] );  // for point-wise counts
19
       // g_print("\t\%4.3f", incremental_mi );               // for point-wise probability
19
       // g_print("\t\%4.3f", incremental_mi );               // for point-wise probability
20
       
20
       
(-)files/patch-src_mpeg__encode.c (+72 lines)
Line 0 Link Here
1
--- src/mpeg_encode.c.orig	2014-01-23 20:13:52 UTC
2
+++ src/mpeg_encode.c
3
@@ -234,11 +234,11 @@ gpointer mpeg_encode_setup(gchar * outpu
4
 
5
   switch(type) {
6
   case ENCODE_MPEG4:
7
-    codec_type = CODEC_ID_MPEG4;
8
+    codec_type = AV_CODEC_ID_MPEG4;
9
     break;
10
   case ENCODE_MPEG1:
11
   default:
12
-    codec_type=CODEC_ID_MPEG1VIDEO;
13
+    codec_type=AV_CODEC_ID_MPEG1VIDEO;
14
     break;
15
   }
16
 
17
@@ -268,7 +268,7 @@ gpointer mpeg_encode_setup(gchar * outpu
18
     return NULL;
19
   }
20
 
21
-  encode->picture= avcodec_alloc_frame();
22
+  encode->picture= av_frame_alloc();
23
   if (!encode->picture) {
24
     g_warning("couldn't allocate memory for encode->picture");
25
     encode_free(encode);
26
@@ -293,7 +293,7 @@ gpointer mpeg_encode_setup(gchar * outpu
27
   encode->context->time_base= (AVRational){1,FRAMES_PER_SECOND};
28
   encode->context->gop_size = 10; /* emit one intra frame every ten frames */
29
   encode->context->max_b_frames=10;
30
-  encode->context->pix_fmt = PIX_FMT_YUV420P;
31
+  encode->context->pix_fmt = AV_PIX_FMT_YUV420P;
32
 
33
   /* encoding parameters */
34
   encode->context->sample_aspect_ratio= (AVRational){1,1}; /* our pixels are square */
35
@@ -355,6 +355,10 @@ gpointer mpeg_encode_setup(gchar * outpu
36
   encode->picture->linesize[1] = encode->context->width/2;
37
   encode->picture->linesize[2] = encode->context->width/2;
38
 
39
+  encode->picture->width = xsize;
40
+  encode->picture->height = ysize;
41
+  encode->picture->format = AV_PIX_FMT_YUV420P;
42
+
43
   return (gpointer) encode;
44
 }
45
 
46
@@ -362,14 +366,23 @@ gpointer mpeg_encode_setup(gchar * outpu
47
 gboolean mpeg_encode_frame(gpointer data, GdkPixbuf * pixbuf) {
48
   encode_t * encode = data;
49
   gint out_size;
50
+  AVPacket packet;
51
+  int ret, got_output = 0;
52
 
53
   convert_rgb_pixbuf_to_yuv(encode->yuv, pixbuf);
54
 
55
   /* encode the image */
56
-  out_size = avcodec_encode_video(encode->context, encode->output_buffer, encode->output_buffer_size, encode->picture);
57
-  fwrite(encode->output_buffer, 1, out_size, encode->output_file);
58
+  av_init_packet(&packet);
59
+  packet.data = encode->output_buffer;
60
+  packet.size = encode->output_buffer_size;
61
+  ret = avcodec_encode_video2(encode->context, &packet,
62
+			      encode->picture, &got_output);
63
+  if (ret < 0)
64
+      return FALSE;
65
 
66
-  return TRUE;
67
+  fwrite(encode->output_buffer, 1, packet.size, encode->output_file);
68
+
69
+  return !!got_output;
70
 };
71
 
72
 /* close everything up */

Return to bug 215240