Import of pkgsrc-2016Q3

This commit is contained in:
2016-10-14 07:49:11 +02:00
committed by Lionel Sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949749 additions and 377083 deletions

View File

@@ -1,21 +1,23 @@
# $NetBSD: Makefile,v 1.96 2015/06/30 09:57:40 ryoon Exp $
# $NetBSD: Makefile,v 1.103 2016/09/28 14:05:44 wiz Exp $
DISTNAME= transcode-1.1.7
PKGREVISION= 15
PKGREVISION= 21
CATEGORIES= multimedia
#MASTER_SITES= http://download.berlios.de/tcforge/
MASTER_SITES= http://bitbucket.org/france/transcode-tcforge/downloads/
EXTRACT_SUFX= .tar.bz2
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://tcforge.berlios.de/
HOMEPAGE= https://bitbucket.org/achurch_/transcode/wiki/Home
# or https://bitbucket.org/france/transcode-tcforge/wiki/Home
COMMENT= Command line video-stream processing tool
LICENSE= gnu-gpl-v2
USE_LANGUAGES= c c++
USE_LIBTOOL= yes
USE_TOOLS+= awk:run gmake pkg-config
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --disable-xio
CONFIGURE_ARGS+= --enable-freetype2
CONFIGURE_ARGS+= --enable-libmpeg2
CONFIGURE_ARGS+= --enable-libmpeg2convert
CONFIGURE_ARGS+= --enable-libpostproc
@@ -31,12 +33,12 @@ PTHREAD_OPTS= require
.include "../../mk/bsd.prefs.mk"
PLIST_VARS+= i386 oss x11
.if ${MACHINE_ARCH} == "i386"
PLIST.i386= yes
.endif
PLIST_VARS+= i386 oss x11
.if ${OPSYS} != "Darwin"
CONFIGURE_ARGS+= --enable-oss
PLIST.oss= yes
@@ -52,7 +54,7 @@ LIBS+= ${LIBOSSAUDIO}
.include "../../devel/zlib/buildlink3.mk"
.include "../../graphics/freetype2/buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
.include "../../multimedia/ffmpeg1/buildlink3.mk"
.include "../../multimedia/ffmpeg2/buildlink3.mk"
.include "../../multimedia/libdvdread/buildlink3.mk"
.include "../../multimedia/libmpeg2/buildlink3.mk"
.include "../../multimedia/libogg/buildlink3.mk"

View File

@@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.17 2012/07/07 15:50:19 adam Exp $
@comment $NetBSD: PLIST,v 1.19 2016/05/16 19:41:17 adam Exp $
bin/avifix
bin/aviindex
bin/avimerge
@@ -25,6 +25,7 @@ lib/transcode/export_ffmpeg.la
${PLIST.imagemagick}lib/transcode/export_im.la
lib/transcode/export_jpg.la
lib/transcode/export_lame.la
${PLIST.lzo}lib/transcode/export_lzo.la
lib/transcode/export_mp2.la
${PLIST.mjpegtools}lib/transcode/export_mp2enc.la
${PLIST.mjpegtools}lib/transcode/export_mpeg2enc.la
@@ -40,7 +41,6 @@ lib/transcode/export_wav.la
lib/transcode/export_xvid.so
lib/transcode/export_xvid4.la
${PLIST.mjpegtools}lib/transcode/export_yuv4mpeg.la
${PLIST.lzo}lib/transcode/export_lzo.la
lib/transcode/filter_29to23.la
lib/transcode/filter_32detect.la
lib/transcode/filter_32drop.la
@@ -89,7 +89,7 @@ lib/transcode/filter_smooth.la
lib/transcode/filter_stabilize.la
${PLIST.x11}lib/transcode/filter_subtitler.la
lib/transcode/filter_testframe.la
${PLIST.freetype2}lib/transcode/filter_text.la
lib/transcode/filter_text.la
${PLIST.i386}lib/transcode/filter_tomsmocomp.la
lib/transcode/filter_transform.la
lib/transcode/filter_unsharp.la

View File

@@ -1,17 +1,27 @@
$NetBSD: distinfo,v 1.23 2013/12/13 20:54:03 markd Exp $
$NetBSD: distinfo,v 1.26 2016/05/16 19:41:17 adam Exp $
SHA1 (transcode-1.1.7.tar.bz2) = e35df68b960eb56ef0a59a4cdbed1491be56aee6
RMD160 (transcode-1.1.7.tar.bz2) = faa854acbbfd52faaa216505176f94d756d77841
SHA512 (transcode-1.1.7.tar.bz2) = d6f9674f3f5c3346194120585741ca660eb9ee133085cfce9460a14eaa0cf16fdf291761bd1db78e1c784e4d69a9481c7470cf8357dc7638ee3017620500f45f
Size (transcode-1.1.7.tar.bz2) = 2183627 bytes
SHA1 (patch-ac) = 3a738bc76d427d28a1c03edfcef7dc227537bc3b
SHA1 (patch-aw) = a2a118bad9e3783f98e8cbfa62cff8771118ac17
SHA1 (patch-ax) = 4e767e6ab77e49bb375de55457e3956e1531c7bb
SHA1 (patch-ba) = 92f31ca0d49cee2883d278b443b1d616381fee2d
SHA1 (patch-encode_encode_lavc.c) = b93926d54f149fabfc35051c7bfb800efd3892cf
SHA1 (patch-export_export_ffmpeg.c) = 1559892fb1c13c3bd6be32ae9b5a1d04348139e9
SHA1 (patch-export_ffmpeg_cfg.c) = c48acb7c9163f45fc1aa02216e083594fee67331
SHA1 (patch-avilib_avidump.c) = 640aac6fc274a685b1847b48870b37b2c2ab1e88
SHA1 (patch-configure) = 38418cd91750f55828124b5895d42d3af5c2d56a
SHA1 (patch-encode_encode_lavc.c) = c33f40dab212b601e5d808d972d132db4eee2d2e
SHA1 (patch-export_aud__aux.c) = 84b774d13e363721db692b1edc53589e165b094e
SHA1 (patch-export_export__im.c) = 3a4f08d548cdebdfa618aeff2df398bd61002120
SHA1 (patch-export_export_ffmpeg.c) = 4367d16ba83ccc5c868f0dc470dcd0b64770b185
SHA1 (patch-export_ffmpeg_cfg.c) = 216f7970f3885a3f7fc8c229e4d1950cd6430cff
SHA1 (patch-export_ffmpeg_cfg.h) = 7cf230de948de004cc0500f0ae2511561081e952
SHA1 (patch-filter_filter__compare.c) = b866aa3f36607bee87aad4eb7023b0e5087b1c25
SHA1 (patch-filter_filter__logo.c) = 4cff9a4123797d3a25df17b22f3922260ed3a7d4
SHA1 (patch-filter_filter__logoaway.c) = 252986a1e3ce9969e97bfeedd63bec6e3cf6273c
SHA1 (patch-filter_filter__pp.c) = a7a3f9c49e65e87bed343dd2d045457341e42114
SHA1 (patch-filter_subtitler_load_font.c) = 2c496c63f4fe27190761d170cc825633eb63c11f
SHA1 (patch-import_decode_lavc.c) = 2a3b9b9f0909794a9fba0f13901121dd48fc9f5f
SHA1 (patch-import_import_ffmpeg.c) = 2b1782d0d87de873f2d5e8397a8f3a1b618e21d4
SHA1 (patch-import_probe_ffmpeg.c) = c755ed421f7cae0d89555c9faffcdce8610178ea
SHA1 (patch-libtc_tcavcodec.h) = 9c8ea3ac1b8bc048becb92ae1e854911cfd6c3eb
SHA1 (patch-import_decode_lavc.c) = adf9274c5085012adcfeeb2f2366600155f0994c
SHA1 (patch-import_import__im.c) = 30fdb4ce905c0bdd959964b1455f31823b681e9e
SHA1 (patch-import_import__imlist.c) = 677ffc2c4ed48ab1e9f4f3f4a28f53b368ae7651
SHA1 (patch-import_import_ffmpeg.c) = bbbbdec6a1c20a9c02a1e2ef4cca10919eb2854c
SHA1 (patch-import_nuv_import__nuv.c) = e4a57c29b97b23aed068c06a2ed29dd9e29a9919
SHA1 (patch-import_probe_ffmpeg.c) = 6bbf65b513e999ac770bafc6aa9b508bfdb5ae15
SHA1 (patch-import_probe_im.c) = 27bce069c78e5eee94c14d3f5f03cc14145f85ac
SHA1 (patch-libtc_tcavcodec.h) = 6fcef1e338e53c974b295b1a10b2cb06e6fcfbd3

