mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-14 21:25:42 +08:00
[mpp_device]: Increase offset patch number
NOTE: encoder may have more than 5 address to add offset patch. Increase max offset patch number from 5 to 16. Change-Id: I0fe3c5f7a24596f87d8248fd37b4c4aa5a059dcc Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
@@ -484,6 +484,13 @@ MPP_RET vepu541_set_osd(Vepu541OsdCfg *cfg)
|
||||
if (NULL == osd || osd->num_region == 0 || NULL == osd->buf)
|
||||
return MPP_OK;
|
||||
|
||||
if (osd->num_region > 8) {
|
||||
mpp_err_f("do NOT support more than 8 regions invalid num %d\n",
|
||||
osd->num_region);
|
||||
mpp_assert(osd->num_region <= 8);
|
||||
return MPP_NOK;
|
||||
}
|
||||
|
||||
MppBuffer buf = osd->buf;
|
||||
RK_S32 fd = mpp_buffer_get_fd(buf);
|
||||
if (fd < 0) {
|
||||
|
@@ -19,6 +19,8 @@
|
||||
#include "rk_type.h"
|
||||
#include "mpp_err.h"
|
||||
|
||||
#define MPX_PATCH_NUM 16
|
||||
|
||||
typedef struct RegPatchSlotInfo_t {
|
||||
RK_U32 reg_idx;
|
||||
RK_U32 offset;
|
||||
@@ -27,7 +29,7 @@ typedef struct RegPatchSlotInfo_t {
|
||||
typedef struct RegExtraInfo_t {
|
||||
RK_U32 magic; // Fix magic value 0x4C4A46
|
||||
RK_U32 count; // valid patch info count
|
||||
RegPatchInfo patchs[5];
|
||||
RegPatchInfo patchs[MPX_PATCH_NUM];
|
||||
} RegExtraInfo;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@@ -678,6 +678,13 @@ void mpp_device_patch_add(RK_U32 *reg, RegExtraInfo *extra, RK_U32 reg_idx, RK_U
|
||||
return ;
|
||||
}
|
||||
|
||||
if (extra->count >= MPX_PATCH_NUM) {
|
||||
mpp_err_f("too much %d patch count larger than %d\n",
|
||||
extra->count, MPX_PATCH_NUM);
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
RegPatchInfo *info = &extra->patchs[extra->count++];
|
||||
info->reg_idx = reg_idx;
|
||||
info->offset = offset;
|
||||
|
@@ -68,6 +68,8 @@ typedef struct mppReqV1_t {
|
||||
RK_U64 data_ptr;
|
||||
} MppReqV1;
|
||||
|
||||
#define MPX_PATCH_NUM 16
|
||||
|
||||
typedef struct RegPatchSlotInfo_t {
|
||||
RK_U32 reg_idx;
|
||||
RK_U32 offset;
|
||||
@@ -76,7 +78,7 @@ typedef struct RegPatchSlotInfo_t {
|
||||
typedef struct RegExtraInfo_t {
|
||||
RK_U32 magic; // Fix magic value 0x4C4A46
|
||||
RK_U32 count; // valid patch info count
|
||||
RegPatchInfo patchs[5];
|
||||
RegPatchInfo patchs[MPX_PATCH_NUM];
|
||||
} RegExtraInfo;
|
||||
|
||||
static RK_U32 vpu_debug = 0;
|
||||
|
Reference in New Issue
Block a user