rkmpp: update to 93824dc

This commit is contained in:
Jonas Karlman 2018-08-21 23:37:45 +02:00
parent d4186711f8
commit cc8c0d99d5
6 changed files with 175 additions and 62 deletions

View File

@ -2,8 +2,8 @@
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="rkmpp"
PKG_VERSION="c8a41a6"
PKG_SHA256="01b84eecde7cae98035ecce866b48f903f9deaa7e19b048ff9cb87edf6446659"
PKG_VERSION="93824dc71392b9ac94ee8ca157d9f2d4739e8f8f"
PKG_SHA256="14c49ceebd6c45dbb4c601bb4815de9a27d71d47f551c998ba9d3ff255572ad8"
PKG_ARCH="arm aarch64"
PKG_LICENSE="APL"
PKG_SITE="https://github.com/rockchip-linux/mpp"
@ -21,13 +21,5 @@ else
fi
PKG_CMAKE_OPTS_TARGET="-DRKPLATFORM=ON \
-DENABLE_AVSD=OFF \
-DENABLE_H263D=OFF \
-DENABLE_H264D=ON \
-DENABLE_H265D=ON \
-DENABLE_MPEG2D=ON \
-DENABLE_MPEG4D=ON \
-DENABLE_VP8D=ON \
-DENABLE_VP9D=$PKG_ENABLE_VP9D \
-DENABLE_JPEGD=OFF \
-DHAVE_DRM=ON"

View File

@ -1,4 +1,4 @@
From e9c9f2619bb2344f9947ccbbdcf15be9d0f55b1f Mon Sep 17 00:00:00 2001
From d207d3da1107f642be937ad14d5b3cfff7780155 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] fix 32-bit mmap issue on 64-bit kernels
@ -16,7 +16,7 @@ For details see https://github.com/rockchip-linux/kernel/issues/17
1 file changed, 2 insertions(+)
diff --git a/osal/allocator/allocator_drm.c b/osal/allocator/allocator_drm.c
index 48735c90..a3a16a55 100644
index a29bf3f5..58891b28 100644
--- a/osal/allocator/allocator_drm.c
+++ b/osal/allocator/allocator_drm.c
@@ -15,6 +15,8 @@

View File

@ -0,0 +1,31 @@
From e2a70002f9a0a37f5c6297f1cc5e6604e9f9d964 Mon Sep 17 00:00:00 2001
From: Jonas Karlman <jonas@kwiboo.se>
Date: Sun, 24 Jun 2018 11:07:44 +0200
Subject: [PATCH] disable unit tests by default
---
test/CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 257a3efa..961086ae 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -10,7 +10,7 @@ macro(add_mpp_test module)
#message(STATUS "test_name : ${test_name}")
#message(STATUS "test_tag : ${test_tag}")
- option(${test_tag} "Build mpp ${module} unit test" ON)
+ option(${test_tag} "Build mpp ${module} unit test" OFF)
if(${test_tag})
add_executable(${test_name} ${test_name}.c mpp_event_trigger.c mpp_parse_cfg.c)
target_link_libraries(${test_name} ${MPP_SHARED} utils)
@@ -54,7 +54,7 @@ macro(add_legacy_test module)
#message(STATUS "test_name : ${test_name}")
#message(STATUS "test_tag : ${test_tag}")
- option(${test_tag} "Build legacy ${module} unit test" ON)
+ option(${test_tag} "Build legacy ${module} unit test" OFF)
if(${test_tag})
add_executable(${test_name} ${test_name}.c)
target_link_libraries(${test_name} ${VPU_SHARED} utils)

View File

@ -1,25 +0,0 @@
From 322efafd1f760c73accda1a7025b007f211916f7 Mon Sep 17 00:00:00 2001
From: Jonas Karlman <jonas@kwiboo.se>
Date: Sat, 3 Mar 2018 10:10:01 +0100
Subject: [PATCH] [mpp_dec]: sleep when there is nothing to parse
---
mpp/codec/mpp_dec.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mpp/codec/mpp_dec.cpp b/mpp/codec/mpp_dec.cpp
index 424604e1..dded58c6 100644
--- a/mpp/codec/mpp_dec.cpp
+++ b/mpp/codec/mpp_dec.cpp
@@ -600,8 +600,10 @@ void *mpp_dec_parser_thread(void *data)
}
parser->unlock();
- if (try_proc_dec_task(mpp, &task))
+ if (try_proc_dec_task(mpp, &task)) {
+ msleep(1);
continue;
+ }
}