View File

@@ -1,12 +1,8 @@
# $NetBSD: options.mk,v 1.8 2010/05/08 16:04:05 drochner Exp $
#
# $NetBSD: options.mk,v 1.9 2015/11/21 17:14:26 adam Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.transcode
PKG_SUPPORTED_OPTIONS= a52 freetype2 mjpegtools lzo libxml2
PKG_SUPPORTED_OPTIONS+= dv imagemagick x264 faac
PKG_SUGGESTED_OPTIONS= a52 freetype2 mjpegtools libxml2
PKG_SUGGESTED_OPTIONS+= imagemagick x264
PKG_SUPPORTED_OPTIONS= a52 dv faac imagemagick mjpegtools lzo libxml2 x264
PKG_SUGGESTED_OPTIONS= a52 imagemagick mjpegtools libxml2 x264
.include "../../mk/bsd.options.mk"
@@ -21,14 +17,6 @@ PLIST.a52= yes
CONFIGURE_ARGS+= --disable-a52
.endif
.if !empty(PKG_OPTIONS:Mfreetype2)
. include "../../graphics/freetype2/buildlink3.mk"
CONFIGURE_ARGS+= --enable-freetype2
PLIST.freetype2= yes
.else
CONFIGURE_ARGS+= --disable-freetype2
.endif
.if !empty(PKG_OPTIONS:Mmjpegtools)
. include "../../multimedia/mjpegtools/buildlink3.mk"
PLIST.mjpegtools= yes

View File

@@ -1,31 +0,0 @@
$NetBSD: patch-ac,v 1.6 2012/10/10 13:37:25 drochner Exp $
--- configure.orig 2011-11-19 16:50:37.000000000 +0000
+++ configure
@@ -5096,7 +5096,7 @@ case "${target_os}" in
$as_echo "#define OS_LINUX 1" >>confdefs.h
;;
- freebsd*|openbsd*|netbsd*|bsdi*|darwin*|rhapsody*)
+ freebsd*|openbsd*|netbsd*|bsdi*|darwin*|rhapsody*|dragonfly*)
is_bsd=yes
$as_echo "#define OS_BSD 1" >>confdefs.h
@@ -19431,7 +19431,7 @@ case "$host" in
esac
# let user override
if test -n "$PTHREAD_LIBS" ; then
- pthread_libs="$PTHREAD_LIBS"
+ pthread_libs="$PTHREAD_LIBS $PTHREAD_LDFLAGS"
fi
if test -n "$PTHREAD_CFLAGS" ; then
pthread_cflags="$PTHREAD_CFLAGS"
@@ -29507,7 +29507,7 @@ if test "${enable_nuv+set}" = set; then
yes) if test yes != "$have_lzo"; then
as_fn_error $? "liblzo2 is required for NuppelVideo support, try --enable-lzo" "$LINENO" 5
fi
- if test true == "$have_x86_64cpu"; then
+ if test true = "$have_x86_64cpu"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: NuppelVideo support on x86_64 platform is ***EXPERIMENTAL***" >&5
$as_echo "$as_me: WARNING: NuppelVideo support on x86_64 platform is ***EXPERIMENTAL***" >&2;}
elif test true != "$have_x86cpu"; then

View File

@@ -1,4 +1,6 @@
$NetBSD: patch-ax,v 1.4 2012/10/10 13:37:25 drochner Exp $
$NetBSD: patch-avilib_avidump.c,v 1.1 2015/11/21 17:14:26 adam Exp $
Compatibility fix.
--- avilib/avidump.c.orig 2012-02-01 17:07:24.000000000 +0000
+++ avilib/avidump.c

View File

