mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-15 13:40:39 +08:00
chore[mpp_enc]: Encoder changes to cacheable buffer
Signed-off-by: Herman Chen <herman.chen@rock-chips.com> Change-Id: I8df399ff708e354f8e3017da41e1424cba4999ee
This commit is contained in:
@@ -716,10 +716,11 @@ void *enc_test_input(void *arg)
|
||||
break;
|
||||
} else {
|
||||
if (p->cam_ctx == NULL) {
|
||||
ret = fill_image((RK_U8 *)buf, p->width, p->height, p->hor_stride,
|
||||
p->ver_stride, p->fmt, p->frm_cnt_in);
|
||||
if (ret)
|
||||
break;
|
||||
ret = MPP_OK;
|
||||
// ret = fill_image((RK_U8 *)buf, p->width, p->height, p->hor_stride,
|
||||
// p->ver_stride, p->fmt, p->frm_cnt_in);
|
||||
// if (ret)
|
||||
// break;
|
||||
} else {
|
||||
cam_frm_idx = camera_source_get_frame(p->cam_ctx);
|
||||
mpp_assert(cam_frm_idx >= 0);
|
||||
@@ -1058,6 +1059,7 @@ int enc_test_mt(MpiEncTestArgs* cmd, const char *name)
|
||||
mpp_log("*******************************************\n");
|
||||
|
||||
getc(stdin);
|
||||
mpp_log_f("loop_end start");
|
||||
for (i = 0; i < cmd->nthreads; i++)
|
||||
ctxs[i].ctx.loop_end = 1;
|
||||
}
|
||||
|
@@ -596,6 +596,7 @@ MPP_RET test_mpp_run(MpiEncMultiCtxInfo *info)
|
||||
RK_U32 eoi = 1;
|
||||
|
||||
if (p->fp_input) {
|
||||
mpp_buffer_sync_begin(p->frm_buf);
|
||||
ret = read_image(buf, p->fp_input, p->width, p->height,
|
||||
p->hor_stride, p->ver_stride, p->fmt);
|
||||
if (ret == MPP_NOK || feof(p->fp_input)) {
|
||||
@@ -611,12 +612,15 @@ MPP_RET test_mpp_run(MpiEncMultiCtxInfo *info)
|
||||
mpp_log_q(quiet, "chn %d found last frame. feof %d\n", chn, feof(p->fp_input));
|
||||
} else if (ret == MPP_ERR_VALUE)
|
||||
goto RET;
|
||||
mpp_buffer_sync_end(p->frm_buf);
|
||||
} else {
|
||||
if (p->cam_ctx == NULL) {
|
||||
mpp_buffer_sync_begin(p->frm_buf);
|
||||
ret = fill_image(buf, p->width, p->height, p->hor_stride,
|
||||
p->ver_stride, p->fmt, p->frame_count);
|
||||
if (ret)
|
||||
goto RET;
|
||||
mpp_buffer_sync_end(p->frm_buf);
|
||||
} else {
|
||||
cam_frm_idx = camera_source_get_frame(p->cam_ctx);
|
||||
mpp_assert(cam_frm_idx >= 0);
|
||||
@@ -877,7 +881,7 @@ void *enc_test(void *arg)
|
||||
goto MPP_TEST_OUT;
|
||||
}
|
||||
|
||||
ret = mpp_buffer_group_get_internal(&p->buf_grp, MPP_BUFFER_TYPE_DRM);
|
||||
ret = mpp_buffer_group_get_internal(&p->buf_grp, MPP_BUFFER_TYPE_DRM | MPP_BUFFER_FLAGS_CACHABLE);
|
||||
if (ret) {
|
||||
mpp_err_f("failed to get mpp buffer group ret %d\n", ret);
|
||||
goto MPP_TEST_OUT;
|
||||
|
Reference in New Issue
Block a user