From f45955e60d4da9b7f4a1088c98042f9c06669039 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 10 Dec 2017 09:09:16 +0000 Subject: gentoo resync : 10.12.2017 --- media-video/cinelerra/Manifest | 16 +- media-video/cinelerra/cinelerra-2.3.ebuild | 25 +- .../files/cinelerra-20140710-ffmpeg-0.11.patch | 134 ----- .../files/cinelerra-20140710-underlinking.patch | 16 - ...cinelerra-20140710-validate_desktop_entry.patch | 14 - media-video/cinelerra/files/cinelerra-ffmpeg.patch | 76 --- .../cinelerra/files/cinelerra-ffmpeg2.patch | 218 ------- .../cinelerra/files/cinelerra-ffmpeg29.patch | 658 --------------------- .../cinelerra/files/cinelerra-implicit_decls.patch | 36 -- .../cinelerra/files/cinelerra-includes.patch | 12 - media-video/cinelerra/files/cinelerra-libav9.patch | 93 --- media-video/cinelerra/files/cinelerra-pngtoh.patch | 15 - .../cinelerra/files/cinelerra-putbits-gcc52.patch | 29 - 13 files changed, 16 insertions(+), 1326 deletions(-) delete mode 100644 media-video/cinelerra/files/cinelerra-20140710-ffmpeg-0.11.patch delete mode 100644 media-video/cinelerra/files/cinelerra-20140710-underlinking.patch delete mode 100644 media-video/cinelerra/files/cinelerra-20140710-validate_desktop_entry.patch delete mode 100644 media-video/cinelerra/files/cinelerra-ffmpeg.patch delete mode 100644 media-video/cinelerra/files/cinelerra-ffmpeg2.patch delete mode 100644 media-video/cinelerra/files/cinelerra-ffmpeg29.patch delete mode 100644 media-video/cinelerra/files/cinelerra-implicit_decls.patch delete mode 100644 media-video/cinelerra/files/cinelerra-includes.patch delete mode 100644 media-video/cinelerra/files/cinelerra-libav9.patch delete mode 100644 media-video/cinelerra/files/cinelerra-pngtoh.patch delete mode 100644 media-video/cinelerra/files/cinelerra-putbits-gcc52.patch (limited to 'media-video/cinelerra') diff --git a/media-video/cinelerra/Manifest b/media-video/cinelerra/Manifest index 4522383d6d74..403003b733a5 100644 --- a/media-video/cinelerra/Manifest +++ b/media-video/cinelerra/Manifest @@ -1,14 +1,4 @@ -AUX cinelerra-20140710-ffmpeg-0.11.patch 4029 BLAKE2B 2ff01b8ac85b7c212d0ddf0c06a25716fa9754013a9da7fd9622d876f5b0eeb328d28f3ed2cdec5990f8ee8ecac949fdf2439568bfa641bf962e5a9735687a98 SHA512 bd1a511d616c8c1661b05db4297dea7c57702658ecb1a18c8cb930a78f396f28f29e87275ec75e70140048caba454e577062c15efb1dcd49c1bf35f51b82cfa0 -AUX cinelerra-20140710-underlinking.patch 273 BLAKE2B 1e75adf59b5614310e677cd67bed8b25df38333e193d94a83966dc627829fba13fa28dbebad60b3b2754fa0234e8d524ad958bee0036f66debfb9c00510f7e86 SHA512 09db68fecaa8591b5ca1f90b654d30f436c2dcec82642c76303f1db2450bfe90ee0a880decb4fb148a05b24605eacaee566d082bf4ff256ed1a0c099479054ca -AUX cinelerra-20140710-validate_desktop_entry.patch 338 BLAKE2B 8705c40c5841636f2efa4b4c09a92963a0bec84597ad7476f0775cbc045062164077d4a133a83689b28a474d274905b19e8244e84f746d6811f17f2da6b9509d SHA512 a8b2d629c952187741671db1806b126a9abf05167fe6fa103053e35354301af168d0fa98146c9007216e6c551b0ed72d518cec543c6e0cdb49959de3b73d8d83 -AUX cinelerra-ffmpeg.patch 2472 BLAKE2B 792cdafb27d89ac89520e9fdfde504b1243ad314cd080a1546dc6a56e6a0550c544559e96224aa43bd7ed55dd7e145e1097bb0a0b438a46f7a25bb577ca9645a SHA512 59299661832f5631d9a07a0eab0685f897a39acf6c9e8a3f79730f9479c942775005f59abb29f40c9df7446882ccac332fd97bb6387807f41c35e67301022196 -AUX cinelerra-ffmpeg2.patch 7440 BLAKE2B f07eb68c8f8ce0907131bfb0295f6ef0f2e7b5b3d307ef70fd88e38a1bdaab3a1f88d8e688366f014e594c0987421afcf3d0389c9d41394f8f13b024e30ed4e0 SHA512 c0c5a6e72ca925ca7c0b724aad08bf3c40697903683c7628801e3aceb1f5724e24a634c0d43527ed3256934eed90d30d54b97683c107fcb5519367f921c5a4bd -AUX cinelerra-ffmpeg29.patch 22007 BLAKE2B bbbdd3992388c1729ad3c3ecb1f1c934014b21acba61048fc380b459a77123a781c0ca49944b5c6bf5d1fc896148109a96ec5118824c5cbb95260db45cc952ce SHA512 1ec88f44348a67c98931a27225fd0df29afa319b4b36ab5397f37a0d0f7a5707f8cafd93955091f82759e1bc2f73edcff164baa6959fa064afc82f6b17b3fb93 -AUX cinelerra-implicit_decls.patch 1019 BLAKE2B 7af11af8198cb13ed0dc784345a18b4b98767804b29de8d0835a591a6809016aeab9de6c6c9fbc4a275fd1b4a073899d9bf68482a85e3ea52ef2336ac6352e6f SHA512 20dfcf31de8cfd4c7e1564839366798d37570b939ee14b53c06ffacd1d9e45bd2247e4c85e70b5289c6150dc1927fa103df3d5f7ef5494487a38dc98d62966f5 -AUX cinelerra-includes.patch 312 BLAKE2B 82ce0cd70dee79a1d8e48afee96dd7f1049693852c2f6fce8917108f4d48d3a6564991fc7789cb5aad61320f7c98ba478501c24fc77bca6abf78edaa781808f1 SHA512 42f0fba5d071e1f811d0700a799c2cad7af62aa7a21324b66a7944b3bf8955afc512f7de5fc2ec21fd9310036acc1ad16de672fcd7bdb4bad7d5d92ae4bfd38a -AUX cinelerra-libav9.patch 3760 BLAKE2B bc04643fa4dfcdae815e4ef33a873f25235c31c294255a6a634f4280c7e3984bee7406d40823f3d780646a60e4e14e7f99f5bc2b08b1c484f3121be9234da062 SHA512 c6bd7a3ffd02daebd3575a4d99cbfd9bb5278dfce66f5c2289c57793f1b9c9994207c63ecdb2a5a3bcbd0d4ddb5cece4d973dd488c9308ddd5501f5bad201cc2 -AUX cinelerra-pngtoh.patch 298 BLAKE2B f6746441b987cade8032952373ae0b32736b81594871ea2a0b0e540b1633497883267147d8077452a31c145af358dce9c6b71cd56739d55a35c66618f1581aa2 SHA512 1e3fe901b193aa2ce6237910894be5351c32162d5588485ab86ec36f72bb85e69c78f6d64ae3a0665450206604717e3fce7ec767910bf5e28780882b9f38a0bb -AUX cinelerra-putbits-gcc52.patch 1222 BLAKE2B 6a5aa0cbf4f15bcfa6732b3a75103d84bde5f5a01cf2a5082af927845f8f005f4d9e55b43c710d22683596c1e69439043504e87484f99047475d5f17f5c2fa8a SHA512 523acccdf22ae7c4d78df554ddd8b4f957dc7e3948bedd61e7e8ed07725d28a14df478a3d01e88d4223f90ae6661c70fcc406d9829b685b1fce20892c2306f0d -DIST CinelerraCV-2.3.tar.xz 25705608 SHA256 4bcb450347de5eccea0ed6d49d6d70e4b065905516e4416f9a788d0d7ccc926f SHA512 908dc097af8507e3b60b4787e0350500b8ba8c4340bbbdbf3716e61d74074e5f0617500b94ed1d450e030f88f3821f948cfa37c247ec2c2571fd76974374868e WHIRLPOOL 52a74c74cfeacbebd3cf3e2aced7a0054b68ce3ec04309ac608c4e1e5779a9ced8d9ea50a0898b610288aef588b613455b38b46af3ab67c44f3581ef3676b79e -EBUILD cinelerra-2.3.ebuild 2974 BLAKE2B 2f95955bf5f2b56c4e3fa78a5513fd9ee20e1e6217ce5296f6287f4d1d08c2db0c4f4ecb75bc198f2aa0081b1054403a68386f926638bccc202679e8511ba79b SHA512 181cdec14eb74ffdcf0d4166db9995cdf3cfd7a5d1b2ba5839ae099f217fea6d14204ccebec4e5544365960a687891e82b25e79a2a9f635555a416c2602cd26c +DIST CinelerraCV-2.3.tar.xz 25705608 BLAKE2B 70efe03d8c928faca0b60f76b83d7147a7ef68ebee06e7afcb589fd24d73ecbe96e16a375c38f5c89cf337593c824cc22dd6301790ac988946671cb12ba901e6 SHA512 908dc097af8507e3b60b4787e0350500b8ba8c4340bbbdbf3716e61d74074e5f0617500b94ed1d450e030f88f3821f948cfa37c247ec2c2571fd76974374868e +DIST cinelerra-2.3-patchset.tar.xz 10056 BLAKE2B c50d65a991a2643267f4c9aff11fb8caf09ba1fae0abe89125207312e8129b28f5ca86846b30a94a90b6958704c1733635b0987752a4d2ec442ea185bf870d89 SHA512 9825729ed15e106b1ec2ca58da4d587597d58a6b62f4440e08e984660821fa0e3cc3dcded5da0a5daae16edf1564a45a32490f50e51d77795ce47e4a5ba39122 +EBUILD cinelerra-2.3.ebuild 3175 BLAKE2B e2ca4361cc086678675ae927822f6b14cf441dc530fd7a0f3d7f95b1594b86aa40ff172be33971b1524f66c665a25ff58a6144f131477a54ec011b92b374e28a SHA512 e3a5d83fc96eee3be189b93718738aadd1aa7ad9f258a0fbb280ae7e8905e621238eb732b4a38bde1f87fc5c219a1fe361333125cc066d80b43abdaf0b1b122a MISC metadata.xml 259 BLAKE2B d0ebadef8dc30ed8fcc89ae38ab6a5d4af940b2cd75dea1494d96c37557532dea21ef0e014d09e32ae49eca64fe3d6bd56494fb7460ad69b70f40dd4b7ebc8b0 SHA512 c81aea0e68817fa210dc6f66313aee75246139e50d6324338707f11bca2173c64e88ce8440794c85eb64194ff97cf6c6760a06b4822a121e40629bdc3a04e1fd diff --git a/media-video/cinelerra/cinelerra-2.3.ebuild b/media-video/cinelerra/cinelerra-2.3.ebuild index 812eb75dbb32..9bb4a4e74fda 100644 --- a/media-video/cinelerra/cinelerra-2.3.ebuild +++ b/media-video/cinelerra/cinelerra-2.3.ebuild @@ -6,7 +6,8 @@ inherit autotools eutils multilib flag-o-matic DESCRIPTION="The most advanced non-linear video editor and compositor" HOMEPAGE="http://www.cinelerra.org/" -SRC_URI="https://cinelerra-cv.org/releases/CinelerraCV-${PV}.tar.xz" +SRC_URI="https://cinelerra-cv.org/releases/CinelerraCV-${PV}.tar.xz + https://dev.gentoo.org/~mgorny/dist/${P}-patchset.tar.xz" LICENSE="GPL-2" SLOT="0" @@ -58,22 +59,22 @@ S="${WORKDIR}/CinelerraCV-${PV}" src_prepare() { epatch \ - "${FILESDIR}"/${PN}-20140710-validate_desktop_entry.patch \ - "${FILESDIR}"/${PN}-ffmpeg.patch \ - "${FILESDIR}"/${PN}-20140710-underlinking.patch \ - "${FILESDIR}"/${PN}-20140710-ffmpeg-0.11.patch \ - "${FILESDIR}"/${PN}-libav9.patch \ - "${FILESDIR}"/${PN}-pngtoh.patch \ - "${FILESDIR}"/${PN}-putbits-gcc52.patch \ - "${FILESDIR}"/${PN}-implicit_decls.patch \ - "${FILESDIR}"/${PN}-includes.patch + "${WORKDIR}"/${P}-patchset/${PN}-20140710-validate_desktop_entry.patch \ + "${WORKDIR}"/${P}-patchset/${PN}-ffmpeg.patch \ + "${WORKDIR}"/${P}-patchset/${PN}-20140710-underlinking.patch \ + "${WORKDIR}"/${P}-patchset/${PN}-20140710-ffmpeg-0.11.patch \ + "${WORKDIR}"/${P}-patchset/${PN}-libav9.patch \ + "${WORKDIR}"/${P}-patchset/${PN}-pngtoh.patch \ + "${WORKDIR}"/${P}-patchset/${PN}-putbits-gcc52.patch \ + "${WORKDIR}"/${P}-patchset/${PN}-implicit_decls.patch \ + "${WORKDIR}"/${P}-patchset/${PN}-includes.patch if has_version '>=media-video/ffmpeg-2' ; then - epatch "${FILESDIR}"/${PN}-ffmpeg2.patch + epatch "${WORKDIR}"/${P}-patchset/${PN}-ffmpeg2.patch fi if has_version '>=media-video/ffmpeg-2.9' ; then - epatch "${FILESDIR}"/${PN}-ffmpeg29.patch + epatch "${WORKDIR}"/${P}-patchset/${PN}-ffmpeg29.patch fi eautoreconf diff --git a/media-video/cinelerra/files/cinelerra-20140710-ffmpeg-0.11.patch b/media-video/cinelerra/files/cinelerra-20140710-ffmpeg-0.11.patch deleted file mode 100644 index 2aebd7008c3c..000000000000 --- a/media-video/cinelerra/files/cinelerra-20140710-ffmpeg-0.11.patch +++ /dev/null @@ -1,134 +0,0 @@ ---- cinelerra/ffmpeg.C -+++ cinelerra/ffmpeg.C -@@ -23,7 +23,6 @@ - - int FFMPEG::init(char *codec_string) { - -- avcodec_init(); - avcodec_register_all(); - - CodecID id = codec_id(codec_string); ---- cinelerra/fileac3.C -+++ cinelerra/fileac3.C -@@ -84,7 +84,6 @@ - - if(wr) - { -- avcodec_init(); - avcodec_register_all(); - codec = avcodec_find_encoder(CODEC_ID_AC3); - if(!codec) ---- configure.ac -+++ configure.ac -@@ -497,7 +497,7 @@ - AC_ARG_WITH([external-ffmpeg], AC_HELP_STRING([--with-external-ffmpeg], [use external ffmpeg library])) - - if test "x$with_external_ffmpeg" = "xyes"; then -- PKG_CHECK_MODULES([FFMPEG_TEMP], [libavcodec libpostproc]) -+ PKG_CHECK_MODULES([FFMPEG_TEMP], [libavcodec libpostproc libavutil]) - FFMPEG_FOLDER="" - FFMPEG_EXTERNALTEXT="External ffmpeg" - -@@ -515,10 +515,10 @@ - AC_MSG_RESULT($enable_ffmpeg_swscale) - if test x"$enable_ffmpeg_swscale" = xyes; then - dnl AC_DEFINE(HAVE_SWSCALER) -- PKG_CHECK_MODULES([FFMPEG], [libavcodec libpostproc libswscale]) -+ PKG_CHECK_MODULES([FFMPEG], [libavcodec libpostproc libswscale libavutil]) - FFMPEG_CFLAGS="$FFMPEG_CFLAGS -I/usr/include/libavcodec -I/usr/include/libswscale -DHAVE_SWSCALER" - else -- PKG_CHECK_MODULES([FFMPEG], [libavcodec libpostproc]) -+ PKG_CHECK_MODULES([FFMPEG], [libavcodec libpostproc libavutil]) - fi - FFMPEG_EXTERNALTEXT="External ffmpeg" - else ---- quicktime/mpeg4.c -+++ quicktime/mpeg4.c -@@ -624,12 +624,12 @@ - else - // ffmpeg section - { -+ AVDictionary ** opts = NULL; - static char *video_rc_eq="tex^qComp"; - codec->encode_initialized[current_field] = 1; - if(!ffmpeg_initialized) - { - ffmpeg_initialized = 1; -- avcodec_init(); - avcodec_register_all(); - } - -@@ -673,8 +673,10 @@ - context->b_quant_offset = 1.25; - #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) - context->error_resilience = FF_ER_CAREFUL; --#else -+#elif LIBAVCODEC_VERSION_INT < ((54<<16)+(0<<8)+0) - context->error_recognition = FF_ER_CAREFUL; -+#else -+ context->err_recognition |= AV_EF_CAREFUL; - #endif - context->error_concealment = 3; - context->frame_skip_cmp = FF_CMP_DCTMAX; -@@ -699,7 +701,7 @@ - context->profile= FF_PROFILE_UNKNOWN; - context->rc_buffer_aggressivity = 1.0; - context->level= FF_LEVEL_UNKNOWN; -- context->flags |= CODEC_FLAG_H263P_UMV; -+ av_dict_set(opts, "umv", "1", 0); - context->flags |= CODEC_FLAG_AC_PRED; - - // All the forbidden settings can be extracted from libavcodec/mpegvideo.c of ffmpeg... -@@ -717,10 +719,8 @@ - (codec->ffmpeg_id == CODEC_ID_MPEG4 || - codec->ffmpeg_id == CODEC_ID_MPEG1VIDEO || - codec->ffmpeg_id == CODEC_ID_MPEG2VIDEO || -- codec->ffmpeg_id == CODEC_ID_H263P || -- codec->ffmpeg_id == CODEC_FLAG_H263P_SLICE_STRUCT)) -+ codec->ffmpeg_id == CODEC_ID_H263P )) - { -- avcodec_thread_init(context, file->cpus); - context->thread_count = file->cpus; - } - -@@ -740,7 +740,7 @@ - * codec->fix_bitrate, - * codec->quantizer); - */ -- avcodec_open(context, codec->encoder[current_field]); -+ avcodec_open2(context, codec->encoder[current_field], opts); - - avcodec_get_frame_defaults(&codec->picture[current_field]); - ---- quicktime/qtffmpeg.c -+++ quicktime/qtffmpeg.c -@@ -54,7 +54,6 @@ - if(!ffmpeg_initialized) - { - ffmpeg_initialized = 1; -- avcodec_init(); - avcodec_register_all(); - } - -@@ -90,10 +89,8 @@ - (ffmpeg_id == CODEC_ID_MPEG4 || - ffmpeg_id == CODEC_ID_MPEG1VIDEO || - ffmpeg_id == CODEC_ID_MPEG2VIDEO || -- ffmpeg_id == CODEC_ID_H263P || -- ffmpeg_id == CODEC_FLAG_H263P_SLICE_STRUCT)) -+ ffmpeg_id == CODEC_ID_H263P )) - { -- avcodec_thread_init(context, cpus); - context->thread_count = cpus; - } - if(avcodec_open(context, ---- quicktime/wma.c -+++ quicktime/wma.c -@@ -67,7 +67,6 @@ - if(!ffmpeg_initialized) - { - ffmpeg_initialized = 1; -- avcodec_init(); - avcodec_register_all(); - } - diff --git a/media-video/cinelerra/files/cinelerra-20140710-underlinking.patch b/media-video/cinelerra/files/cinelerra-20140710-underlinking.patch deleted file mode 100644 index a7dc74f2d445..000000000000 --- a/media-video/cinelerra/files/cinelerra-20140710-underlinking.patch +++ /dev/null @@ -1,16 +0,0 @@ -http://bugs.gentoo.org/367509 - -pluginserver.C is using dlsym, dlopen, dlclose and dlerror - ---- cinelerra/Makefile.am -+++ cinelerra/Makefile.am -@@ -692,7 +692,8 @@ - $(LIBDV_LIBS) \ - -luuid \ - $(MJPEG_LIBS) \ -- -lstdc++ -+ -lstdc++ \ -+ -ldl - - EXTRA_DIST = gen-feather-h - diff --git a/media-video/cinelerra/files/cinelerra-20140710-validate_desktop_entry.patch b/media-video/cinelerra/files/cinelerra-20140710-validate_desktop_entry.patch deleted file mode 100644 index 006217586630..000000000000 --- a/media-video/cinelerra/files/cinelerra-20140710-validate_desktop_entry.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- image/cinelerra-cv.desktop -+++ image/cinelerra-cv.desktop -@@ -5,9 +5,8 @@ - Name[fr]=Cinelerra-CV - Name[es]=Cinelerra-CV - Comment=Video Editor --Categories=Application;AudioVideo;Multimedia;VideoEditing; --Encoding=UTF-8 -+Categories=AudioVideo; - Exec=cinelerra --Icon=cinelerra-cv.xpm -+Icon=cinelerra-cv - Terminal=false - Type=Application diff --git a/media-video/cinelerra/files/cinelerra-ffmpeg.patch b/media-video/cinelerra/files/cinelerra-ffmpeg.patch deleted file mode 100644 index 6f7962fb1a54..000000000000 --- a/media-video/cinelerra/files/cinelerra-ffmpeg.patch +++ /dev/null @@ -1,76 +0,0 @@ -Fix build with ffmpeg/libav trunk / 0.7 - -Index: cinelerra-20101104/cinelerra/ffmpeg.C -=================================================================== ---- cinelerra-20101104.orig/cinelerra/ffmpeg.C -+++ cinelerra-20101104/cinelerra/ffmpeg.C -@@ -364,12 +364,15 @@ int FFMPEG::decode(uint8_t *data, long d - - // NOTE: frame must already have data space allocated - -+ AVPacket pkt; - got_picture = 0; -- int length = avcodec_decode_video(context, -+ av_init_packet( &pkt ); -+ pkt.data = data; -+ pkt.size = data_size; -+ int length = avcodec_decode_video2(context, - picture, - &got_picture, -- data, -- data_size); -+ &pkt); - - if (length < 0) { - printf("FFMPEG::decode error decoding frame\n"); -Index: cinelerra-20101104/quicktime/qtffmpeg.c -=================================================================== ---- cinelerra-20101104.orig/quicktime/qtffmpeg.c -+++ cinelerra-20101104/quicktime/qtffmpeg.c -@@ -181,6 +181,7 @@ static int decode_wrapper(quicktime_t *f - - if(!result) - { -+ AVPacket pkt; - - - // No way to determine if there was an error based on nonzero status. -@@ -189,11 +190,13 @@ static int decode_wrapper(quicktime_t *f - ffmpeg->decoder_context[current_field]->skip_frame = AVDISCARD_NONREF /* AVDISCARD_BIDIR */; - else - ffmpeg->decoder_context[current_field]->skip_frame = AVDISCARD_DEFAULT; -- result = avcodec_decode_video(ffmpeg->decoder_context[current_field], -+ av_init_packet( &pkt ); -+ pkt.data = ffmpeg->work_buffer; -+ pkt.size = bytes + header_bytes; -+ result = avcodec_decode_video2(ffmpeg->decoder_context[current_field], - &ffmpeg->picture[current_field], - &got_picture, -- ffmpeg->work_buffer, -- bytes + header_bytes); -+ &pkt); - - - -Index: cinelerra-20101104/quicktime/wma.c -=================================================================== ---- cinelerra-20101104.orig/quicktime/wma.c -+++ cinelerra-20101104/quicktime/wma.c -@@ -195,11 +195,14 @@ printf("decode 2 %x %llx %llx\n", chunk_ - chunk_size); - #else - bytes_decoded = AVCODEC_MAX_AUDIO_FRAME_SIZE; -- result = avcodec_decode_audio2(codec->decoder_context, -+ AVPacket pkt; -+ av_init_packet( &pkt ); -+ pkt.data = codec->packet_buffer; -+ pkt.size = chunk_size; -+ result = avcodec_decode_audio3(codec->decoder_context, - (int16_t*)(codec->work_buffer + codec->output_size * sample_size), - &bytes_decoded, -- codec->packet_buffer, -- chunk_size); -+ &pkt); - #endif - - pthread_mutex_unlock(&ffmpeg_lock); diff --git a/media-video/cinelerra/files/cinelerra-ffmpeg2.patch b/media-video/cinelerra/files/cinelerra-ffmpeg2.patch deleted file mode 100644 index 01680ac952f1..000000000000 --- a/media-video/cinelerra/files/cinelerra-ffmpeg2.patch +++ /dev/null @@ -1,218 +0,0 @@ -https://bugs.gentoo.org/show_bug.cgi?id=479394 -By Helmut Jarausch - ---- cinelerra/ffmpeg.h.ORIG 2012-07-06 22:40:26.000000000 +0200 -+++ cinelerra/ffmpeg.h 2013-08-01 12:58:12.342474136 +0200 -@@ -26,7 +26,7 @@ - static int convert_cmodel_transfer(VFrame *frame_in,VFrame *frame_out); - static int init_picture_from_frame(AVPicture *picture, VFrame *frame); - -- static CodecID codec_id(char *codec_string); -+ static AVCodecID codec_id(char *codec_string); - - private: - static PixelFormat color_model_to_pix_fmt(int color_model); ---- cinelerra/ffmpeg.C.ORIG 2013-08-01 11:24:43.794419246 +0200 -+++ cinelerra/ffmpeg.C 2013-08-01 12:57:48.121473899 +0200 -@@ -25,7 +25,7 @@ - - avcodec_register_all(); - -- CodecID id = codec_id(codec_string); -+ AVCodecID id = codec_id(codec_string); - codec = avcodec_find_decoder(id); - if (codec == NULL) { - printf("FFMPEG::init no decoder for '%s'", codec_string); -@@ -51,7 +51,7 @@ - } - - --CodecID FFMPEG::codec_id(char *codec_string) { -+AVCodecID FFMPEG::codec_id(char *codec_string) { - #define CODEC_IS(x) (! strncmp(codec_string, x, 4)) - - if (CODEC_IS(QUICKTIME_DV) || ---- quicktime/ffmpeg/ffmpeg.c.ORIG 2012-07-06 22:40:26.000000000 +0200 -+++ quicktime/ffmpeg/ffmpeg.c 2013-08-01 12:57:59.025474005 +0200 -@@ -2663,7 +2663,7 @@ - return 0; - } - --static enum CodecID find_codec_or_die(const char *name, int type, int encoder) -+static enum AVCodecID find_codec_or_die(const char *name, int type, int encoder) - { - const char *codec_string = encoder ? "encoder" : "decoder"; - AVCodec *codec; ---- quicktime/ffmpeg/libavformat/electronicarts.c.ORIG 2012-07-06 22:40:26.000000000 +0200 -+++ quicktime/ffmpeg/libavformat/electronicarts.c 2013-08-01 13:00:57.855475755 +0200 -@@ -49,11 +49,11 @@ - typedef struct EaDemuxContext { - int big_endian; - -- enum CodecID video_codec; -+ enum AVCodecID video_codec; - AVRational time_base; - int video_stream_index; - -- enum CodecID audio_codec; -+ enum AVCodecID audio_codec; - int audio_stream_index; - int audio_frame_counter; - ---- quicktime/ffmpeg/libavformat/img2.c.ORIG 2012-07-06 22:40:26.000000000 +0200 -+++ quicktime/ffmpeg/libavformat/img2.c 2013-08-01 12:59:21.408474812 +0200 -@@ -34,7 +34,7 @@ - } VideoData; - - typedef struct { -- enum CodecID id; -+ enum AVCodecID id; - const char *str; - } IdStrMap; - -@@ -97,7 +97,7 @@ - } - return -1; - } --static enum CodecID av_str2id(const IdStrMap *tags, const char *str) -+static enum AVCodecID av_str2id(const IdStrMap *tags, const char *str) - { - str= strrchr(str, '.'); - if(!str) return CODEC_ID_NONE; -@@ -175,7 +175,7 @@ - return 0; - } - --enum CodecID av_guess_image2_codec(const char *filename){ -+enum AVCodecID av_guess_image2_codec(const char *filename){ - return av_str2id(img_tags, filename); - } - ---- quicktime/ffmpeg/libavformat/matroskadec.c.ORIG 2012-07-06 22:40:26.000000000 +0200 -+++ quicktime/ffmpeg/libavformat/matroskadec.c 2013-08-01 12:59:57.556475165 +0200 -@@ -2476,7 +2476,7 @@ - AVStream *st; - - for (i = 0; i < matroska->num_tracks; i++) { -- enum CodecID codec_id = CODEC_ID_NONE; -+ enum AVCodecID codec_id = CODEC_ID_NONE; - uint8_t *extradata = NULL; - int extradata_size = 0; - int extradata_offset = 0; -@@ -2495,7 +2495,7 @@ - } - } - -- /* Set the FourCC from the CodecID. */ -+ /* Set the FourCC from the AVCodecID. */ - /* This is the MS compatibility mode which stores a - * BITMAPINFOHEADER in the CodecPrivate. */ - if (!strcmp(track->codec_id, -@@ -2600,7 +2600,7 @@ - - if (codec_id == CODEC_ID_NONE) { - av_log(matroska->ctx, AV_LOG_INFO, -- "Unknown/unsupported CodecID %s.\n", -+ "Unknown/unsupported AVCodecID %s.\n", - track->codec_id); - } - ---- quicktime/ffmpeg/libavformat/matroska.h.ORIG 2012-07-06 22:40:26.000000000 +0200 -+++ quicktime/ffmpeg/libavformat/matroska.h 2013-08-01 13:00:22.218475407 +0200 -@@ -220,12 +220,12 @@ - - typedef struct CodecTags{ - char str[16]; -- enum CodecID id; -+ enum AVCodecID id; - }CodecTags; - - typedef struct CodecMime{ - char str[32]; -- enum CodecID id; -+ enum AVCodecID id; - }CodecMime; - - #define MATROSKA_CODEC_ID_VIDEO_VFW_FOURCC "V_MS/VFW/FOURCC" ---- quicktime/ffmpeg/libavformat/mov.c.ORIG 2012-07-06 22:40:26.000000000 +0200 -+++ quicktime/ffmpeg/libavformat/mov.c 2013-08-01 12:59:33.935474934 +0200 -@@ -678,7 +678,7 @@ - - for(pseudo_stream_id=0; pseudo_stream_idget_color_model(); -- PixelFormat pix_fmt = color_model_to_pix_fmt(cmodel); -+ AVPixelFormat pix_fmt = color_model_to_pix_fmt(cmodel); - - int size = avpicture_fill(picture, frame->get_data(), pix_fmt, - frame->get_w(), frame->get_h()); -@@ -142,16 +142,16 @@ int FFMPEG::init_picture_from_frame(AVPi - - int FFMPEG::convert_cmodel(VFrame *frame_in, VFrame *frame_out) { - -- PixelFormat pix_fmt_in = -+ AVPixelFormat pix_fmt_in = - color_model_to_pix_fmt(frame_in->get_color_model()); -- PixelFormat pix_fmt_out = -+ AVPixelFormat pix_fmt_out = - color_model_to_pix_fmt(frame_out->get_color_model()); - #ifdef HAVE_SWSCALER - // We need a context for swscale - struct SwsContext *convert_ctx; - #endif - // do conversion within libavcodec if possible -- if (pix_fmt_in != PIX_FMT_NB && pix_fmt_out != PIX_FMT_NB) { -+ if (pix_fmt_in != AV_PIX_FMT_NB && pix_fmt_out != AV_PIX_FMT_NB) { - // set up a temporary pictures from frame_in and frame_out - AVPicture picture_in, picture_out; - init_picture_from_frame(&picture_in, frame_in); -@@ -226,14 +226,14 @@ int FFMPEG::convert_cmodel_transfer(VFra - } - - --int FFMPEG::convert_cmodel(AVPicture *picture_in, PixelFormat pix_fmt_in, -+int FFMPEG::convert_cmodel(AVPicture *picture_in, AVPixelFormat pix_fmt_in, - int width_in, int height_in, VFrame *frame_out) { - - // set up a temporary picture_out from frame_out - AVPicture picture_out; - init_picture_from_frame(&picture_out, frame_out); - int cmodel_out = frame_out->get_color_model(); -- PixelFormat pix_fmt_out = color_model_to_pix_fmt(cmodel_out); -+ AVPixelFormat pix_fmt_out = color_model_to_pix_fmt(cmodel_out); - - #ifdef HAVE_SWSCALER - // We need a context for swscale -@@ -242,7 +242,7 @@ int FFMPEG::convert_cmodel(AVPicture *pi - int result; - #ifndef HAVE_SWSCALER - // do conversion within libavcodec if possible -- if (pix_fmt_out != PIX_FMT_NB) { -+ if (pix_fmt_out != AV_PIX_FMT_NB) { - result = img_convert(&picture_out, - pix_fmt_out, - picture_in, -@@ -280,7 +280,7 @@ int FFMPEG::convert_cmodel(AVPicture *pi - // make an intermediate temp frame only if necessary - int cmodel_in = pix_fmt_to_color_model(pix_fmt_in); - if (cmodel_in == BC_TRANSPARENCY) { -- if (pix_fmt_in == PIX_FMT_RGB32) { -+ if (pix_fmt_in == AV_PIX_FMT_RGB32) { - // avoid infinite recursion if things are broken - printf("FFMPEG::convert_cmodel pix_fmt_in broken!\n"); - return 1; -Index: cinelerra-20140710/cinelerra/ffmpeg.h -=================================================================== ---- cinelerra-20140710.orig/cinelerra/ffmpeg.h -+++ cinelerra-20140710/cinelerra/ffmpeg.h -@@ -18,7 +18,7 @@ class FFMPEG - int init(char *codec_string); - int decode(uint8_t *data, long data_size, VFrame *frame_out); - -- static int convert_cmodel(AVPicture *picture_in, PixelFormat pix_fmt, -+ static int convert_cmodel(AVPicture *picture_in, AVPixelFormat pix_fmt, - int width_in, int height_in, - VFrame *frame_out); - static int convert_cmodel(VFrame *frame_in, VFrame *frame_out); -@@ -29,8 +29,8 @@ class FFMPEG - static AVCodecID codec_id(char *codec_string); - - private: -- static PixelFormat color_model_to_pix_fmt(int color_model); -- static int pix_fmt_to_color_model(PixelFormat pix_fmt); -+ static AVPixelFormat color_model_to_pix_fmt(int color_model); -+ static int pix_fmt_to_color_model(AVPixelFormat pix_fmt); - - int got_picture; - Asset *asset; -Index: cinelerra-20140710/cinelerra/fileac3.C -=================================================================== ---- cinelerra-20140710.orig/cinelerra/fileac3.C -+++ cinelerra-20140710/cinelerra/fileac3.C -@@ -85,7 +85,7 @@ int FileAC3::open_file(int rd, int wr) - if(wr) - { - avcodec_register_all(); -- codec = avcodec_find_encoder(CODEC_ID_AC3); -+ codec = avcodec_find_encoder(AV_CODEC_ID_AC3); - if(!codec) - { - eprintf("codec not found.\n"); -@@ -211,12 +211,56 @@ int FileAC3::write_samples(double **buff - current_sample + frame_size <= temp_raw_size; - current_sample += frame_size) - { -- int compressed_size = avcodec_encode_audio( -- codec_context, -- temp_compressed + output_size, -- compressed_allocated - output_size, -- temp_raw + current_sample * asset->channels); -- output_size += compressed_size; -+ AVPacket pkt; -+ AVFrame *frame; -+ int ret, samples_size, got_packet; -+ av_init_packet(&pkt); -+ pkt.data = temp_compressed + output_size; -+ pkt.size = compressed_allocated - output_size; -+ frame = av_frame_alloc(); -+ if(!frame) return AVERROR(ENOMEM); -+ if(codec_context->frame_size) { -+ frame->nb_samples = codec_context->frame_size; -+ } else { -+ /* if frame_size is not set, the number of samples must be -+ * * calculated from the buffer size */ -+ int64_t nb_samples; -+ if (!av_get_bits_per_sample(codec_context->codec_id)) { -+ av_frame_free(&frame); -+ return AVERROR(EINVAL); -+ } -+ nb_samples = (int64_t)(compressed_allocated - output_size) * 8 / -+ (av_get_bits_per_sample(codec_context->codec_id) * -+ codec_context->channels); -+ if (nb_samples >= INT_MAX) { -+ av_frame_free(&frame); -+ return AVERROR(EINVAL); -+ } -+ frame->nb_samples = nb_samples; -+ } -+ -+ /* it is assumed that the samples buffer is large enough based on the -+ * * relevant parameters */ -+ samples_size = av_samples_get_buffer_size(NULL, codec_context->channels, -+ frame->nb_samples, -+ codec_context->sample_fmt, 1); -+ if ((ret = avcodec_fill_audio_frame(frame, codec_context->channels, -+ codec_context->sample_fmt, -+ (const uint8_t *)(temp_raw + current_sample * asset->channels), -+ samples_size, 1)) < 0) { -+ av_frame_free(&frame); -+ return ret; -+ } -+ -+ ret = avcodec_encode_audio2(codec_context, &pkt, frame, &got_packet); -+ output_size += pkt.size; -+ /* free any side data since we cannot return it */ -+ av_packet_free_side_data(&pkt); -+ -+ if (frame && frame->extended_data != frame->data) -+ av_freep(&frame->extended_data); -+ -+ av_frame_free(&frame); - } - - // Shift buffer back -Index: cinelerra-20140710/quicktime/mpeg4.c -=================================================================== ---- cinelerra-20140710.orig/quicktime/mpeg4.c -+++ cinelerra-20140710/quicktime/mpeg4.c -@@ -595,7 +595,7 @@ static int encode(quicktime_t *file, uns - if(!codec->encode_initialized[current_field]) - { - // Encore section -- if(codec->ffmpeg_id == CODEC_ID_MPEG4 && codec->use_encore) -+ if(codec->ffmpeg_id == AV_CODEC_ID_MPEG4 && codec->use_encore) - { - codec->encode_initialized[current_field] = 1; - codec->encode_handle[current_field] = encode_handle++; -@@ -647,7 +647,7 @@ static int encode(quicktime_t *file, uns - context->width = width_i; - context->height = height_i; - context->gop_size = codec->gop_size; -- context->pix_fmt = PIX_FMT_YUV420P; -+ context->pix_fmt = AV_PIX_FMT_YUV420P; - context->bit_rate = codec->bitrate / codec->total_fields; - context->bit_rate_tolerance = codec->bitrate_tolerance; - context->rc_eq = video_rc_eq; -@@ -705,19 +705,19 @@ static int encode(quicktime_t *file, uns - // All the forbidden settings can be extracted from libavcodec/mpegvideo.c of ffmpeg... - - // Copyed from ffmpeg's mpegvideo.c... set 4MV only where it is supported -- if(codec->ffmpeg_id == CODEC_ID_MPEG4 || -- codec->ffmpeg_id == CODEC_ID_H263 || -- codec->ffmpeg_id == CODEC_ID_H263P || -- codec->ffmpeg_id == CODEC_ID_FLV1) -+ if(codec->ffmpeg_id == AV_CODEC_ID_MPEG4 || -+ codec->ffmpeg_id == AV_CODEC_ID_H263 || -+ codec->ffmpeg_id == AV_CODEC_ID_H263P || -+ codec->ffmpeg_id == AV_CODEC_ID_FLV1) - context->flags |= CODEC_FLAG_4MV; - // Not compatible with Win - // context->flags |= CODEC_FLAG_QPEL; - - if(file->cpus > 1 && -- (codec->ffmpeg_id == CODEC_ID_MPEG4 || -- codec->ffmpeg_id == CODEC_ID_MPEG1VIDEO || -- codec->ffmpeg_id == CODEC_ID_MPEG2VIDEO || -- codec->ffmpeg_id == CODEC_ID_H263P )) -+ (codec->ffmpeg_id == AV_CODEC_ID_MPEG4 || -+ codec->ffmpeg_id == AV_CODEC_ID_MPEG1VIDEO || -+ codec->ffmpeg_id == AV_CODEC_ID_MPEG2VIDEO || -+ codec->ffmpeg_id == AV_CODEC_ID_H263P )) - { - context->thread_count = file->cpus; - } -@@ -740,7 +740,7 @@ static int encode(quicktime_t *file, uns - */ - avcodec_open2(context, codec->encoder[current_field], opts); - -- avcodec_get_frame_defaults(&codec->picture[current_field]); -+ av_frame_unref(&codec->picture[current_field]); - - } - } -@@ -891,10 +891,18 @@ static int encode(quicktime_t *file, uns - picture->quality = 0; - picture->pts = vtrack->current_position * quicktime_frame_rate_d(file, track); - picture->key_frame = 0; -- bytes = avcodec_encode_video(context, -- codec->work_buffer, -- codec->buffer_size, -- picture); -+ -+ AVPacket pkt; -+ int ret, got_pkt; -+ av_init_packet(&pkt); -+ pkt.data = codec->work_buffer; -+ pkt.size = codec->buffer_size; -+ ret = avcodec_encode_video2(context, -+ &pkt, -+ picture, &got_pkt); -+ bytes = pkt.size; -+ if(ret < 0 || !got_pkt) return 1; -+ - is_keyframe = context->coded_frame && context->coded_frame->key_frame; - /* - * printf("encode current_position=%d is_keyframe=%d\n", -@@ -1161,7 +1169,7 @@ void quicktime_init_codec_div3(quicktime - QUICKTIME_DIV3, - "DIVX", - "Mike Row Soft MPEG4 Version 3"); -- result->ffmpeg_id = CODEC_ID_MSMPEG4V3; -+ result->ffmpeg_id = AV_CODEC_ID_MSMPEG4V3; - } - - void quicktime_init_codec_div5(quicktime_video_map_t *vtrack) -@@ -1170,7 +1178,7 @@ void quicktime_init_codec_div5(quicktime - QUICKTIME_DX50, - "DIVX", - "Mike Row Soft MPEG4 Version 5"); -- result->ffmpeg_id = CODEC_ID_MPEG4; -+ result->ffmpeg_id = AV_CODEC_ID_MPEG4; - } - - // Mike Rowe Soft MPEG-4 -@@ -1180,7 +1188,7 @@ void quicktime_init_codec_div3lower(quic - QUICKTIME_DIV3_LOWER, - "DIVX", - "Mike Row Soft MPEG4 Version 3"); -- result->ffmpeg_id = CODEC_ID_MSMPEG4V3; -+ result->ffmpeg_id = AV_CODEC_ID_MSMPEG4V3; - } - - void quicktime_init_codec_div3v2(quicktime_video_map_t *vtrack) -@@ -1189,7 +1197,7 @@ void quicktime_init_codec_div3v2(quickti - QUICKTIME_MP42, - "MP42", - "Mike Row Soft MPEG4 Version 2"); -- result->ffmpeg_id = CODEC_ID_MSMPEG4V2; -+ result->ffmpeg_id = AV_CODEC_ID_MSMPEG4V2; - } - - // Generic MPEG-4 -@@ -1199,7 +1207,7 @@ void quicktime_init_codec_divx(quicktime - QUICKTIME_DIVX, - "MPEG-4", - "Generic MPEG Four"); -- result->ffmpeg_id = CODEC_ID_MPEG4; -+ result->ffmpeg_id = AV_CODEC_ID_MPEG4; - result->use_encore = 1; - } - -@@ -1209,7 +1217,7 @@ void quicktime_init_codec_mpg4(quicktime - QUICKTIME_MPG4, - "MPEG-4", - "FFMPEG (msmpeg4)"); -- result->ffmpeg_id = CODEC_ID_MSMPEG4V1; -+ result->ffmpeg_id = AV_CODEC_ID_MSMPEG4V1; - } - - void quicktime_init_codec_dx50(quicktime_video_map_t *vtrack) -@@ -1218,7 +1226,7 @@ void quicktime_init_codec_dx50(quicktime - QUICKTIME_DX50, - "MPEG-4", - "FFMPEG (mpeg4)"); -- result->ffmpeg_id = CODEC_ID_MPEG4; -+ result->ffmpeg_id = AV_CODEC_ID_MPEG4; - } - - // Generic MPEG-4 -@@ -1228,7 +1236,7 @@ void quicktime_init_codec_mp4v(quicktime - QUICKTIME_MP4V, - "MPEG4", - "Generic MPEG Four"); -- result->ffmpeg_id = CODEC_ID_MPEG4; -+ result->ffmpeg_id = AV_CODEC_ID_MPEG4; - // result->use_encore = 1; - } - -@@ -1240,7 +1248,7 @@ void quicktime_init_codec_svq1(quicktime - QUICKTIME_SVQ1, - "Sorenson Version 1", - "From the chearch of codecs of yesterday's sights"); -- result->ffmpeg_id = CODEC_ID_SVQ1; -+ result->ffmpeg_id = AV_CODEC_ID_SVQ1; - } - - void quicktime_init_codec_svq3(quicktime_video_map_t *vtrack) -@@ -1249,7 +1257,7 @@ void quicktime_init_codec_svq3(quicktime - QUICKTIME_SVQ3, - "Sorenson Version 3", - "From the chearch of codecs of yesterday's sights"); -- result->ffmpeg_id = CODEC_ID_SVQ3; -+ result->ffmpeg_id = AV_CODEC_ID_SVQ3; - } - - void quicktime_init_codec_h263(quicktime_video_map_t *vtrack) -@@ -1258,7 +1266,7 @@ void quicktime_init_codec_h263(quicktime - QUICKTIME_H263, - "H.263", - "H.263"); -- result->ffmpeg_id = CODEC_ID_H263; -+ result->ffmpeg_id = AV_CODEC_ID_H263; - } - - void quicktime_init_codec_xvid(quicktime_video_map_t *vtrack) -@@ -1267,7 +1275,7 @@ void quicktime_init_codec_xvid(quicktime - QUICKTIME_XVID, - "XVID", - "FFmpeg MPEG-4"); -- result->ffmpeg_id = CODEC_ID_MPEG4; -+ result->ffmpeg_id = AV_CODEC_ID_MPEG4; - } - - void quicktime_init_codec_dnxhd(quicktime_video_map_t *vtrack) -@@ -1276,7 +1284,7 @@ void quicktime_init_codec_dnxhd(quicktim - QUICKTIME_DNXHD, - "DNXHD", - "DNXHD"); -- result->ffmpeg_id = CODEC_ID_DNXHD; -+ result->ffmpeg_id = AV_CODEC_ID_DNXHD; - } - - // field based MPEG-4 -@@ -1287,7 +1295,7 @@ void quicktime_init_codec_hv60(quicktime - "Dual MPEG-4", - "MPEG 4 with alternating streams every other frame. (Not standardized)"); - result->total_fields = 2; -- result->ffmpeg_id = CODEC_ID_MPEG4; -+ result->ffmpeg_id = AV_CODEC_ID_MPEG4; - } - - -Index: cinelerra-20140710/quicktime/qtffmpeg.c -=================================================================== ---- cinelerra-20140710.orig/quicktime/qtffmpeg.c -+++ cinelerra-20140710/quicktime/qtffmpeg.c -@@ -39,7 +39,7 @@ quicktime_ffmpeg_t* quicktime_new_ffmpeg - ptr->height = h; - ptr->ffmpeg_id = ffmpeg_id; - //printf("quicktime_new_ffmpeg 1 %d\n", ptr->ffmpeg_id); -- if(ffmpeg_id == CODEC_ID_SVQ1) -+ if(ffmpeg_id == AV_CODEC_ID_SVQ1) - { - ptr->width_i = quicktime_quantize32(ptr->width); - ptr->height_i = quicktime_quantize32(ptr->height); -@@ -86,10 +86,10 @@ quicktime_ffmpeg_t* quicktime_new_ffmpeg - context->extradata_size = avcc->data_size; - } - if(cpus > 1 && -- (ffmpeg_id == CODEC_ID_MPEG4 || -- ffmpeg_id == CODEC_ID_MPEG1VIDEO || -- ffmpeg_id == CODEC_ID_MPEG2VIDEO || -- ffmpeg_id == CODEC_ID_H263P )) -+ (ffmpeg_id == AV_CODEC_ID_MPEG4 || -+ ffmpeg_id == AV_CODEC_ID_MPEG1VIDEO || -+ ffmpeg_id == AV_CODEC_ID_MPEG2VIDEO || -+ ffmpeg_id == AV_CODEC_ID_H263P )) - { - context->thread_count = cpus; - } -@@ -224,16 +224,16 @@ static int get_chroma_factor(quicktime_f - { - switch(ffmpeg->decoder_context[current_field]->pix_fmt) - { -- case PIX_FMT_YUV420P: -+ case AV_PIX_FMT_YUV420P: - return 4; - break; -- case PIX_FMT_YUYV422: -+ case AV_PIX_FMT_YUYV422: - return 2; - break; -- case PIX_FMT_YUV422P: -+ case AV_PIX_FMT_YUV422P: - return 2; - break; -- case PIX_FMT_YUV410P: -+ case AV_PIX_FMT_YUV410P: - return 9; - break; - default: -@@ -277,7 +277,7 @@ int quicktime_ffmpeg_decode(quicktime_ff - //printf("quicktime_ffmpeg_decode 1 %d\n", ffmpeg->last_frame[current_field]); - - if(ffmpeg->last_frame[current_field] == -1 && -- ffmpeg->ffmpeg_id != CODEC_ID_H264) -+ ffmpeg->ffmpeg_id != AV_CODEC_ID_H264) - { - int current_frame = vtrack->current_position; - // For certain codecs, -@@ -328,7 +328,7 @@ int quicktime_ffmpeg_decode(quicktime_ff - // For MPEG-4, get another keyframe before first keyframe. - // The Sanyo tends to glitch with only 1 keyframe. - // Not enough memory. -- if( 0 /* frame1 > 0 && ffmpeg->ffmpeg_id == CODEC_ID_MPEG4 */) -+ if( 0 /* frame1 > 0 && ffmpeg->ffmpeg_id == AV_CODEC_ID_MPEG4 */) - { - do - { -@@ -423,16 +423,16 @@ int quicktime_ffmpeg_decode(quicktime_ff - // Hopefully this setting will be left over if the cache was used. - switch(ffmpeg->decoder_context[current_field]->pix_fmt) - { -- case PIX_FMT_YUV420P: -+ case AV_PIX_FMT_YUV420P: - input_cmodel = BC_YUV420P; - break; -- case PIX_FMT_YUYV422: -+ case AV_PIX_FMT_YUYV422: - input_cmodel = BC_YUV422; - break; -- case PIX_FMT_YUV422P: -+ case AV_PIX_FMT_YUV422P: - input_cmodel = BC_YUV422P; - break; -- case PIX_FMT_YUV410P: -+ case AV_PIX_FMT_YUV410P: - input_cmodel = BC_YUV9P; - break; - default: -Index: cinelerra-20140710/quicktime/qth264.c -=================================================================== ---- cinelerra-20140710.orig/quicktime/qth264.c -+++ cinelerra-20140710/quicktime/qth264.c -@@ -370,7 +370,7 @@ static int decode(quicktime_t *file, uns - if(!codec->decoder) codec->decoder = quicktime_new_ffmpeg( - file->cpus, - codec->total_fields, -- CODEC_ID_H264, -+ AV_CODEC_ID_H264, - width, - height, - stsd_table); -Index: cinelerra-20140710/quicktime/wma.c -=================================================================== ---- cinelerra-20140710.orig/quicktime/wma.c -+++ cinelerra-20140710/quicktime/wma.c -@@ -193,15 +193,38 @@ printf("decode 2 %x %llx %llx\n", chunk_ - codec->packet_buffer, - chunk_size); - #else -- bytes_decoded = AVCODEC_MAX_AUDIO_FRAME_SIZE; - AVPacket pkt; - av_init_packet( &pkt ); - pkt.data = codec->packet_buffer; - pkt.size = chunk_size; -- result = avcodec_decode_audio3(codec->decoder_context, -- (int16_t*)(codec->work_buffer + codec->output_size * sample_size), -- &bytes_decoded, -+ AVFrame *frame = av_frame_alloc(); -+ int got_frame = 0; -+ -+ result = avcodec_decode_audio4(codec->decoder_context, -+ frame, &got_frame, - &pkt); -+ -+ if(result >= 0 && got_frame) -+ { -+ int ch, plane_size; -+ int planar = av_sample_fmt_is_planar(codec->decoder_context->sample_fmt); -+ int data_size = av_samples_get_buffer_size(&plane_size, codec->decoder_context->channels, -+ frame->nb_samples, -+ codec->decoder_context->sample_fmt, 1); -+ memcpy(codec->work_buffer + codec->output_size * sample_size, frame->extended_data[0], plane_size); -+ -+ if (planar && codec->decoder_context->channels > 1) { -+ uint8_t *out = ((uint8_t *)(codec->work_buffer + codec->output_size * sample_size)) + plane_size; -+ for (ch = 1; ch < codec->decoder_context->channels; ch++) { -+ memcpy(out, frame->extended_data[ch], plane_size); -+ out += plane_size; -+ } -+ } -+ bytes_decoded = data_size; -+ } else { -+ bytes_decoded = 0; -+ } -+ av_frame_free(&frame); - #endif - - pthread_mutex_unlock(&ffmpeg_lock); -@@ -298,7 +321,7 @@ void quicktime_init_codec_wmav1(quicktim - codec_base->title = "Win Media Audio 1"; - codec_base->desc = "Win Media Audio 1"; - codec_base->wav_id = 0x160; -- codec->ffmpeg_id = CODEC_ID_WMAV1; -+ codec->ffmpeg_id = AV_CODEC_ID_WMAV1; - } - - -@@ -313,5 +336,5 @@ void quicktime_init_codec_wmav2(quicktim - codec_base->title = "Win Media Audio 2"; - codec_base->desc = "Win Media Audio 2"; - codec_base->wav_id = 0x161; -- codec->ffmpeg_id = CODEC_ID_WMAV2; -+ codec->ffmpeg_id = AV_CODEC_ID_WMAV2; - } -Index: cinelerra-20140710/cinelerra/fileyuv.C -=================================================================== ---- cinelerra-20140710.orig/cinelerra/fileyuv.C -+++ cinelerra-20140710/cinelerra/fileyuv.C -@@ -196,7 +196,7 @@ int FileYUV::write_frames(VFrame ***laye - return stream->write_frame_raw(frame->get_data(), frame_size); - - // decode and write an encoded frame -- if (FFMPEG::codec_id(incoming_asset->vcodec) != CODEC_ID_NONE) -+ if (FFMPEG::codec_id(incoming_asset->vcodec) != AV_CODEC_ID_NONE) - { - if (! ffmpeg) - { -@@ -306,7 +306,7 @@ int FileYUV::can_copy_from(Edit *edit, i - if (edit->asset->format == FILE_YUV) return 1; - - // if FFMPEG can decode it, we'll accept it -- if (FFMPEG::codec_id(edit->asset->vcodec) != CODEC_ID_NONE) return 1; -+ if (FFMPEG::codec_id(edit->asset->vcodec) != AV_CODEC_ID_NONE) return 1; - - incoming_asset = 0; - diff --git a/media-video/cinelerra/files/cinelerra-implicit_decls.patch b/media-video/cinelerra/files/cinelerra-implicit_decls.patch deleted file mode 100644 index c806715e8c44..000000000000 --- a/media-video/cinelerra/files/cinelerra-implicit_decls.patch +++ /dev/null @@ -1,36 +0,0 @@ -Index: CinelerraCV-2.3/quicktime/graphics.c -=================================================================== ---- CinelerraCV-2.3.orig/quicktime/graphics.c -+++ CinelerraCV-2.3/quicktime/graphics.c -@@ -1,5 +1,6 @@ - #include "graphics.h" - -+#include - #include - - /* Graphics acceleration routines */ -Index: CinelerraCV-2.3/quicktime/libmjpeg.c -=================================================================== ---- CinelerraCV-2.3.orig/quicktime/libmjpeg.c -+++ CinelerraCV-2.3/quicktime/libmjpeg.c -@@ -17,6 +17,8 @@ - - #include - #include -+#include -+#include - #include "colormodels.h" - #include "libmjpeg.h" - -Index: CinelerraCV-2.3/quicktime/qtpng.c -=================================================================== ---- CinelerraCV-2.3.orig/quicktime/qtpng.c -+++ CinelerraCV-2.3/quicktime/qtpng.c -@@ -1,6 +1,7 @@ - #include "colormodels.h" - #include "funcprotos.h" - #include -+#include - #include "quicktime.h" - #include "qtpng.h" - diff --git a/media-video/cinelerra/files/cinelerra-includes.patch b/media-video/cinelerra/files/cinelerra-includes.patch deleted file mode 100644 index 45ac200310da..000000000000 --- a/media-video/cinelerra/files/cinelerra-includes.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: CinelerraCV-2.3/cinelerra/audiodevice.C -=================================================================== ---- CinelerraCV-2.3.orig/cinelerra/audiodevice.C -+++ CinelerraCV-2.3/cinelerra/audiodevice.C -@@ -19,6 +19,7 @@ - * - */ - -+#include - #ifdef HAVE_FIREWIRE - #include "audio1394.h" - #endif diff --git a/media-video/cinelerra/files/cinelerra-libav9.patch b/media-video/cinelerra/files/cinelerra-libav9.patch deleted file mode 100644 index 47a4d6f231e1..000000000000 --- a/media-video/cinelerra/files/cinelerra-libav9.patch +++ /dev/null @@ -1,93 +0,0 @@ -diff -urN cinelerra-20120707/cinelerra/ffmpeg.C /tmp/cinelerra-20120707/cinelerra/ffmpeg.C ---- cinelerra-20120707/cinelerra/ffmpeg.C 2013-06-22 18:07:43.632978553 +0200 -+++ /tmp/cinelerra-20120707/cinelerra/ffmpeg.C 2013-06-22 18:07:21.668979334 +0200 -@@ -32,9 +32,9 @@ - return 1; - } - -- context = avcodec_alloc_context(); -+ context = avcodec_alloc_context3(NULL); - -- if (avcodec_open(context, codec)) { -+ if (avcodec_open2(context, codec, NULL)) { - printf("FFMPEG::init avcodec_open() failed\n"); - } - -diff -urN cinelerra-20120707/cinelerra/fileac3.C /tmp/cinelerra-20120707/cinelerra/fileac3.C ---- cinelerra-20120707/cinelerra/fileac3.C 2013-06-22 18:07:43.632978553 +0200 -+++ /tmp/cinelerra-20120707/cinelerra/fileac3.C 2013-06-22 18:07:21.668979334 +0200 -@@ -91,11 +91,11 @@ - eprintf("codec not found.\n"); - return 1; - } -- codec_context = avcodec_alloc_context(); -+ codec_context = avcodec_alloc_context3(NULL); - codec_context->bit_rate = asset->ac3_bitrate * 1000; - codec_context->sample_rate = asset->sample_rate; - codec_context->channels = asset->channels; -- if(avcodec_open(codec_context, codec)) -+ if(avcodec_open2(codec_context, codec, NULL)) - { - eprintf("failed to open codec.\n"); - return 1; -diff -urN cinelerra-20120707/quicktime/mpeg4.c /tmp/cinelerra-20120707/quicktime/mpeg4.c ---- cinelerra-20120707/quicktime/mpeg4.c 2013-06-22 18:07:43.633978553 +0200 -+++ /tmp/cinelerra-20120707/quicktime/mpeg4.c 2013-06-22 18:07:21.690979334 +0200 -@@ -642,7 +642,7 @@ - return 1; - } - -- codec->encoder_context[current_field] = avcodec_alloc_context(); -+ codec->encoder_context[current_field] = avcodec_alloc_context3(NULL); - AVCodecContext *context = codec->encoder_context[current_field]; - - context->width = width_i; -@@ -676,8 +676,6 @@ - context->error_resilience = FF_ER_CAREFUL; - #elif LIBAVCODEC_VERSION_INT < ((54<<16)+(0<<8)+0) - context->error_recognition = FF_ER_CAREFUL; --#else -- context->err_recognition |= AV_EF_CAREFUL; - #endif - context->error_concealment = 3; - context->frame_skip_cmp = FF_CMP_DCTMAX; -diff -urN cinelerra-20120707/quicktime/qtffmpeg.c /tmp/cinelerra-20120707/quicktime/qtffmpeg.c ---- cinelerra-20120707/quicktime/qtffmpeg.c 2013-06-22 18:07:43.633978553 +0200 -+++ /tmp/cinelerra-20120707/quicktime/qtffmpeg.c 2013-06-22 18:07:21.690979334 +0200 -@@ -67,7 +67,7 @@ - return 0; - } - -- AVCodecContext *context = ptr->decoder_context[i] = avcodec_alloc_context(); -+ AVCodecContext *context = ptr->decoder_context[i] = avcodec_alloc_context3(NULL); - static char fake_data[] = { 0, 0, 0, 0, 0, 0, 0, 0 }; - context->width = ptr->width_i; - context->height = ptr->height_i; -@@ -93,8 +93,8 @@ - { - context->thread_count = cpus; - } -- if(avcodec_open(context, -- ptr->decoder[i]) < 0) -+ if(avcodec_open2(context, -+ ptr->decoder[i], NULL) < 0) - { - printf("quicktime_new_ffmpeg: avcodec_open failed.\n"); - quicktime_delete_ffmpeg(ptr); -diff -urN cinelerra-20120707/quicktime/wma.c /tmp/cinelerra-20120707/quicktime/wma.c ---- cinelerra-20120707/quicktime/wma.c 2013-06-22 18:07:43.634978553 +0200 -+++ /tmp/cinelerra-20120707/quicktime/wma.c 2013-06-22 18:07:21.690979334 +0200 -@@ -76,10 +76,10 @@ - printf("init_decode: avcodec_find_decoder returned NULL.\n"); - return 1; - } -- codec->decoder_context = avcodec_alloc_context(); -+ codec->decoder_context = avcodec_alloc_context3(NULL); - codec->decoder_context->sample_rate = trak->mdia.minf.stbl.stsd.table[0].sample_rate; - codec->decoder_context->channels = track_map->channels; -- if(avcodec_open(codec->decoder_context, codec->decoder) < 0) -+ if(avcodec_open2(codec->decoder_context, codec->decoder, NULL) < 0) - { - printf("init_decode: avcodec_open failed.\n"); - return 1; - diff --git a/media-video/cinelerra/files/cinelerra-pngtoh.patch b/media-video/cinelerra/files/cinelerra-pngtoh.patch deleted file mode 100644 index 81a8432b8729..000000000000 --- a/media-video/cinelerra/files/cinelerra-pngtoh.patch +++ /dev/null @@ -1,15 +0,0 @@ -https://bugs.gentoo.org/show_bug.cgi?id=526118 -http://bugs.cinelerra-cv.org/ticket/1005 - -Author: Bernd Feige - ---- guicast/pngtoh.c 2015-01-29 13:41:01 +0000 -+++ guicast/pngtoh.c 2015-01-29 13:41:07 +0000 -@@ -148,4 +148,6 @@ - fprintf(out, "};\n\n#endif\n"); - fclose(out); - } -+ -+ return 0; - } - diff --git a/media-video/cinelerra/files/cinelerra-putbits-gcc52.patch b/media-video/cinelerra/files/cinelerra-putbits-gcc52.patch deleted file mode 100644 index 646db9f25f05..000000000000 --- a/media-video/cinelerra/files/cinelerra-putbits-gcc52.patch +++ /dev/null @@ -1,29 +0,0 @@ -https://bugs.gentoo.org/show_bug.cgi?id=562208 - -Index: cinelerra-20140710/toolame-02l/bitstream.c -=================================================================== ---- cinelerra-20140710.orig/toolame-02l/bitstream.c -+++ cinelerra-20140710/toolame-02l/bitstream.c -@@ -198,9 +198,6 @@ void put1bit (Bit_stream_struc * bs, int - } - - /*write N bits into the bit stream */ --#if !defined(__clang__) --INLINE --#endif /* not __clang__ */ - void putbits (Bit_stream_struc * bs, unsigned int val, int N) - { - register int j = N; -Index: cinelerra-20140710/toolame-02l/bitstream.h -=================================================================== ---- cinelerra-20140710.orig/toolame-02l/bitstream.h -+++ cinelerra-20140710/toolame-02l/bitstream.h -@@ -9,7 +9,7 @@ unsigned int get1bit (Bit_stream_struc * - void put1bit (Bit_stream_struc *, int); - unsigned long look_ahead (Bit_stream_struc *, int); - unsigned long getbits (Bit_stream_struc *, int); --INLINE void putbits (Bit_stream_struc *, unsigned int, int); -+void putbits (Bit_stream_struc *, unsigned int, int); - void byte_ali_putbits (Bit_stream_struc *, unsigned int, int); - unsigned long byte_ali_getbits (Bit_stream_struc *, int); - unsigned long sstell (Bit_stream_struc *); -- cgit v1.2.3