View File

@ -0,0 +1,140 @@
From ccd837fab6ab41ee3cb63b0e9ae1db824f96d4dc Mon Sep 17 00:00:00 2001
From: Jonas Karlman <jonas@kwiboo.se>
Date: Tue, 7 Aug 2018 18:14:57 +0200
Subject: [PATCH] [h264d]: revert vdpu fast mode code
---
mpp/hal/rkdec/h264d/hal_h264d_vdpu1.c | 18 +++++-------------
mpp/hal/rkdec/h264d/hal_h264d_vdpu2.c | 18 +++++-------------
2 files changed, 10 insertions(+), 26 deletions(-)
diff --git a/mpp/hal/rkdec/h264d/hal_h264d_vdpu1.c b/mpp/hal/rkdec/h264d/hal_h264d_vdpu1.c
index 1cddfc45..660e41f3 100644
--- a/mpp/hal/rkdec/h264d/hal_h264d_vdpu1.c
+++ b/mpp/hal/rkdec/h264d/hal_h264d_vdpu1.c
@@ -416,7 +416,8 @@ static MPP_RET vdpu1_set_vlc_regs(H264dHalCtx_t *p_hal,
//!< set poc to buffer
{
H264dVdpuRegCtx_t *reg_ctx = (H264dVdpuRegCtx_t *)p_hal->reg_ctx;
- RK_U32 *pocBase = (RK_U32 *)mpp_buffer_get_ptr(reg_ctx->poc_buf);
+ RK_U32 *pocBase = (RK_U32 *)((RK_U8 *)mpp_buffer_get_ptr(reg_ctx->cabac_buf)
+ + VDPU_CABAC_TAB_SIZE);
//!< set reference reorder poc
for (i = 0; i < 32; i++) {
@@ -620,7 +621,8 @@ static MPP_RET vdpu1_set_asic_regs(H264dHalCtx_t *p_hal,
H264dVdpuRegCtx_t *reg_ctx = (H264dVdpuRegCtx_t *)p_hal->reg_ctx;
if (p_hal->pp->scaleing_list_enable_flag) {
RK_U32 temp = 0;
- RK_U32 *ptr = (RK_U32 *)mpp_buffer_get_ptr(reg_ctx->sclst_buf);
+ RK_U32 *ptr = (RK_U32 *)((RK_U8 *)mpp_buffer_get_ptr(reg_ctx->cabac_buf)
+ + VDPU_CABAC_TAB_SIZE + VDPU_POC_BUF_SIZE);
for (i = 0; i < 6; i++) {
for (j = 0; j < 4; j++) {
@@ -722,21 +724,15 @@ MPP_RET vdpu1_h264d_init(void *hal, MppHalCfg *cfg)
H264dVdpuRegCtx_t *reg_ctx = (H264dVdpuRegCtx_t *)p_hal->reg_ctx;
//!< malloc buffers
FUN_CHECK(ret = mpp_buffer_get(p_hal->buf_group,
- &reg_ctx->cabac_buf, VDPU_CABAC_TAB_SIZE));
+ &reg_ctx->cabac_buf, VDPU_CABAC_TAB_SIZE + VDPU_POC_BUF_SIZE + VDPU_SCALING_LIST_SIZE));
RK_U32 i = 0;
RK_U32 loop = p_hal->fast_mode ? MPP_ARRAY_ELEMS(reg_ctx->reg_buf) : 1;
for (i = 0; i < loop; i++) {
reg_ctx->reg_buf[i].regs = mpp_calloc_size(void, sizeof(H264dVdpu1Regs_t));
- FUN_CHECK(ret = mpp_buffer_get(p_hal->buf_group,
- &reg_ctx->reg_buf[i].poc, VDPU_POC_BUF_SIZE));
- FUN_CHECK(ret = mpp_buffer_get(p_hal->buf_group,
- &reg_ctx->reg_buf[i].sclst, VDPU_SCALING_LIST_SIZE));
}
if (!p_hal->fast_mode) {
reg_ctx->regs = reg_ctx->reg_buf[0].regs;
- reg_ctx->poc_buf = reg_ctx->reg_buf[0].poc;
- reg_ctx->sclst_buf = reg_ctx->reg_buf[0].sclst;
}
//!< copy cabac table bytes
FUN_CHECK(ret = mpp_buffer_write(reg_ctx->cabac_buf, 0,
@@ -771,8 +767,6 @@ MPP_RET vdpu1_h264d_deinit(void *hal)
RK_U32 loop = p_hal->fast_mode ? MPP_ARRAY_ELEMS(reg_ctx->reg_buf) : 1;
for (i = 0; i < loop; i++) {
MPP_FREE(reg_ctx->reg_buf[i].regs);
- mpp_buffer_put(reg_ctx->reg_buf[i].poc);
- mpp_buffer_put(reg_ctx->reg_buf[i].sclst);
}
mpp_buffer_put(reg_ctx->cabac_buf);
MPP_FREE(p_hal->reg_ctx);
@@ -809,8 +803,6 @@ MPP_RET vdpu1_h264d_gen_regs(void *hal, HalTaskInfo *task)
for (i = 0; i < MPP_ARRAY_ELEMS(reg_ctx->reg_buf); i++) {
if (!reg_ctx->reg_buf[i].valid) {
task->dec.reg_index = i;
- reg_ctx->poc_buf = reg_ctx->reg_buf[i].poc;
- reg_ctx->sclst_buf = reg_ctx->reg_buf[i].sclst;
reg_ctx->regs = reg_ctx->reg_buf[i].regs;
reg_ctx->reg_buf[i].valid = 1;
break;
diff --git a/mpp/hal/rkdec/h264d/hal_h264d_vdpu2.c b/mpp/hal/rkdec/h264d/hal_h264d_vdpu2.c
index fa55e635..9b22c1d9 100644
--- a/mpp/hal/rkdec/h264d/hal_h264d_vdpu2.c
+++ b/mpp/hal/rkdec/h264d/hal_h264d_vdpu2.c
@@ -451,7 +451,8 @@ static MPP_RET set_vlc_regs(H264dHalCtx_t *p_hal, H264dVdpuRegs_t *p_regs)
//!< set poc to buffer
{
H264dVdpuRegCtx_t *reg_ctx = (H264dVdpuRegCtx_t *)p_hal->reg_ctx;
- RK_U32 *ptr = (RK_U32 *)mpp_buffer_get_ptr(reg_ctx->poc_buf);
+ RK_U32 *ptr = (RK_U32 *)((RK_U8 *)mpp_buffer_get_ptr(reg_ctx->cabac_buf)
+ + VDPU_CABAC_TAB_SIZE);
//!< set reference reorder poc
for (i = 0; i < 32; i++) {
if (pp->RefFrameList[i / 2].bPicEntry != 0xff) {
@@ -636,7 +637,8 @@ static MPP_RET set_asic_regs(H264dHalCtx_t *p_hal, H264dVdpuRegs_t *p_regs)
H264dVdpuRegCtx_t *reg_ctx = (H264dVdpuRegCtx_t *)p_hal->reg_ctx;
if (p_hal->pp->scaleing_list_enable_flag) {
RK_U32 temp = 0;
- RK_U32 *ptr = (RK_U32 *)mpp_buffer_get_ptr(reg_ctx->cabac_buf);
+ RK_U32 *ptr = (RK_U32 *)((RK_U8 *)mpp_buffer_get_ptr(reg_ctx->cabac_buf)
+ + VDPU_CABAC_TAB_SIZE + VDPU_POC_BUF_SIZE);
for (i = 0; i < 6; i++) {
for (j = 0; j < 4; j++) {
@@ -686,21 +688,15 @@ MPP_RET vdpu2_h264d_init(void *hal, MppHalCfg *cfg)
H264dVdpuRegCtx_t *reg_ctx = (H264dVdpuRegCtx_t *)p_hal->reg_ctx;
//!< malloc buffers
FUN_CHECK(ret = mpp_buffer_get(p_hal->buf_group,
- &reg_ctx->cabac_buf, VDPU_CABAC_TAB_SIZE));
+ &reg_ctx->cabac_buf, VDPU_CABAC_TAB_SIZE + VDPU_POC_BUF_SIZE + VDPU_SCALING_LIST_SIZE));
RK_U32 i = 0;
RK_U32 loop = p_hal->fast_mode ? MPP_ARRAY_ELEMS(reg_ctx->reg_buf) : 1;
for (i = 0; i < loop; i++) {
reg_ctx->reg_buf[i].regs = mpp_calloc_size(void, sizeof(H264dVdpuRegs_t));
- FUN_CHECK(ret = mpp_buffer_get(p_hal->buf_group,
- &reg_ctx->reg_buf[i].poc, VDPU_POC_BUF_SIZE));
- FUN_CHECK(ret = mpp_buffer_get(p_hal->buf_group,
- &reg_ctx->reg_buf[i].sclst, VDPU_SCALING_LIST_SIZE));
}
if (!p_hal->fast_mode) {
reg_ctx->regs = reg_ctx->reg_buf[0].regs;
- reg_ctx->poc_buf = reg_ctx->reg_buf[0].poc;
- reg_ctx->sclst_buf = reg_ctx->reg_buf[0].sclst;
}
//!< copy cabac table bytes
FUN_CHECK(ret = mpp_buffer_write(reg_ctx->cabac_buf, 0,
@@ -735,8 +731,6 @@ MPP_RET vdpu2_h264d_deinit(void *hal)
RK_U32 loop = p_hal->fast_mode ? MPP_ARRAY_ELEMS(reg_ctx->reg_buf) : 1;
for (i = 0; i < loop; i++) {
MPP_FREE(reg_ctx->reg_buf[i].regs);
- mpp_buffer_put(reg_ctx->reg_buf[i].poc);
- mpp_buffer_put(reg_ctx->reg_buf[i].sclst);
}
mpp_buffer_put(reg_ctx->cabac_buf);
MPP_FREE(p_hal->reg_ctx);
@@ -773,8 +767,6 @@ MPP_RET vdpu2_h264d_gen_regs(void *hal, HalTaskInfo *task)
for (i = 0; i < MPP_ARRAY_ELEMS(reg_ctx->reg_buf); i++) {
if (!reg_ctx->reg_buf[i].valid) {
task->dec.reg_index = i;
- reg_ctx->poc_buf = reg_ctx->reg_buf[i].poc;
- reg_ctx->sclst_buf = reg_ctx->reg_buf[i].sclst;
reg_ctx->regs = reg_ctx->reg_buf[i].regs;
reg_ctx->reg_buf[i].valid = 1;
break;

View File

@ -1,25 +0,0 @@
diff --git a/mpp/hal/rkdec/h265d/hal_h265d_reg.h b/mpp/hal/rkdec/h265d/hal_h265d_reg.h
index 1bccb02..432b8db 100644
--- a/mpp/hal/rkdec/h265d/hal_h265d_reg.h
+++ b/mpp/hal/rkdec/h265d/hal_h265d_reg.h
@@ -50,7 +50,8 @@ typedef struct {
struct swreg_int {
RK_U32 sw_dec_e : 1 ;
RK_U32 sw_dec_clkgate_e : 1 ;
- RK_U32 reserve0 : 2 ;
+ RK_U32 reserve0 : 1 ;
+ RK_U32 sw_timeout_mode : 1 ;
RK_U32 sw_dec_irq_dis : 1 ;
RK_U32 sw_dec_timeout_e : 1 ;
RK_U32 sw_buf_empty_en : 1 ;
@@ -61,8 +62,9 @@ typedef struct {
RK_U32 sw_dec_rdy_sta : 1 ;
RK_U32 sw_dec_bus_sta : 1 ;
RK_U32 sw_dec_error_sta : 1 ;
+ RK_U32 sw_dec_timeout_sta : 1 ;
RK_U32 sw_dec_empty_sta : 1 ;
- RK_U32 reserve4 : 4 ;
+ RK_U32 reserve3 : 3 ;
RK_U32 sw_softrst_en_p : 1 ;
RK_U32 sw_force_softreset_valid: 1 ;
RK_U32 sw_softreset_rdy : 1 ;