mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
ffmpeg: update rkmpp patches
This commit is contained in:
parent
2a5b368872
commit
749b9b2068
@ -1,4 +1,4 @@
|
||||
From 9d00331a2ef4a06b9bdc84de78623384f2e2111e Mon Sep 17 00:00:00 2001
|
||||
From 39f9392e40cc6fb1492f51d2f2b4c87d1503ca39 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Fri, 31 Aug 2018 21:17:27 +0200
|
||||
Subject: [PATCH] rkmppdec: Kodi need more buffers
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 35e9805c3dfc636d1a3130411c5c210c091776ee Mon Sep 17 00:00:00 2001
|
||||
From ca3c0a0b70373da243949b7b72bbbf8bb47f01d5 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Sun, 9 Sep 2018 12:37:29 +0200
|
||||
Subject: [PATCH] rkmppdec: continue on errinfo frame
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 7ddf0485e54d624d11aaa0234e7bf4b9b8393ae3 Mon Sep 17 00:00:00 2001
|
||||
From 5062ff7504a92a144b32e20b6b4d5627240f81c8 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Wed, 12 Sep 2018 22:29:22 +0200
|
||||
Subject: [PATCH] rkmppdec: enable mpeg2
|
||||
@ -11,10 +11,10 @@ Subject: [PATCH] rkmppdec: enable mpeg2
|
||||
4 files changed, 11 insertions(+)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 827abfe694..38492d3b33 100755
|
||||
index 15e6c321b1..c17252f883 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -2932,6 +2932,7 @@ mpeg2_crystalhd_decoder_select="crystalhd"
|
||||
@@ -2954,6 +2954,7 @@ mpeg2_crystalhd_decoder_select="crystalhd"
|
||||
mpeg2_cuvid_decoder_deps="cuvid"
|
||||
mpeg2_mmal_decoder_deps="mmal"
|
||||
mpeg2_mediacodec_decoder_deps="mediacodec"
|
||||
|
@ -1,14 +1,14 @@
|
||||
From 1a02e726f50ae2ce007854ee473a9f69617e2947 Mon Sep 17 00:00:00 2001
|
||||
From 6d97fb902d7e69a9b706664223bf53ab3b2f9054 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Sat, 22 Jun 2019 16:08:25 +0000
|
||||
Subject: [PATCH] rkmppdec: set mastering display and content light side data
|
||||
|
||||
---
|
||||
libavcodec/rkmppdec.c | 62 +++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 62 insertions(+)
|
||||
libavcodec/rkmppdec.c | 64 +++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 64 insertions(+)
|
||||
|
||||
diff --git a/libavcodec/rkmppdec.c b/libavcodec/rkmppdec.c
|
||||
index 48016bc681..74938443df 100644
|
||||
index 48016bc681..faae23c064 100644
|
||||
--- a/libavcodec/rkmppdec.c
|
||||
+++ b/libavcodec/rkmppdec.c
|
||||
@@ -35,6 +35,7 @@
|
||||
@ -19,11 +19,11 @@ index 48016bc681..74938443df 100644
|
||||
#include "libavutil/imgutils.h"
|
||||
#include "libavutil/log.h"
|
||||
|
||||
@@ -319,6 +320,59 @@ static void rkmpp_release_frame(void *opaque, uint8_t *data)
|
||||
@@ -319,6 +320,61 @@ static void rkmpp_release_frame(void *opaque, uint8_t *data)
|
||||
av_free(desc);
|
||||
}
|
||||
|
||||
+static void rkmpp_hevc_mastering_display(AVFrame *frame, MppFrameMasteringDisplayMetadata mastering_display)
|
||||
+static int rkmpp_hevc_mastering_display(AVFrame *frame, MppFrameMasteringDisplayMetadata mastering_display)
|
||||
+{
|
||||
+ // HEVC uses a g,b,r ordering, which we convert to a more natural r,g,b
|
||||
+ AVMasteringDisplayMetadata *metadata;
|
||||
@ -58,9 +58,10 @@ index 48016bc681..74938443df 100644
|
||||
+ metadata->min_luminance.den = luma_den;
|
||||
+ metadata->has_luminance = 1;
|
||||
+ metadata->has_primaries = 1;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void rkmpp_hevc_content_light(AVFrame *frame, MppFrameContentLightMetadata content_light)
|
||||
+static int rkmpp_hevc_content_light(AVFrame *frame, MppFrameContentLightMetadata content_light)
|
||||
+{
|
||||
+ AVContentLightMetadata *metadata;
|
||||
+
|
||||
@ -74,12 +75,13 @@ index 48016bc681..74938443df 100644
|
||||
+
|
||||
+ metadata->MaxCLL = content_light.MaxCLL;
|
||||
+ metadata->MaxFALL = content_light.MaxFALL;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int rkmpp_retrieve_frame(AVCodecContext *avctx, AVFrame *frame)
|
||||
{
|
||||
RKMPPDecodeContext *rk_context = avctx->priv_data;
|
||||
@@ -352,6 +406,11 @@ static int rkmpp_retrieve_frame(AVCodecContext *avctx, AVFrame *frame)
|
||||
@@ -352,6 +408,11 @@ static int rkmpp_retrieve_frame(AVCodecContext *avctx, AVFrame *frame)
|
||||
avctx->width = mpp_frame_get_width(mppframe);
|
||||
avctx->height = mpp_frame_get_height(mppframe);
|
||||
|
||||
@ -91,7 +93,7 @@ index 48016bc681..74938443df 100644
|
||||
decoder->mpi->control(decoder->ctx, MPP_DEC_SET_INFO_CHANGE_READY, NULL);
|
||||
|
||||
av_buffer_unref(&decoder->frames_ref);
|
||||
@@ -410,6 +469,9 @@ static int rkmpp_retrieve_frame(AVCodecContext *avctx, AVFrame *frame)
|
||||
@@ -410,6 +471,9 @@ static int rkmpp_retrieve_frame(AVCodecContext *avctx, AVFrame *frame)
|
||||
MppFrameRational dar = mpp_frame_get_sar(mppframe);
|
||||
frame->sample_aspect_ratio = av_div_q((AVRational) { dar.num, dar.den },
|
||||
(AVRational) { frame->width, frame->height });
|
||||
|
Loading…
x
Reference in New Issue
Block a user