@@ -0,0 +1,114 @@
$NetBSD: patch-configure,v 1.2 2016/05/16 19:41:17 adam Exp $
Fix for ImageMagic v7.
Add DragonFly support.
Make use of PTHREAD_LDFLAGS.
Portability fix.
--- configure.orig 2011-11-19 16:50:37.000000000 +0000
+++ configure
@@ -1868,7 +1868,7 @@ Optional Packages:
--with-imagemagick-prefix=PFX
prefix where imagemagick is installed (/usr)
--with-imagemagick-includes=DIR
- directory where imagemagick headers (magick/api.h)
+ directory where imagemagick headers (MagickCore/MagickCore.h)
are installed (/usr/include)
--with-imagemagick-libs=DIR
directory where imagemagick libraries (libnone.so)
@@ -5096,7 +5096,7 @@ case "${target_os}" in
$as_echo "#define OS_LINUX 1" >>confdefs.h
;;
- freebsd*|openbsd*|netbsd*|bsdi*|darwin*|rhapsody*)
+ freebsd*|openbsd*|netbsd*|bsdi*|darwin*|rhapsody*|dragonfly*)
is_bsd=yes
$as_echo "#define OS_BSD 1" >>confdefs.h
@@ -19431,7 +19431,7 @@ case "$host" in
esac
# let user override
if test -n "$PTHREAD_LIBS" ; then
- pthread_libs="$PTHREAD_LIBS"
+ pthread_libs="$PTHREAD_LIBS $PTHREAD_LDFLAGS"
fi
if test -n "$PTHREAD_CFLAGS" ; then
pthread_cflags="$PTHREAD_CFLAGS"
@@ -27651,7 +27651,7 @@ if test x"$enable_imagemagick" = x"yes"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pkgconfig support for imagemagick" >&5
$as_echo_n "checking for pkgconfig support for imagemagick... " >&6; }
if test x"$PKG_CONFIG" != x"no" ; then
- if $PKG_CONFIG Wand --exists ; then
+ if $PKG_CONFIG MagickWand --exists ; then
pkg_config_imagemagick="yes"
fi
fi
@@ -27720,7 +27720,7 @@ $as_echo_n "checking how to determine IM
$as_echo "user" >&6; }
else
if test x"$pkg_config_imagemagick" != x"no" ; then
- imagemagick_ii="`$PKG_CONFIG Wand --cflags`"
+ imagemagick_ii="`$PKG_CONFIG MagickWand --cflags`"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: pkg-config" >&5
$as_echo "pkg-config" >&6; }
else
@@ -27753,10 +27753,10 @@ $as_echo "default" >&6; }
IMAGEMAGICK_EXTRA_CFLAGS="$IMAGEMAGICK_EXTRA_CFLAGS $xi"
IMAGEMAGICK_EXTRA_CFLAGS="`echo $IMAGEMAGICK_EXTRA_CFLAGS | sed -e 's/ */ /g'`"
- if test x"magick/api.h" != x"none" ; then
+ if test x"MagickCore/MagickCore.h" != x"none" ; then
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $imagemagick_ii"
- ac_fn_c_check_header_mongrel "$LINENO" "magick/api.h" "ac_cv_header_magick_api_h" "$ac_includes_default"
+ ac_fn_c_check_header_mongrel "$LINENO" "MagickCore/MagickCore.h" "ac_cv_header_magick_api_h" "$ac_includes_default"
if test "x$ac_cv_header_magick_api_h" = xyes; then :
IMAGEMAGICK_CFLAGS="$imagemagick_ii"
else
@@ -27771,8 +27771,8 @@ if test x"no" != x"optional" ; then
else
prob="option '--enable-imagemagick' failed"
fi
- msg="ERROR: $prob: cannot compile magick/api.h
-magick/api.h can be found in the following packages:
+ msg="ERROR: $prob: cannot compile MagickCore/MagickCore.h
+MagickCore/MagickCore.h can be found in the following packages:
Wand http://www.imagemagick.org/
"
@@ -27784,7 +27784,7 @@ fi
CPPFLAGS="$save_CPPFLAGS"
elif test x"$pkg_config_imagemagick" != x"no" ; then
- IMAGEMAGICK_CFLAGS="`$PKG_CONFIG Wand --cflags`"
+ IMAGEMAGICK_CFLAGS="`$PKG_CONFIG MagickWand --cflags`"
fi
# get and test the _LIBS
@@ -27797,7 +27797,7 @@ $as_echo_n "checking how to determine IM
$as_echo "user" >&6; }
else
if test x"$pkg_config_imagemagick" != x"no" ; then
- imagemagick_ll="`$PKG_CONFIG Wand --libs`"
+ imagemagick_ll="`$PKG_CONFIG MagickWand --libs`"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: pkg-config" >&5
$as_echo "pkg-config" >&6; }
else
@@ -27900,7 +27900,7 @@ fi
LDFLAGS="$save_LDFLAGS"
elif test x"$pkg_config_imagemagick" != x"no" ; then
- IMAGEMAGICK_LIBS="`$PKG_CONFIG Wand --libs`"
+ IMAGEMAGICK_LIBS="`$PKG_CONFIG MagickWand --libs`"
fi
if test x"$this_pkg_err" = x"no" ; then
@@ -29507,7 +29507,7 @@ if test "${enable_nuv+set}" = set; then
yes) if test yes != "$have_lzo"; then
as_fn_error $? "liblzo2 is required for NuppelVideo support, try --enable-lzo" "$LINENO" 5
fi
- if test true == "$have_x86_64cpu"; then
+ if test true = "$have_x86_64cpu"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: NuppelVideo support on x86_64 platform is ***EXPERIMENTAL***" >&5
$as_echo "$as_me: WARNING: NuppelVideo support on x86_64 platform is ***EXPERIMENTAL***" >&2;}
elif test true != "$have_x86cpu"; then

View File

