pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/multimedia/ffmpeg6
Module Name: pkgsrc
Committed By: markd
Date: Mon Dec 2 19:31:00 UTC 2024
Modified Files:
pkgsrc/multimedia/ffmpeg6: Makefile distinfo
Added Files:
pkgsrc/multimedia/ffmpeg6/patches: patch-libavcodec_libx265.c
Log Message:
ffmpeg6: Fix build with x265 >=210
https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/1f801dfdb5
https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/4571c80b40
To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 pkgsrc/multimedia/ffmpeg6/Makefile
cvs rdiff -u -r1.8 -r1.9 pkgsrc/multimedia/ffmpeg6/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/multimedia/ffmpeg6/patches/patch-libavcodec_libx265.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/multimedia/ffmpeg6/Makefile
diff -u pkgsrc/multimedia/ffmpeg6/Makefile:1.21 pkgsrc/multimedia/ffmpeg6/Makefile:1.22
--- pkgsrc/multimedia/ffmpeg6/Makefile:1.21 Sun Nov 24 06:59:09 2024
+++ pkgsrc/multimedia/ffmpeg6/Makefile Mon Dec 2 19:30:59 2024
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.21 2024/11/24 06:59:09 adam Exp $
+# $NetBSD: Makefile,v 1.22 2024/12/02 19:30:59 markd Exp $
PKGNAME= ${DISTNAME:S/ffmpeg/ffmpeg6/}
-PKGREVISION= 5
+PKGREVISION= 6
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
HOMEPAGE= https://ffmpeg.org/
COMMENT= Decoding, encoding and streaming software (v6.x)
Index: pkgsrc/multimedia/ffmpeg6/distinfo
diff -u pkgsrc/multimedia/ffmpeg6/distinfo:1.8 pkgsrc/multimedia/ffmpeg6/distinfo:1.9
--- pkgsrc/multimedia/ffmpeg6/distinfo:1.8 Sat Aug 3 06:52:01 2024
+++ pkgsrc/multimedia/ffmpeg6/distinfo Mon Dec 2 19:30:59 2024
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2024/08/03 06:52:01 adam Exp $
+$NetBSD: distinfo,v 1.9 2024/12/02 19:30:59 markd Exp $
BLAKE2s (ffmpeg-6.1.2.tar.xz) = 065a525ea3258702bd7fe9668af6583f2a5cf5990a60800e246899d328b0c1fd
SHA512 (ffmpeg-6.1.2.tar.xz) = 3a009184d971fc3168e1322d1d724aae787ed0e9c152d8d1813ea0b9099bda3b35c41fcabbd7b140560e7a8fa9fa1ffd7f0938432d5d498c43829fc6cc3d9e08
@@ -9,6 +9,7 @@ SHA1 (patch-doc_Makefile) = c513af183e37
SHA1 (patch-doc_general__contents.texi) = 13704795d2688dc0377a512dc6e65025ad674724
SHA1 (patch-doc_indevs.texi) = 8cd421a67f34ebbe6099102bf1de7c6cdb13dcb7
SHA1 (patch-doc_outdevs.texi) = 0aec04682b516016abe9b81f6efcbbef97b1c3b2
+SHA1 (patch-libavcodec_libx265.c) = f7b752467201cdf1097bcae417c2310780665e7f
SHA1 (patch-libavdevice_Makefile) = 526efd20021068245d8904c0d55508a540ae4054
SHA1 (patch-libavdevice_alldevices.c) = a9e2a2027fb2c18d5509b68deb5fd8523305dfc7
SHA1 (patch-libavdevice_sunau.c) = 554a5fc77c0e94828e9eadc7f1f9d4067a76d4ae
Added files:
Index: pkgsrc/multimedia/ffmpeg6/patches/patch-libavcodec_libx265.c
diff -u /dev/null pkgsrc/multimedia/ffmpeg6/patches/patch-libavcodec_libx265.c:1.1
--- /dev/null Mon Dec 2 19:31:00 2024
+++ pkgsrc/multimedia/ffmpeg6/patches/patch-libavcodec_libx265.c Mon Dec 2 19:30:59 2024
@@ -0,0 +1,84 @@
+$NetBSD: patch-libavcodec_libx265.c,v 1.1 2024/12/02 19:30:59 markd Exp $
+
+Fix build with x265 >=210
+
+https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/1f801dfdb5
+https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/4571c80b40
+
+--- libavcodec/libx265.c.orig 2024-08-01 23:22:48.000000000 +0000
++++ libavcodec/libx265.c
+@@ -581,7 +581,13 @@ static int libx265_encode_frame(AVCodecC
+ {
+ libx265Context *ctx = avctx->priv_data;
+ x265_picture x265pic;
+- x265_picture x265pic_out = { 0 };
++#if (X265_BUILD >= 210) && (X265_BUILD < 213)
++ x265_picture x265pic_layers_out[MAX_SCALABLE_LAYERS];
++ x265_picture* x265pic_lyrptr_out[MAX_SCALABLE_LAYERS];
++#else
++ x265_picture x265pic_solo_out = { 0 };
++#endif
++ x265_picture* x265pic_out;
+ x265_nal *nal;
+ x265_sei *sei;
+ uint8_t *dst;
+@@ -704,8 +710,16 @@ FF_ENABLE_DEPRECATION_WARNINGS
+ }
+ }
+
++#if (X265_BUILD >= 210) && (X265_BUILD < 213)
++ for (i = 0; i < MAX_SCALABLE_LAYERS; i++)
++ x265pic_lyrptr_out[i] = &x265pic_layers_out[i];
++
++ ret = ctx->api->encoder_encode(ctx->encoder, &nal, &nnal,
++ pic ? &x265pic : NULL, x265pic_lyrptr_out);
++#else
+ ret = ctx->api->encoder_encode(ctx->encoder, &nal, &nnal,
+- pic ? &x265pic : NULL, &x265pic_out);
++ pic ? &x265pic : NULL, &x265pic_solo_out);
++#endif
+
+ for (i = 0; i < sei->numPayloads; i++)
+ av_free(sei->payloads[i].payload);
+@@ -735,10 +749,16 @@ FF_ENABLE_DEPRECATION_WARNINGS
+ pkt->flags |= AV_PKT_FLAG_KEY;
+ }
+
+- pkt->pts = x265pic_out.pts;
+- pkt->dts = x265pic_out.dts;
++#if (X265_BUILD >= 210) && (X265_BUILD < 213)
++ x265pic_out = x265pic_lyrptr_out[0];
++#else
++ x265pic_out = &x265pic_solo_out;
++#endif
++
++ pkt->pts = x265pic_out->pts;
++ pkt->dts = x265pic_out->dts;
+
+- switch (x265pic_out.sliceType) {
++ switch (x265pic_out->sliceType) {
+ case X265_TYPE_IDR:
+ case X265_TYPE_I:
+ pict_type = AV_PICTURE_TYPE_I;
+@@ -756,16 +776,16 @@ FF_ENABLE_DEPRECATION_WARNINGS
+ }
+
+ #if X265_BUILD >= 130
+- if (x265pic_out.sliceType == X265_TYPE_B)
++ if (x265pic_out->sliceType == X265_TYPE_B)
+ #else
+- if (x265pic_out.frameData.sliceType == 'b')
++ if (x265pic_out->frameData.sliceType == 'b')
+ #endif
+ pkt->flags |= AV_PKT_FLAG_DISPOSABLE;
+
+- ff_side_data_set_encoder_stats(pkt, x265pic_out.frameData.qp * FF_QP2LAMBDA, NULL, 0, pict_type);
++ ff_side_data_set_encoder_stats(pkt, x265pic_out->frameData.qp * FF_QP2LAMBDA, NULL, 0, pict_type);
+
+- if (x265pic_out.userData) {
+- int idx = (int)(intptr_t)x265pic_out.userData - 1;
++ if (x265pic_out->userData) {
++ int idx = (int)(intptr_t)x265pic_out->userData - 1;
+ ReorderedData *rd = &ctx->rd[idx];
+
+ #if FF_API_REORDERED_OPAQUE
Home |
Main Index |
Thread Index |
Old Index