forked from libretro/Lakka-LibreELEC
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lakka v5.x switch 6 (upstream of libretro#1926)
- Loading branch information
1 parent
96bc6f2
commit 00390d3
Showing
54 changed files
with
2,455 additions
and
971 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1,530 changes: 808 additions & 722 deletions
1,530
...es/multimedia/ffmpeg/patches/L4T/0001-codecs-add-nvv4l2-codec-for-Nvidia-Tegra-SOCs.patch
Large diffs are not rendered by default.
Oops, something went wrong.
75 changes: 75 additions & 0 deletions
75
packages/multimedia/ffmpeg/patches/L4T/0002-fftools-libavformat-Enforce-nvv4l2.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
From ffa9de21d7415d53f2f02b674438a41daaeee209 Mon Sep 17 00:00:00 2001 | ||
From: CTCaer <ctcaer@gmail.com> | ||
Date: Sat, 5 Mar 2022 03:30:44 +0000 | ||
Subject: [PATCH 02/39] fftools/libavformat: Enforce nvv4l2 | ||
|
||
This enforces NVV4L2 even if user requests another codec. | ||
Additionally, it forces nvv4l2 to go through software codecs first to get context if needed. | ||
--- | ||
fftools/ffplay.c | 25 +++++++++++++++++++++++++ | ||
libavformat/demux.c | 13 +++++++++++++ | ||
2 files changed, 38 insertions(+) | ||
|
||
diff --git a/fftools/ffplay.c b/fftools/ffplay.c | ||
index d6479aef5f..86f8425a15 100644 | ||
--- a/fftools/ffplay.c | ||
+++ b/fftools/ffplay.c | ||
@@ -2590,6 +2590,31 @@ static int stream_component_open(VideoState *is, int stream_index) | ||
case AVMEDIA_TYPE_SUBTITLE: is->last_subtitle_stream = stream_index; forced_codec_name = subtitle_codec_name; break; | ||
case AVMEDIA_TYPE_VIDEO : is->last_video_stream = stream_index; forced_codec_name = video_codec_name; break; | ||
} | ||
+ | ||
+#if CONFIG_NVV4L2 | ||
+ /* Reset requested decoder in order to enforce NVV4L2 if possible. */ | ||
+ if (avctx->codec_type == AVMEDIA_TYPE_VIDEO && forced_codec_name) { | ||
+ if (strcmp(forced_codec_name, "h264") == 0) | ||
+ forced_codec_name = NULL; | ||
+ else if (strcmp(forced_codec_name, "hevc") == 0) | ||
+ forced_codec_name = NULL; | ||
+ else if (strcmp(forced_codec_name, "mpeg2video") == 0) | ||
+ forced_codec_name = NULL; | ||
+ else if (strcmp(forced_codec_name, "mpeg4") == 0) | ||
+ forced_codec_name = NULL; | ||
+ else if (strcmp(forced_codec_name, "vp8") == 0) | ||
+ forced_codec_name = NULL; | ||
+ else if (strcmp(forced_codec_name, "vp9") == 0 && | ||
+ avctx->pix_fmt != AV_PIX_FMT_YUV420P10) { | ||
+ forced_codec_name = NULL; | ||
+ } | ||
+ } | ||
+ | ||
+ /* NVV4L2 does not support VP9 with YUV420P10. */ | ||
+ if (!forced_codec_name && avctx->pix_fmt == AV_PIX_FMT_YUV420P10) | ||
+ forced_codec_name = "vp9"; | ||
+#endif | ||
+ | ||
if (forced_codec_name) | ||
codec = avcodec_find_decoder_by_name(forced_codec_name); | ||
if (!codec) { | ||
diff --git a/libavformat/demux.c b/libavformat/demux.c | ||
index b19ab86d08..ae60a819d5 100644 | ||
--- a/libavformat/demux.c | ||
+++ b/libavformat/demux.c | ||
@@ -77,6 +77,19 @@ static const AVCodec *find_probe_decoder(AVFormatContext *s, const AVStream *st, | ||
if (codec_id == AV_CODEC_ID_H264) | ||
return avcodec_find_decoder_by_name("h264"); | ||
#endif | ||
+#if CONFIG_NVV4L2 | ||
+ /* NVV4L2 decoders depend on context init from base decoders */ | ||
+ if (codec_id == AV_CODEC_ID_HEVC) | ||
+ return avcodec_find_decoder_by_name("hevc"); | ||
+ else if (codec_id == AV_CODEC_ID_MPEG2VIDEO) | ||
+ return avcodec_find_decoder_by_name("mpeg2video"); | ||
+ else if (codec_id == AV_CODEC_ID_MPEG4) | ||
+ return avcodec_find_decoder_by_name("mpeg4"); | ||
+ else if (codec_id == AV_CODEC_ID_VP8) | ||
+ return avcodec_find_decoder_by_name("vp8"); | ||
+ else if (codec_id == AV_CODEC_ID_VP9) | ||
+ return avcodec_find_decoder_by_name("vp9"); | ||
+#endif | ||
|
||
codec = ff_find_decoder(s, st, codec_id); | ||
if (!codec) | ||
-- | ||
2.25.1 | ||
|
4 changes: 2 additions & 2 deletions
4
...4T/0004-codecs-nvv4l2-avoid-probing.patch → ...4T/0003-codecs-nvv4l2-avoid-probing.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
87 changes: 0 additions & 87 deletions
87
packages/multimedia/ffmpeg/patches/L4T/0003-fftools-libavformat-Enforce-nvv4l2.patch
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...-codecs-nvv4l2-use-atomics-for-pool.patch → ...-codecs-nvv4l2-use-atomics-for-pool.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...-new-functions-and-update-context-a.patch → ...-new-functions-and-update-context-a.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...port-multiple-L4T-versions-with-sin.patch → ...port-multiple-L4T-versions-with-sin.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...decs-nvv4l2-align-line-width-to-64B.patch → ...decs-nvv4l2-align-line-width-to-64B.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...vv4l2-add-two-pass-cbr-mode-support.patch → ...vv4l2-add-two-pass-cbr-mode-support.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...0012-codecs-nvv4l2-various-bugfixes.patch → ...0011-codecs-nvv4l2-various-bugfixes.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...-hanging-on-event-wait-if-no-full-f.patch → ...-hanging-on-event-wait-if-no-full-f.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...l2-use-sessions-for-transformations.patch → ...l2-use-sessions-for-transformations.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...l2-support-all-different-timestamps.patch → ...l2-support-all-different-timestamps.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...16-codecs-nvv4l2-BSP-34.1.x-remarks.patch → ...15-codecs-nvv4l2-BSP-34.1.x-remarks.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...l2-support-BT709-BT2020-colorspaces.patch → ...l2-support-BT709-BT2020-colorspaces.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...4l2-reorder-capture-buffer-queueing.patch → ...4l2-reorder-capture-buffer-queueing.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...l2-align-encoder-plane-width-to-64B.patch → ...l2-align-encoder-plane-width-to-64B.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.