@@ -1,20 +1,102 @@
$NetBSD: patch-encode_encode_lavc.c,v 1.1 2012/11/17 21:46:44 markd Exp $
$NetBSD: patch-encode_encode_lavc.c,v 1.2 2015/11/21 17:14:26 adam Exp $
Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
Fixes building against FFmpeg version >= 2.0.0 (gentoo patch).
--- encode/encode_lavc.c.orig 2011-11-19 16:50:27.000000000 +0000
+++ encode/encode_lavc.c
@@ -114,6 +114,7 @@ struct tclavcprivatedata_ {
@@ -74,6 +74,9 @@ struct tclavcconfigdata_ {
int lmin;
int lmax;
int me_method;
+ int luma_elim_threshold;
+ int chroma_elim_threshold;
+ int quantizer_noise_shaping;
/* same as above for flags */
struct {
@@ -114,6 +117,7 @@ struct tclavcprivatedata_ {
AVFrame ff_venc_frame;
AVCodecContext ff_vcontext;
+ AVDictionary ** ff_opts;
+ AVDictionary * ff_opts;
AVCodec *ff_vcodec;
@@ -1036,14 +1037,10 @@ static void tc_lavc_dispatch_settings(TC
@@ -164,6 +168,7 @@ static const TCCodecID tc_lavc_codecs_ou
TC_CODEC_ERROR
};
+#if LIBAVCODEC_VERSION_MAJOR < 55
static const enum CodecID tc_lavc_internal_codecs[] = {
CODEC_ID_MPEG1VIDEO, CODEC_ID_MPEG2VIDEO, CODEC_ID_MPEG4,
CODEC_ID_H263I, CODEC_ID_H263P,
@@ -176,6 +181,20 @@ static const enum CodecID tc_lavc_intern
CODEC_ID_MSMPEG4V2, CODEC_ID_MSMPEG4V3,
CODEC_ID_NONE
};
+#else
+static const enum AVCodecID tc_lavc_internal_codecs[] = {
+ AV_CODEC_ID_MPEG1VIDEO, AV_CODEC_ID_MPEG2VIDEO, AV_CODEC_ID_MPEG4,
+ AV_CODEC_ID_H263I, AV_CODEC_ID_H263P,
+ AV_CODEC_ID_H264,
+ AV_CODEC_ID_WMV1, AV_CODEC_ID_WMV2,
+ AV_CODEC_ID_RV10,
+ AV_CODEC_ID_HUFFYUV, AV_CODEC_ID_FFV1,
+ AV_CODEC_ID_DVVIDEO,
+ AV_CODEC_ID_MJPEG, AV_CODEC_ID_LJPEG,
+ AV_CODEC_ID_MSMPEG4V2, AV_CODEC_ID_MSMPEG4V3,
+ AV_CODEC_ID_NONE
+};
+#endif
static const TCFormatID tc_lavc_formats[] = { TC_FORMAT_ERROR };
@@ -937,7 +956,11 @@ static int tc_lavc_settings_from_vob(TCL
static void tc_lavc_config_defaults(TCLavcPrivateData *pd)
{
/* first of all reinitialize lavc data */
+#if LIBAVCODEC_VERSION_MAJOR < 55
avcodec_get_context_defaults(&pd->ff_vcontext);
+#else
+ avcodec_get_context_defaults3(&pd->ff_vcontext, NULL);
+#endif
pd->confdata.thread_count = 1;
@@ -955,8 +978,6 @@ static void tc_lavc_config_defaults(TCLa
/*
* context *transcode* (not libavcodec) defaults
*/
- pd->ff_vcontext.mb_qmin = 2;
- pd->ff_vcontext.mb_qmax = 31;
pd->ff_vcontext.max_qdiff = 3;
pd->ff_vcontext.max_b_frames = 0;
pd->ff_vcontext.me_range = 0;
@@ -977,8 +998,8 @@ static void tc_lavc_config_defaults(TCLa
pd->ff_vcontext.mpeg_quant = 0;
pd->ff_vcontext.rc_initial_cplx = 0.0;
pd->ff_vcontext.rc_qsquish = 1.0;
- pd->ff_vcontext.luma_elim_threshold = 0;
- pd->ff_vcontext.chroma_elim_threshold = 0;
+ pd->confdata.luma_elim_threshold = 0;
+ pd->confdata.chroma_elim_threshold = 0;
pd->ff_vcontext.strict_std_compliance = 0;
pd->ff_vcontext.dct_algo = FF_DCT_AUTO;
pd->ff_vcontext.idct_algo = FF_IDCT_AUTO;
@@ -1002,7 +1023,7 @@ static void tc_lavc_config_defaults(TCLa
pd->ff_vcontext.intra_quant_bias = FF_DEFAULT_QUANT_BIAS;
pd->ff_vcontext.inter_quant_bias = FF_DEFAULT_QUANT_BIAS;
pd->ff_vcontext.noise_reduction = 0;
- pd->ff_vcontext.quantizer_noise_shaping = 0;
+ pd->confdata.quantizer_noise_shaping = 0;
pd->ff_vcontext.flags = 0;
}
@@ -1034,16 +1055,11 @@ static void tc_lavc_dispatch_settings(TC
pd->ff_vcontext.flags = 0;
SET_FLAG(pd, mv0);
SET_FLAG(pd, cbp);
- SET_FLAG(pd, cbp);
SET_FLAG(pd, qpel);
- SET_FLAG(pd, alt);
- SET_FLAG(pd, vdpart);
@@ -27,28 +109,69 @@ Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
SET_FLAG(pd, psnr);
SET_FLAG(pd, trell);
SET_FLAG(pd, gray);
@@ -1064,6 +1061,18 @@ static void tc_lavc_dispatch_settings(TC
@@ -1064,6 +1080,30 @@ static void tc_lavc_dispatch_settings(TC
pd->ff_vcontext.flags |= CODEC_FLAG_INTERLACED_DCT;
pd->ff_vcontext.flags |= CODEC_FLAG_INTERLACED_ME;
}
+ if (pd->confdata.flags.alt) {
+ av_dict_set(pd->ff_opts, "alternate_scan", "1", 0);
+ av_dict_set(&(pd->ff_opts), "alternate_scan", "1", 0);
+ }
+ if (pd->confdata.flags.vdpart) {
+ av_dict_set(pd->ff_opts, "data_partitioning", "1", 0);
+ av_dict_set(&(pd->ff_opts), "data_partitioning", "1", 0);
+ }
+ if (pd->confdata.flags.umv) {
+ av_dict_set(pd->ff_opts, "umv", "1", 0);
+ av_dict_set(&(pd->ff_opts), "umv", "1", 0);
+ }
+ if (pd->confdata.flags.aiv) {
+ av_dict_set(pd->ff_opts, "aiv", "1", 0);
+ av_dict_set(&(pd->ff_opts), "aiv", "1", 0);
+ }
+ if (pd->confdata.flags.cbp) {
+ av_dict_set(&(pd->ff_opts), "mpv_flags", "+cbp_rd", 0);
+ }
+
+ char buf[1024];
+#define set_dict_opt(val, opt) \
+ snprintf(buf, sizeof(buf), "%i", pd->confdata.val);\
+ av_dict_set(&(pd->ff_opts), opt, buf, 0)
+
+ set_dict_opt(luma_elim_threshold, "luma_elim_threshold");
+ set_dict_opt(chroma_elim_threshold, "chroma_elim_threshold");
+ set_dict_opt(quantizer_noise_shaping, "quantizer_noise_shaping");
}
#undef SET_FLAG
@@ -1184,18 +1193,18 @@ static int tc_lavc_read_config(TCLavcPri
@@ -1116,8 +1156,6 @@ static int tc_lavc_read_config(TCLavcPri
// handled by transcode core
// { "vqmax", PCTX(qmax), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 60 },
// handled by transcode core
- { "mbqmin", PCTX(mb_qmin), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 60 },
- { "mbqmax", PCTX(mb_qmax), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 60 },
{ "lmin", PAUX(lmin), TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.01, 255.0 },
{ "lmax", PAUX(lmax), TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.01, 255.0 },
{ "vqdiff", PCTX(max_qdiff), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31 },
@@ -1150,8 +1188,8 @@ static int tc_lavc_read_config(TCLavcPri
{ "vrc_init_cplx", PCTX(rc_initial_cplx), TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.0, 9999999.0 },
// { "vrc_init_occupancy", }, // not yet supported
{ "vqsquish", PCTX(rc_qsquish), TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.0, 99.0 },
- { "vlelim", PCTX(luma_elim_threshold), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -99, 99 },
- { "vcelim", PCTX(chroma_elim_threshold), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -99, 99 },
+ { "vlelim", PAUX(luma_elim_threshold), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -99, 99 },
+ { "vcelim", PAUX(chroma_elim_threshold), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -99, 99 },
{ "vstrict", PCTX(strict_std_compliance), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -99, 99 },
{ "vpsize", PCTX(rtp_payload_size), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 100000000 },
{ "dct", PCTX(dct_algo), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 10 },
@@ -1177,25 +1215,25 @@ static int tc_lavc_read_config(TCLavcPri
{ "ibias", PCTX(intra_quant_bias), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -512, 512 },
{ "pbias", PCTX(inter_quant_bias), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -512, 512 },
{ "nr", PCTX(noise_reduction), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 1000000},
- { "qns", PCTX(quantizer_noise_shaping), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 3 },
+ { "qns", PAUX(quantizer_noise_shaping), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 3 },
{ "inter_matrix_file", inter_matrix_file, TCCONF_TYPE_STRING, 0, 0, 0 },
{ "intra_matrix_file", intra_matrix_file, TCCONF_TYPE_STRING, 0, 0, 0 },
{ "mv0", PAUX(flags.mv0), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_MV0 },
{ "cbp", PAUX(flags.cbp), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_CBP_RD },
- { "cbp", PAUX(flags.cbp), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_CBP_RD },
+ { "cbp", PAUX(flags.cbp), TCCONF_TYPE_FLAG, 0, 0, 1 },
{ "qpel", PAUX(flags.qpel), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_QPEL },
- { "alt", PAUX(flags.alt), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_ALT_SCAN },
+ { "alt", PAUX(flags.alt), TCCONF_TYPE_FLAG, 0, 0, 1 },
@@ -69,7 +192,16 @@ Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
{ "psnr", PAUX(flags.psnr), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_PSNR },
#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
{ "trell", PAUX(flags.trell), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_TRELLIS_QUANT },
@@ -1387,7 +1396,7 @@ static int tc_lavc_configure(TCModuleIns
@@ -1345,6 +1383,8 @@ static int tc_lavc_configure(TCModuleIns
pd = self->userdata;
+ pd->ff_opts = NULL;
+
pd->flush_flag = vob->encoder_flush;
/* FIXME: move into core? */
@@ -1387,7 +1427,7 @@ static int tc_lavc_configure(TCModuleIns
pd->confdata.thread_count,
(pd->confdata.thread_count > 1) ?"s" :"");
}
@@ -78,12 +210,12 @@ Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
pd->ff_vcodec = avcodec_find_encoder(FF_VCODEC_ID(pd));
if (pd->ff_vcodec == NULL) {
@@ -1397,11 +1406,11 @@ static int tc_lavc_configure(TCModuleIns
@@ -1397,11 +1437,11 @@ static int tc_lavc_configure(TCModuleIns
}
TC_LOCK_LIBAVCODEC;
- ret = avcodec_open(&pd->ff_vcontext, pd->ff_vcodec);
+ ret = avcodec_open2(&pd->ff_vcontext, pd->ff_vcodec, pd->ff_opts);
+ ret = avcodec_open2(&pd->ff_vcontext, pd->ff_vcodec, &(pd->ff_opts));
TC_UNLOCK_LIBAVCODEC;
if (ret < 0) {

View File

@@ -0,0 +1,24 @@
$NetBSD: patch-export_aud__aux.c,v 1.1 2015/11/21 17:14:26 adam Exp $
Fixes building against FFmpeg version >= 2.0.0 (gentoo patch).
--- export/aud_aux.c.orig 2011-11-19 16:50:27.000000000 +0000
+++ export/aud_aux.c
@@ -346,7 +346,7 @@ static int tc_audio_init_ffmpeg(vob_t *v
//-- set parameters (bitrate, channels and sample-rate) --
//--------------------------------------------------------
- avcodec_get_context_defaults(&mpa_ctx);
+ avcodec_get_context_defaults3(&mpa_ctx, mpa_codec);
#if LIBAVCODEC_VERSION_MAJOR < 53
mpa_ctx.codec_type = CODEC_TYPE_AUDIO;
#else
@@ -359,7 +359,7 @@ static int tc_audio_init_ffmpeg(vob_t *v
//-- open codec --
//----------------
TC_LOCK_LIBAVCODEC;
- ret = avcodec_open(&mpa_ctx, mpa_codec);
+ ret = avcodec_open2(&mpa_ctx, mpa_codec, NULL);
TC_UNLOCK_LIBAVCODEC;
if (ret < 0) {
tc_warn("tc_audio_init_ffmpeg: could not open %s codec !",

View File

@@ -0,0 +1,24 @@
$NetBSD: patch-export_export__im.c,v 1.1 2016/05/16 19:41:17 adam Exp $
Fix for ImageMagick v7.
--- export/export_im.c.orig 2016-05-15 12:41:44.000000000 +0000
+++ export/export_im.c
@@ -23,7 +23,7 @@
/* Note: because of ImageMagick bogosity, this must be included first, so
* we can undefine the PACKAGE_* symbols it splats into our namespace */
-#include <magick/api.h>
+#include <MagickCore/MagickCore.h>
#undef PACKAGE_BUGREPORT
#undef PACKAGE_NAME
#undef PACKAGE_STRING
@@ -197,7 +197,7 @@ MOD_encode
strlcpy(image->filename, buf2, MaxTextExtent);
- WriteImage(image_info, image);
+ WriteImage(image_info, image, &exception_info);
DestroyImage(image);
return(0);

View File

@@ -1,6 +1,6 @@
$NetBSD: patch-export_export_ffmpeg.c,v 1.1 2012/11/17 21:46:44 markd Exp $
$NetBSD: patch-export_export_ffmpeg.c,v 1.2 2015/11/21 17:14:26 adam Exp $
Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
Fixes building against FFmpeg version >= 2.0.0 (gentoo patch).
--- export/export_ffmpeg.c.orig 2011-11-19 16:50:27.000000000 +0000
+++ export/export_ffmpeg.c
@@ -8,7 +8,7 @@ Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
static AVFrame *lavc_convert_frame = NULL;
static AVCodec *lavc_venc_codec = NULL;
+static AVDictionary **lavc_venc_opts = NULL;
+static AVDictionary *lavc_venc_opts = NULL;
static AVFrame *lavc_venc_frame = NULL;
static AVCodecContext *lavc_venc_context;
static avi_t *avifile = NULL;
@@ -29,6 +29,15 @@ Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
avcodec_register_all();
TC_UNLOCK_LIBAVCODEC;
@@ -486,7 +486,7 @@ MOD_init
codec->name, codec->fourCC, codec->comments);
}
- lavc_venc_context = avcodec_alloc_context();
+ lavc_venc_context = avcodec_alloc_context3(lavc_venc_codec);
lavc_venc_frame = avcodec_alloc_frame();
lavc_convert_frame= avcodec_alloc_frame();
@@ -634,7 +634,7 @@ MOD_init
lavc_param_rc_max_rate = 2516;
lavc_param_rc_buffer_size = 224 * 8;
@@ -47,7 +56,32 @@ Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
break;
@@ -887,7 +887,7 @@ MOD_init
@@ -838,8 +838,13 @@ MOD_init
lavc_venc_context->rc_strategy = lavc_param_vrc_strategy;
lavc_venc_context->b_frame_strategy = lavc_param_vb_strategy;
lavc_venc_context->b_quant_offset = lavc_param_vb_qoffset;
- lavc_venc_context->luma_elim_threshold= lavc_param_luma_elim_threshold;
- lavc_venc_context->chroma_elim_threshold= lavc_param_chroma_elim_threshold;
+
+ char buf[1024];
+#define set_dict_opt(val, opt) \
+ snprintf(buf, sizeof(buf), "%i", val); \
+ av_dict_set(&lavc_venc_opts, opt, buf, 0)
+ set_dict_opt(lavc_param_luma_elim_threshold, "luma_elim_threshold");
+ set_dict_opt(lavc_param_chroma_elim_threshold, "chroma_elim_threshold");
lavc_venc_context->rtp_payload_size = lavc_param_packet_size;
#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
if (lavc_param_packet_size)
@@ -870,7 +875,7 @@ MOD_init
lavc_venc_context->context_model = lavc_param_context;
lavc_venc_context->scenechange_threshold= lavc_param_sc_threshold;
lavc_venc_context->noise_reduction = lavc_param_noise_reduction;
- lavc_venc_context->inter_threshold = lavc_param_inter_threshold;
+ set_dict_opt(lavc_param_inter_threshold, "inter_threshold");
lavc_venc_context->intra_dc_precision = lavc_param_intra_dc_precision;
lavc_venc_context->skip_top = lavc_param_skip_top;
lavc_venc_context->skip_bottom = lavc_param_skip_bottom;
@@ -887,7 +892,7 @@ MOD_init
lavc_venc_context->thread_count);
}
@@ -56,59 +90,66 @@ Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
if (lavc_param_intra_matrix) {
char *tmp;
@@ -1065,15 +1065,10 @@ MOD_init
@@ -1065,15 +1070,12 @@ MOD_init
lavc_venc_context->flags |= lavc_param_closedgop;
lavc_venc_context->flags |= lavc_param_trunc;
lavc_venc_context->flags |= lavc_param_aic;
- lavc_venc_context->flags |= lavc_param_umv;
lavc_venc_context->flags |= lavc_param_v4mv;
- lavc_venc_context->flags |= lavc_param_data_partitioning;
lavc_venc_context->flags |= lavc_param_cbp;
- lavc_venc_context->flags |= lavc_param_cbp;
+ if(lavc_param_cbp)
+ av_dict_set(&lavc_venc_opts, "mpv_flags", "+cbp_rd", 0);
lavc_venc_context->flags |= lavc_param_mv0;
lavc_venc_context->flags |= lavc_param_qp_rd;
- lavc_venc_context->flags |= lavc_param_qp_rd;
- lavc_venc_context->flags |= lavc_param_scan_offset;
- lavc_venc_context->flags |= lavc_param_ss;
- lavc_venc_context->flags |= lavc_param_alt;
+ if(lavc_param_qp_rd)
+ av_dict_set(&lavc_venc_opts, "mpv_flags", "+qp_rd", 0);
lavc_venc_context->flags |= lavc_param_ilme;
#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
lavc_venc_context->flags |= lavc_param_trell;
@@ -1203,7 +1198,6 @@ MOD_init
@@ -1203,9 +1205,8 @@ MOD_init
lavc_venc_context->me_method = ME_ZERO + lavc_param_vme;
-
/* FIXME: transcode itself contains "broken ffmpeg default settings", thus we need to override them! */
if (lavc_param_video_preset) {
- if (lavc_param_video_preset) {
+ if (lavc_param_video_preset && strcmp(lavc_param_video_preset, "none")) {
avcodec_opts[AVMEDIA_TYPE_VIDEO] = lavc_venc_context;
@@ -1241,20 +1235,39 @@ MOD_init
video_codec_name = ffmpeg_codec_name(codec->name);
@@ -1241,20 +1242,39 @@ MOD_init
}
}
+ if (lavc_param_scan_offset) {
+ av_dict_set(lavc_venc_opts, "scan_offset", "1", 0);
+ av_dict_set(&lavc_venc_opts, "scan_offset", "1", 0);
+ }
+
+ if (lavc_param_ss) {
+ av_dict_set(lavc_venc_opts, "structured_slices", "1", 0);
+ av_dict_set(&lavc_venc_opts, "structured_slices", "1", 0);
+ }
+
+ if (lavc_param_alt) {
+ av_dict_set(lavc_venc_opts, "alternate_scan", "1", 0);
+ av_dict_set(&lavc_venc_opts, "alternate_scan", "1", 0);
+ }
+
+ if (lavc_param_umv) {
+ av_dict_set(lavc_venc_opts, "umv", "1", 0);
+ av_dict_set(&lavc_venc_opts, "umv", "1", 0);
+ }
+
+ if (lavc_param_data_partitioning) {
+ av_dict_set(lavc_venc_opts, "vdpart", "1", 0);
+ av_dict_set(&lavc_venc_opts, "vdpart", "1", 0);
+ }
//-- open codec --
//----------------
TC_LOCK_LIBAVCODEC;
- ret = avcodec_open(lavc_venc_context, lavc_venc_codec);
+ ret = avcodec_open2(lavc_venc_context, lavc_venc_codec, lavc_venc_opts);
+ ret = avcodec_open2(lavc_venc_context, lavc_venc_codec, &lavc_venc_opts);
TC_UNLOCK_LIBAVCODEC;
if (ret < 0) {
tc_log_warn(MOD_NAME, "could not open FFMPEG codec");

View File

@@ -1,10 +1,37 @@
$NetBSD: patch-export_ffmpeg_cfg.c,v 1.1 2012/11/17 21:46:44 markd Exp $
$NetBSD: patch-export_ffmpeg_cfg.c,v 1.2 2015/11/21 17:14:26 adam Exp $
Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
Fixes building against FFmpeg version >= 2.0.0 (gentoo patch).
--- export/ffmpeg_cfg.c.orig 2011-11-19 16:50:27.000000000 +0000
+++ export/ffmpeg_cfg.c
@@ -160,9 +160,9 @@ TCConfigEntry lavcopts_conf[]={
@@ -34,8 +34,6 @@ int lavc_param_vme = 4;
//int lavc_param_vqscale = 0;
//int lavc_param_vqmin = 2;
//int lavc_param_vqmax = 31;
-int lavc_param_mb_qmin = 2;
-int lavc_param_mb_qmax = 31;
int lavc_param_lmin = 2;
int lavc_param_lmax = 31;
int lavc_param_vqdiff = 3;
@@ -126,7 +124,7 @@ int lavc_param_gmc = 0;
//int lavc_param_atag = 0;
//int lavc_param_abitrate = 224;
-char *lavc_param_video_preset = "medium";
+char *lavc_param_video_preset = "none";
char *lavc_param_ffmpeg_datadir = "/usr/share/ffmpeg";
TCConfigEntry lavcopts_conf[]={
@@ -143,8 +141,6 @@ TCConfigEntry lavcopts_conf[]={
// {"vqscale", &lavc_param_vqscale, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31},
// {"vqmin", &lavc_param_vqmin, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31},
// {"vqmax", &lavc_param_vqmax, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31},
- {"mbqmin", &lavc_param_mb_qmin, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31},
- {"mbqmax", &lavc_param_mb_qmax, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31},
{"lmin", &lavc_param_lmin, TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.01, 255.0},
{"lmax", &lavc_param_lmax, TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.01, 255.0},
{"vqdiff", &lavc_param_vqdiff, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31},
@@ -160,9 +156,9 @@ TCConfigEntry lavcopts_conf[]={
{"vcelim", &lavc_param_chroma_elim_threshold, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -99, 99},
{"vpsize", &lavc_param_packet_size, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 100000000},
{"vstrict", &lavc_param_strict, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -99, 99},
@@ -16,7 +43,7 @@ Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
{"mpeg_quant", &lavc_param_mpeg_quant, TCCONF_TYPE_FLAG, 0, 0, 1},
{"vi_qfactor", &lavc_param_vi_qfactor, TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, -31.0, 31.0},
{"vi_qoffset", &lavc_param_vi_qoffset, TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.0, 31.0},
@@ -211,7 +211,7 @@ TCConfigEntry lavcopts_conf[]={
@@ -211,21 +207,21 @@ TCConfigEntry lavcopts_conf[]={
#else
{"aic", &lavc_param_aic, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_AC_PRED},
#endif
@@ -25,9 +52,15 @@ Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
{"ibias", &lavc_param_ibias, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -512, 512},
{"pbias", &lavc_param_pbias, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -512, 512},
{"coder", &lavc_param_coder, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 10},
@@ -223,9 +223,9 @@ TCConfigEntry lavcopts_conf[]={
{"context", &lavc_param_context, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 10},
{"intra_matrix", &lavc_param_intra_matrix, TCCONF_TYPE_STRING, 0, 0, 0},
{"inter_matrix", &lavc_param_inter_matrix, TCCONF_TYPE_STRING, 0, 0, 0},
- {"cbp", &lavc_param_cbp, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_CBP_RD},
+ {"cbp", &lavc_param_cbp, TCCONF_TYPE_FLAG, 0, 0, 1},
{"mv0", &lavc_param_mv0, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_MV0},
{"nr", &lavc_param_noise_reduction, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 1000000},
{"qprd", &lavc_param_qp_rd, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_QP_RD},
- {"qprd", &lavc_param_qp_rd, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_QP_RD},
+ {"qprd", &lavc_param_qp_rd, TCCONF_TYPE_FLAG, 0, 0, 1},
{"threads", &lavc_param_threads, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 16},
- {"ss", &lavc_param_ss, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_H263P_SLICE_STRUCT},
- {"svcd_sof", &lavc_param_scan_offset, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_SVCD_SCAN_OFFSET},

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-export_ffmpeg_cfg.h,v 1.1 2015/11/21 17:14:26 adam Exp $
Fixes building against FFmpeg version >= 2.0.0 (gentoo patch).
--- export/ffmpeg_cfg.h.orig 2011-11-19 16:50:27.000000000 +0000
+++ export/ffmpeg_cfg.h
@@ -13,8 +13,6 @@ extern int lavc_param_vme;
//extern int lavc_param_vqscale;
//extern int lavc_param_vqmin;
//extern int lavc_param_vqmax;
-extern int lavc_param_mb_qmin;
-extern int lavc_param_mb_qmax;
extern int lavc_param_lmin;
extern int lavc_param_lmax;
extern int lavc_param_vqdiff;

View File

@@ -0,0 +1,32 @@
$NetBSD: patch-filter_filter__compare.c,v 1.1 2016/05/16 19:41:17 adam Exp $
Fix for ImageMagick v7.
--- filter/filter_compare.c.orig 2016-05-15 12:50:52.000000000 +0000
+++ filter/filter_compare.c
@@ -24,7 +24,7 @@
/* Note: because of ImageMagick bogosity, this must be included first, so
* we can undefine the PACKAGE_* symbols it splats into our namespace */
-#include <magick/api.h>
+#include <MagickCore/MagickCore.h>
#undef PACKAGE_BUGREPORT
#undef PACKAGE_NAME
#undef PACKAGE_STRING
@@ -234,7 +234,6 @@ int tc_filter(frame_list_t *ptr_, char *
compare[instance]->width,
compare[instance]->height,
GaussianFilter,
- 1,
&exception_info);
if (verbose > 1)
tc_log_info(MOD_NAME, "Flipping the Image");
@@ -257,7 +256,7 @@ int tc_filter(frame_list_t *ptr_, char *
for (t = 0; t < pattern->rows; t++)
for (r = 0; r < pattern->columns; r++){
index = t*pattern->columns + r;
- if (pixel_packet[index].opacity == 0){
+ if (pixel_packet[index].alpha == 0){
temp=tc_malloc(sizeof(struct pixelsMask));
temp->row=t;
temp->col=r;

View File

@@ -0,0 +1,66 @@
$NetBSD: patch-filter_filter__logo.c,v 1.1 2016/05/16 19:41:17 adam Exp $
Fix for ImageMagick v7.
--- filter/filter_logo.c.orig 2016-05-15 12:53:50.000000000 +0000
+++ filter/filter_logo.c
@@ -36,7 +36,7 @@
/* Note: because of ImageMagick bogosity, this must be included first, so
* we can undefine the PACKAGE_* symbols it splats into our namespace */
-#include <magick/api.h>
+#include <MagickCore/MagickCore.h>
#undef PACKAGE_BUGREPORT
#undef PACKAGE_NAME
#undef PACKAGE_STRING
@@ -573,7 +573,7 @@ int tc_filter(frame_list_t *ptr_, char *
/* Set up image/video coefficient lookup tables */
if (img_coeff_lookup[0] < 0) {
int i;
- float maxrgbval = (float)MaxRGB; // from ImageMagick
+ float maxrgbval = 255.0f;
for (i = 0; i <= MAX_UINT8_VAL; i++) {
float x = (float)ScaleCharToQuantum(i);
@@ -702,16 +702,16 @@ int tc_filter(frame_list_t *ptr_, char *
video_buf = ptr->video_buf + 3 * ((row + mfd->posy) * vob->ex_v_width + mfd->posx);
for (col = 0; col < mfd->image->columns; col++) {
- opacity = pixel_packet->opacity;
+ opacity = pixel_packet->alpha;
if (do_fade)
- opacity += (Quantum)((MaxRGB - opacity) * fade_coeff);
+ opacity += (Quantum)((255 - opacity) * fade_coeff);
if (opacity == 0) {
*(video_buf + r_off) = ScaleQuantumToChar(pixel_packet->red);
*(video_buf + g_off) = ScaleQuantumToChar(pixel_packet->green);
*(video_buf + b_off) = ScaleQuantumToChar(pixel_packet->blue);
- } else if (opacity < MaxRGB) {
+ } else if (opacity < 255) {
unsigned char opacity_uchar = ScaleQuantumToChar(opacity);
img_coeff = img_coeff_lookup[opacity_uchar];
vid_coeff = vid_coeff_lookup[opacity_uchar];
@@ -745,10 +745,10 @@ int tc_filter(frame_list_t *ptr_, char *
vid_pixel_V = vid_pixel_U + vid_size/4;
for (col = 0; col < mfd->images->columns; col++) {
int do_UV_pixels = (mfd->grayout == 0 && !(row % 2) && !(col % 2)) ? 1 : 0;
- opacity = pixel_packet->opacity;
+ opacity = pixel_packet->alpha;
if (do_fade)
- opacity += (Quantum)((MaxRGB - opacity) * fade_coeff);
+ opacity += (Quantum)((255 - opacity) * fade_coeff);
if (opacity == 0) {
*vid_pixel_Y = *img_pixel_Y;
@@ -756,7 +756,7 @@ int tc_filter(frame_list_t *ptr_, char *
*vid_pixel_U = *img_pixel_U;
*vid_pixel_V = *img_pixel_V;
}
- } else if (opacity < MaxRGB) {
+ } else if (opacity < 255) {
unsigned char opacity_uchar = ScaleQuantumToChar(opacity);
img_coeff = img_coeff_lookup[opacity_uchar];
vid_coeff = vid_coeff_lookup[opacity_uchar];

View File

@@ -0,0 +1,24 @@
$NetBSD: patch-filter_filter__logoaway.c,v 1.1 2016/05/16 19:41:17 adam Exp $
Fix for ImageMagick v7.
--- filter/filter_logoaway.c.orig 2016-05-15 13:00:44.000000000 +0000
+++ filter/filter_logoaway.c
@@ -70,7 +70,7 @@
/* Note: because of ImageMagick bogosity, this must be included first, so
* we can undefine the PACKAGE_* symbols it splats into our namespace */
-#include <magick/api.h>
+#include <MagickCore/MagickCore.h>
#undef PACKAGE_BUGREPORT
#undef PACKAGE_NAME
#undef PACKAGE_STRING
@@ -204,7 +204,7 @@ static void work_with_rgb_frame(logoaway
LD->dumpimage = ConstituteImage(LD->width-LD->xpos, LD->height-LD->ypos, "RGB", CharPixel, LD->dump_buf, &LD->exception_info);
tc_snprintf(LD->dumpimage->filename, MaxTextExtent, "dump[%d].png", LD->id);
- WriteImage(LD->dumpimage_info, LD->dumpimage);
+ WriteImage(LD->dumpimage_info, LD->dumpimage, &LD->exception_info);
}
switch(LD->mode) {

View File

@@ -1,4 +1,6 @@
$NetBSD: patch-ba,v 1.4 2012/10/10 13:37:25 drochner Exp $
$NetBSD: patch-filter_filter__pp.c,v 1.1 2015/11/21 17:14:26 adam Exp $
Fixes building against FFmpeg version >= 2.0.0 (gentoo patch).
--- filter/filter_pp.c.orig 2011-11-19 16:50:27.000000000 +0000
+++ filter/filter_pp.c

View File

@@ -1,10 +1,19 @@
$NetBSD: patch-import_decode_lavc.c,v 1.1 2012/11/17 21:46:44 markd Exp $
$NetBSD: patch-import_decode_lavc.c,v 1.2 2015/11/21 17:14:26 adam Exp $
Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
Fixes building against FFmpeg version >= 2.0.0 (gentoo patch).
--- import/decode_lavc.c.orig 2011-11-19 16:50:27.000000000 +0000
+++ import/decode_lavc.c
@@ -181,7 +181,7 @@ void decode_lavc(decode_t *decode)
@@ -170,7 +170,7 @@ void decode_lavc(decode_t *decode)
// Set these to the expected values so that ffmpeg's decoder can
// properly detect interlaced input.
- lavc_dec_context = avcodec_alloc_context();
+ lavc_dec_context = avcodec_alloc_context3(NULL);
if (lavc_dec_context == NULL) {
tc_log_error(__FILE__, "Could not allocate enough memory.");
goto decoder_error;
@@ -181,12 +181,12 @@ void decode_lavc(decode_t *decode)
#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
lavc_dec_context->error_resilience = 2;
#else
@@ -13,3 +22,9 @@ Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
#endif
lavc_dec_context->error_concealment = 3;
lavc_dec_context->workaround_bugs = FF_BUG_AUTODETECT;
- if (avcodec_open(lavc_dec_context, lavc_dec_codec) < 0) {
+ if (avcodec_open2(lavc_dec_context, lavc_dec_codec, NULL) < 0) {
tc_log_error(__FILE__, "Could not initialize the '%s' codec.",
codec->name);
goto decoder_error;

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-import_import__im.c,v 1.1 2016/05/16 19:41:17 adam Exp $
Fix for ImageMagick v7.
--- import/import_im.c.orig 2016-05-15 13:02:59.000000000 +0000
+++ import/import_im.c
@@ -36,7 +36,7 @@
#ifdef HAVE_BROKEN_WAND
#include <wand/magick-wand.h>
#else /* we have a SANE wand header */
-#include <wand/MagickWand.h>
+#include <MagickWand/MagickWand.h>
#endif /* HAVE_BROKEN_WAND */
#undef PACKAGE_BUGREPORT

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-import_import__imlist.c,v 1.1 2016/05/16 19:41:17 adam Exp $
Fix for ImageMagick v7.
--- import/import_imlist.c.orig 2016-05-15 13:04:14.000000000 +0000
+++ import/import_imlist.c
@@ -36,7 +36,7 @@
#ifdef HAVE_BROKEN_WAND
#include <wand/magick-wand.h>
#else /* we have a SANE wand header */
-#include <wand/MagickWand.h>
+#include <MagickWand/MagickWand.h>
#endif /* HAVE_BROKEN_WAND */
#undef PACKAGE_BUGREPORT

View File

@@ -1,9 +1,18 @@
$NetBSD: patch-import_import_ffmpeg.c,v 1.1 2012/11/17 21:46:44 markd Exp $
$NetBSD: patch-import_import_ffmpeg.c,v 1.2 2015/11/21 17:14:26 adam Exp $
Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
Fixes building against FFmpeg version >= 2.0.0 (gentoo patch).
--- import/import_ffmpeg.c.orig 2011-11-19 16:50:27.000000000 +0000
+++ import/import_ffmpeg.c
@@ -302,7 +302,7 @@ do_avi:
// Set these to the expected values so that ffmpeg's decoder can
// properly detect interlaced input.
- lavc_dec_context = avcodec_alloc_context();
+ lavc_dec_context = avcodec_alloc_context3(lavc_dec_codec);
if (lavc_dec_context == NULL) {
tc_log_error(MOD_NAME, "Could not allocate enough memory.");
return TC_IMPORT_ERROR;
@@ -314,7 +314,7 @@ do_avi:
#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
lavc_dec_context->error_resilience = 2;
@@ -13,3 +22,12 @@ Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
#endif
lavc_dec_context->error_concealment = 3;
lavc_dec_context->workaround_bugs = FF_BUG_AUTODETECT;
@@ -344,7 +344,7 @@ do_avi:
}
TC_LOCK_LIBAVCODEC;
- ret = avcodec_open(lavc_dec_context, lavc_dec_codec);
+ ret = avcodec_open2(lavc_dec_context, lavc_dec_codec, NULL);
TC_UNLOCK_LIBAVCODEC;
if (ret < 0) {
tc_log_warn(MOD_NAME, "Could not initialize the '%s' codec.",

View File

@@ -1,7 +1,9 @@
$NetBSD: patch-aw,v 1.5 2009/07/07 16:38:29 drochner Exp $
$NetBSD: patch-import_nuv_import__nuv.c,v 1.1 2015/11/21 17:14:26 adam Exp $
--- ./import/nuv/import_nuv.c.orig 2009-02-21 22:01:57.000000000 +0100
+++ ./import/nuv/import_nuv.c
Optionally build LZO support.
--- import/nuv/import_nuv.c.orig 2009-02-21 22:01:57.000000000 +0100
+++ import/nuv/import_nuv.c
@@ -15,7 +15,9 @@
#include "aclib/ac.h"
#include "nuppelvideo.h"

View File

@@ -1,6 +1,6 @@
$NetBSD: patch-import_probe_ffmpeg.c,v 1.1 2012/11/17 21:46:44 markd Exp $
$NetBSD: patch-import_probe_ffmpeg.c,v 1.2 2015/11/21 17:14:26 adam Exp $
Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
Fixes building against FFmpeg version >= 2.0.0 (gentoo patch).
--- import/probe_ffmpeg.c.orig 2011-11-19 16:50:27.000000000 +0000
+++ import/probe_ffmpeg.c
@@ -15,3 +15,21 @@ Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
if (ret != 0) {
tc_log_error(__FILE__, "unable to open '%s'"
" (libavformat failure)",
@@ -109,7 +109,7 @@ void probe_ffmpeg(info_t *ipipe)
return;
}
- ret = av_find_stream_info(lavf_dmx_context);
+ ret = avformat_find_stream_info(lavf_dmx_context, NULL);
if (ret < 0) {
tc_log_error(__FILE__, "unable to fetch informations from '%s'"
" (libavformat failure)",
@@ -120,7 +120,7 @@ void probe_ffmpeg(info_t *ipipe)
translate_info(lavf_dmx_context, ipipe->probe_info);
- av_close_input_file(lavf_dmx_context);
+ avformat_close_input(&lavf_dmx_context);
return;
}

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-import_probe_im.c,v 1.1 2016/05/16 19:41:17 adam Exp $
Fix for ImageMagick v7.
--- import/probe_im.c.orig 2016-05-15 13:05:12.000000000 +0000
+++ import/probe_im.c
@@ -42,7 +42,7 @@
# ifdef HAVE_BROKEN_WAND
# include <wand/magick-wand.h>
# else /* we have a SANE wand header */
-# include <wand/MagickWand.h>
+# include <MagickWand/MagickWand.h>
# endif /* HAVE_BROKEN_WAND */
# undef PACKAGE_BUGREPORT

View File

@@ -1,6 +1,6 @@
$NetBSD: patch-libtc_tcavcodec.h,v 1.1 2012/11/17 21:46:44 markd Exp $
$NetBSD: patch-libtc_tcavcodec.h,v 1.2 2015/11/21 17:14:26 adam Exp $
Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
Fixes building against FFmpeg version >= 2.0.0 (gentoo patch).
--- libtc/tcavcodec.h.orig 2011-11-19 16:50:27.000000000 +0000
+++ libtc/tcavcodec.h