mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-31 06:36:41 +00:00
Merge pull request #10297 from heitbaum/ffmpegx122
[le12.2] ffmpeg-tools: update ffmpegx to 7.1.1
This commit is contained in:
commit
860312e93f
@ -2,8 +2,8 @@
|
|||||||
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
||||||
|
|
||||||
PKG_NAME="ffmpegx"
|
PKG_NAME="ffmpegx"
|
||||||
PKG_VERSION="6.0.1"
|
PKG_VERSION="7.1.1"
|
||||||
PKG_SHA256="9b16b8731d78e596b4be0d720428ca42df642bb2d78342881ff7f5bc29fc9623"
|
PKG_SHA256="733984395e0dbbe5c046abda2dc49a5544e7e0e1e2366bba849222ae9e3a03b1"
|
||||||
PKG_LICENSE="GPL-3.0-only"
|
PKG_LICENSE="GPL-3.0-only"
|
||||||
PKG_SITE="https://ffmpeg.org"
|
PKG_SITE="https://ffmpeg.org"
|
||||||
PKG_URL="https://ffmpeg.org/releases/ffmpeg-${PKG_VERSION}.tar.xz"
|
PKG_URL="https://ffmpeg.org/releases/ffmpeg-${PKG_VERSION}.tar.xz"
|
||||||
@ -35,7 +35,7 @@ pre_configure_target() {
|
|||||||
cd ${PKG_BUILD}
|
cd ${PKG_BUILD}
|
||||||
rm -rf .${TARGET_NAME}
|
rm -rf .${TARGET_NAME}
|
||||||
|
|
||||||
# HW encoders
|
# HW encoders
|
||||||
|
|
||||||
# Generic
|
# Generic
|
||||||
if [[ "${TARGET_ARCH}" = "x86_64" ]]; then
|
if [[ "${TARGET_ARCH}" = "x86_64" ]]; then
|
||||||
@ -69,7 +69,7 @@ pre_configure_target() {
|
|||||||
--enable-encoder=libx265"
|
--enable-encoder=libx265"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Encoders
|
# Encoders
|
||||||
PKG_FFMPEG_ENCODERS="\
|
PKG_FFMPEG_ENCODERS="\
|
||||||
`#Video encoders` \
|
`#Video encoders` \
|
||||||
--enable-libvpx \
|
--enable-libvpx \
|
||||||
@ -91,7 +91,7 @@ pre_configure_target() {
|
|||||||
--enable-libvorbis \
|
--enable-libvorbis \
|
||||||
--enable-encoder=libvorbis"
|
--enable-encoder=libvorbis"
|
||||||
|
|
||||||
# X11 grab for screen recording
|
# X11 grab for screen recording
|
||||||
if [ "${DISPLAYSERVER}" = "x11" ]; then
|
if [ "${DISPLAYSERVER}" = "x11" ]; then
|
||||||
PKG_FFMPEG_LIBS+=" -lX11"
|
PKG_FFMPEG_LIBS+=" -lX11"
|
||||||
PKG_FFMPEG_X11_GRAB="\
|
PKG_FFMPEG_X11_GRAB="\
|
||||||
@ -165,6 +165,6 @@ configure_target() {
|
|||||||
--enable-libxml2 \
|
--enable-libxml2 \
|
||||||
\
|
\
|
||||||
`#Advanced options` \
|
`#Advanced options` \
|
||||||
--disable-hardcoded-tables \
|
--disable-hardcoded-tables
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,96 +0,0 @@
|
|||||||
From 1f801dfdb5066aadf0ade9cb5e94d620f33eacdc Mon Sep 17 00:00:00 2001
|
|
||||||
From: Gyan Doshi <ffmpeg@gyani.pro>
|
|
||||||
Date: Sun, 11 Aug 2024 12:51:50 +0530
|
|
||||||
Subject: [PATCH] lavc/libx265: unbreak build for X265_BUILD >= 210
|
|
||||||
|
|
||||||
x265 added support for alpha starting with build 210.
|
|
||||||
While doing so, x265_encoder_encode() changed its fifth arg to
|
|
||||||
an array of pointers to x265_picture. This broke building lavc/libx265.c
|
|
||||||
|
|
||||||
This patch simply unbreaks the build and maintains existing single-layer
|
|
||||||
non-alpha encoding support.
|
|
||||||
|
|
||||||
Fixes #11130
|
|
||||||
---
|
|
||||||
libavcodec/libx265.c | 40 ++++++++++++++++++++++++++++++----------
|
|
||||||
1 file changed, 30 insertions(+), 10 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
|
|
||||||
index 0dc7ab6eeb6a3..3bc3b5a03e9fc 100644
|
|
||||||
--- a/libavcodec/libx265.c
|
|
||||||
+++ b/libavcodec/libx265.c
|
|
||||||
@@ -661,7 +661,13 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|
||||||
{
|
|
||||||
libx265Context *ctx = avctx->priv_data;
|
|
||||||
x265_picture x265pic;
|
|
||||||
- x265_picture x265pic_out = { 0 };
|
|
||||||
+#if X265_BUILD >= 210
|
|
||||||
+ 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;
|
|
||||||
@@ -798,8 +804,16 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
+#if X265_BUILD >= 210
|
|
||||||
+ 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);
|
|
||||||
@@ -829,10 +843,16 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|
||||||
pkt->flags |= AV_PKT_FLAG_KEY;
|
|
||||||
}
|
|
||||||
|
|
||||||
- pkt->pts = x265pic_out.pts;
|
|
||||||
- pkt->dts = x265pic_out.dts;
|
|
||||||
+#if X265_BUILD >= 210
|
|
||||||
+ 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;
|
|
||||||
@@ -850,16 +870,16 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|
||||||
}
|
|
||||||
|
|
||||||
#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];
|
|
||||||
|
|
||||||
pkt->duration = rd->duration;
|
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
PKG_NAME="ffmpeg-tools"
|
PKG_NAME="ffmpeg-tools"
|
||||||
PKG_VERSION="1.0"
|
PKG_VERSION="1.0"
|
||||||
PKG_REV="0"
|
PKG_REV="1"
|
||||||
PKG_ARCH="any"
|
PKG_ARCH="any"
|
||||||
PKG_LICENSE="GPL"
|
PKG_LICENSE="GPL"
|
||||||
PKG_SITE="https://libreelec.tv"
|
PKG_SITE="https://libreelec.tv"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user