rkmpp: update to 90c9f77

This commit is contained in:
Jonas Karlman 2017-11-13 23:39:42 +01:00
parent 6638fa5f60
commit 13b257e58c
4 changed files with 113 additions and 16 deletions

View File

@ -17,8 +17,8 @@
################################################################################
PKG_NAME="rkmpp"
PKG_VERSION="60cbbff"
PKG_SHA256="fa442a006c5ddf395649ea0ed088851ecf1e15c254f03fd99e84164590b40b4f"
PKG_VERSION="90c9f77"
PKG_SHA256="8bd361e506446fa381897547b48800a70f69e3f39e5188929c8dbde44861aa69"
PKG_ARCH="arm aarch64"
PKG_LICENSE="APL"
PKG_SITE="https://github.com/rockchip-linux/mpp"

View File

@ -0,0 +1,31 @@
From 7adc82dade16d0f12f3cbfb3a1163f80e8034966 Mon Sep 17 00:00:00 2001
From: Randy Li <randy.li@rock-chips.com>
Date: Wed, 15 Mar 2017 15:14:45 +0800
Subject: [PATCH 1/3] [osal]: add rk3036 platform
Change-Id: I82029e8345d3c8e2a9a3baf4be55b7f4c9b284f0
Signed-off-by: Randy Li <randy.li@rock-chips.com>
---
osal/mpp_platform.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/osal/mpp_platform.cpp b/osal/mpp_platform.cpp
index 2238eecc..db21d28f 100644
--- a/osal/mpp_platform.cpp
+++ b/osal/mpp_platform.cpp
@@ -31,6 +31,7 @@ class MppPlatformService;
typedef enum RockchipSocType_e {
ROCKCHIP_SOC_AUTO,
+ ROCKCHIP_SOC_RK3036,
ROCKCHIP_SOC_RK3066,
ROCKCHIP_SOC_RK3188,
ROCKCHIP_SOC_RK3288,
@@ -52,6 +53,7 @@ typedef struct {
} MppVpuType;
static const MppVpuType mpp_vpu_version[] = {
+ { "rk3036", ROCKCHIP_SOC_RK3036, HAVE_VPU1 | HAVE_HEVC_DEC, },
{ "rk3066", ROCKCHIP_SOC_RK3066, HAVE_VPU1, },
{ "rk3188", ROCKCHIP_SOC_RK3188, HAVE_VPU1, },
{ "rk3288", ROCKCHIP_SOC_RK3288, HAVE_VPU1 | HAVE_HEVC_DEC, },

View File

@ -0,0 +1,75 @@
From 7eeac4c01e577ce81ab5b4356691566dcc897a38 Mon Sep 17 00:00:00 2001
From: LongChair <LongChair@hotmail.com>
Date: Wed, 26 Apr 2017 11:45:37 +0200
Subject: [PATCH 2/3] [mpp]: retrieve available input packet free slots
This is something that allows to know before putting a packet into
the decoder if it would accept it or if it is full.
This patch also adds a constant define for the input buffer count
rather than having the 4 hardcoded.
Change-Id: I876e5d4efd0b2e38619ab87d4147a40bedee5669
Signed-off-by: LongChair <LongChair@hotmail.com>
Reviewed-by: ayaka <ayaka@soulik.info>
Signed-off-by: Randy Li <randy.li@rock-chips.com>
---
inc/rk_mpi_cmd.h | 1 +
mpp/mpp.cpp | 11 ++++++++---
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/inc/rk_mpi_cmd.h b/inc/rk_mpi_cmd.h
index b67b65dd..0eaa328d 100644
--- a/inc/rk_mpi_cmd.h
+++ b/inc/rk_mpi_cmd.h
@@ -96,6 +96,7 @@ typedef enum {
MPP_DEC_SET_VC1_EXTRA_DATA,
MPP_DEC_SET_OUTPUT_FORMAT,
MPP_DEC_CHANGE_HARD_MODE,
+ MPP_DEC_GET_FREE_PACKET_SLOT_COUNT,
MPP_DEC_CMD_END,
MPP_ENC_CMD_BASE = CMD_MODULE_CODEC | CMD_CTX_ID_ENC,
diff --git a/mpp/mpp.cpp b/mpp/mpp.cpp
index c77aac12..321ea76d 100644
--- a/mpp/mpp.cpp
+++ b/mpp/mpp.cpp
@@ -33,6 +33,7 @@
#define MPP_TEST_FRAME_SIZE SZ_1M
#define MPP_TEST_PACKET_SIZE SZ_512K
+#define MPP_MAX_INPUT_PACKETS 4
Mpp::Mpp()
: mPackets(NULL),
@@ -102,8 +103,8 @@ MPP_RET Mpp::init(MppCtxType type, MppCodingType coding)
mpp_task_queue_init(&mInputTaskQueue);
mpp_task_queue_init(&mOutputTaskQueue);
- mpp_task_queue_setup(mInputTaskQueue, 4);
- mpp_task_queue_setup(mOutputTaskQueue, 4);
+ mpp_task_queue_setup(mInputTaskQueue, MPP_MAX_INPUT_PACKETS);
+ mpp_task_queue_setup(mOutputTaskQueue, MPP_MAX_INPUT_PACKETS);
} else {
mThreadCodec = new MppThread(mpp_dec_advanced_thread, this, "mpp_dec_parser");
@@ -258,7 +259,7 @@ MPP_RET Mpp::put_packet(MppPacket packet)
AutoMutex autoLock(mPackets->mutex());
RK_U32 eos = mpp_packet_get_eos(packet);
- if (mPackets->list_size() < 4 || eos) {
+ if (mPackets->list_size() < MPP_MAX_INPUT_PACKETS || eos) {
MppPacket pkt;
if (MPP_OK != mpp_packet_copy_init(&pkt, packet))
return MPP_NOK;
@@ -745,6 +746,10 @@ MPP_RET Mpp::control_dec(MpiCmd cmd, MppParam param)
case MPP_DEC_SET_OUTPUT_FORMAT: {
ret = mpp_dec_control(mDec, cmd, param);
} break;
+ case MPP_DEC_GET_FREE_PACKET_SLOT_COUNT: {
+ *((RK_S32 *)param) = MPP_MAX_INPUT_PACKETS - mPackets->list_size();
+ ret = MPP_OK;
+ } break;
default : {
} break;
}

View File

@ -1,7 +1,7 @@
From 376fb9c7c24c3b8a322cd583839d582cd7041d47 Mon Sep 17 00:00:00 2001
From e34511ef9354282ff1edf87391a9ea1a3a321292 Mon Sep 17 00:00:00 2001
From: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
Date: Mon, 29 May 2017 14:08:43 +0200
Subject: [PATCH] [drm] fix 32-bit mmap issue on 64-bit kernels
Subject: [PATCH 3/3] fix 32-bit mmap issue on 64-bit kernels
Running 32-bit userland on a 64-bit kernel resulted in the error:
@ -12,11 +12,11 @@ value to 32 bit. This patch fixes both issues.
For details see https://github.com/rockchip-linux/kernel/issues/17
---
osal/allocator/allocator_drm.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
osal/allocator/allocator_drm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/osal/allocator/allocator_drm.c b/osal/allocator/allocator_drm.c
index 3057671f..9a4e31fe 100644
index 48735c90..a3a16a55 100644
--- a/osal/allocator/allocator_drm.c
+++ b/osal/allocator/allocator_drm.c
@@ -15,6 +15,8 @@
@ -28,12 +28,3 @@ index 3057671f..9a4e31fe 100644
#include <unistd.h>
#include <string.h>
@@ -67,7 +69,7 @@ static int drm_ioctl(int fd, int req, void *arg)
static void* drm_mmap(int fd, size_t len, int prot, int flags, loff_t offset)
{
- static unsigned long pagesize_mask = 0;
+ static loff_t pagesize_mask = 0;
#if !defined(__gnu_linux__)
func_mmap64 fp_mmap64 = mpp_rt_get_mmap64();
#endif