Skip to content

Commit

Permalink
ビルドを修正。
Browse files Browse the repository at this point in the history
  • Loading branch information
rigaya committed Mar 13, 2024
1 parent ee7a30e commit d433f23
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion mppcore/mpp_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ MPPCore::MPPCore() :
m_pPerfMonitor(),
m_pipelineDepth(2),
m_nProcSpeedLimit(0),
m_nAVSyncMode(RGY_AVSYNC_ASSUME_CFR),
m_nAVSyncMode(RGY_AVSYNC_AUTO),
m_timestampPassThrough(false),
m_inputFps(),
m_encFps(),
Expand Down
18 changes: 9 additions & 9 deletions mppcore/mpp_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,11 @@ RGY_ERR RGAFilterCrop::run_filter_rga(RGYFrameMpp *pInputFrame, RGYFrameMpp **pp
rga_buffer_t src = RGY_CSP_CHROMA_FORMAT[pInputFrame->csp()] == RGY_CHROMAFMT_RGB_PACKED
? wrapbuffer_handle(src_handle, pInputFrame->width(), pInputFrame->height(), csp_rgy_to_rkrga(pInputFrame->csp())) //rgb packedの場合はこちらを使用する必要がある
: wrapbuffer_handle_t(src_handle, pInputFrame->width(), pInputFrame->height(),
pInputFrame->pitch(0), mpp_frame_get_ver_stride(pInputFrame->mpp()), csp_rgy_to_rkrga(pInputFrame->csp()));
pInputFrame->pitch(RGY_PLANE_Y), mpp_frame_get_ver_stride(pInputFrame->mpp()), csp_rgy_to_rkrga(pInputFrame->csp()));
rga_buffer_t dst = RGY_CSP_CHROMA_FORMAT[pOutFrame->csp()] == RGY_CHROMAFMT_RGB_PACKED
? wrapbuffer_handle(dst_handle, pOutFrame->width(), pOutFrame->height(), csp_rgy_to_rkrga(pOutFrame->csp())) //rgb packedの場合はこちらを使用する必要がある
: wrapbuffer_handle_t(dst_handle, pOutFrame->width(), pOutFrame->height(),
pOutFrame->pitch(0), mpp_frame_get_ver_stride(pOutFrame->mpp()), csp_rgy_to_rkrga(pOutFrame->csp()));
pOutFrame->pitch(RGY_PLANE_Y), mpp_frame_get_ver_stride(pOutFrame->mpp()), csp_rgy_to_rkrga(pOutFrame->csp()));
if (src.width == 0 || dst.width == 0) {
AddMessage(RGY_LOG_ERROR, _T("Invalid in/out memory.\n"));
return RGY_ERR_INVALID_FORMAT;
Expand Down Expand Up @@ -338,11 +338,11 @@ RGY_ERR RGAFilterCspConv::run_filter_rga(RGYFrameMpp *pInputFrame, RGYFrameMpp *
rga_buffer_t src = RGY_CSP_CHROMA_FORMAT[pInputFrame->csp()] == RGY_CHROMAFMT_RGB_PACKED
? wrapbuffer_handle(src_handle, pInputFrame->width(), pInputFrame->height(), csp_rgy_to_rkrga(pInputFrame->csp())) //rgb packedの場合はこちらを使用する必要がある
: wrapbuffer_handle_t(src_handle, pInputFrame->width(), pInputFrame->height(),
pInputFrame->pitch(0), mpp_frame_get_ver_stride(pInputFrame->mpp()), csp_rgy_to_rkrga(pInputFrame->csp()));
pInputFrame->pitch(RGY_PLANE_Y), mpp_frame_get_ver_stride(pInputFrame->mpp()), csp_rgy_to_rkrga(pInputFrame->csp()));
rga_buffer_t dst = RGY_CSP_CHROMA_FORMAT[pOutFrame->csp()] == RGY_CHROMAFMT_RGB_PACKED
? wrapbuffer_handle(dst_handle, pOutFrame->width(), pOutFrame->height(), csp_rgy_to_rkrga(pOutFrame->csp())) //rgb packedの場合はこちらを使用する必要がある
: wrapbuffer_handle_t(dst_handle, pOutFrame->width(), pOutFrame->height(),
pOutFrame->pitch(0), mpp_frame_get_ver_stride(pOutFrame->mpp()), csp_rgy_to_rkrga(pOutFrame->csp()));
pOutFrame->pitch(RGY_PLANE_Y), mpp_frame_get_ver_stride(pOutFrame->mpp()), csp_rgy_to_rkrga(pOutFrame->csp()));
if (src.width == 0 || dst.width == 0) {
AddMessage(RGY_LOG_ERROR, _T("Invalid in/out memory.\n"));
return RGY_ERR_INVALID_FORMAT;
Expand Down Expand Up @@ -461,9 +461,9 @@ RGY_ERR RGAFilterResize::run_filter_rga(RGYFrameMpp *pInputFrame, RGYFrameMpp **
rga_buffer_handle_t dst_handle = getRGABufferHandle(pOutFrame);

rga_buffer_t src = wrapbuffer_handle_t(src_handle, pInputFrame->width(), pInputFrame->height(),
pInputFrame->pitch(0), mpp_frame_get_ver_stride(pInputFrame->mpp()), csp_rgy_to_rkrga(pInputFrame->csp()));
pInputFrame->pitch(RGY_PLANE_Y), mpp_frame_get_ver_stride(pInputFrame->mpp()), csp_rgy_to_rkrga(pInputFrame->csp()));
rga_buffer_t dst = wrapbuffer_handle_t(dst_handle, pOutFrame->width(), pOutFrame->height(),
pOutFrame->pitch(0), mpp_frame_get_ver_stride(pOutFrame->mpp()), csp_rgy_to_rkrga(pOutFrame->csp()));
pOutFrame->pitch(RGY_PLANE_Y), mpp_frame_get_ver_stride(pOutFrame->mpp()), csp_rgy_to_rkrga(pOutFrame->csp()));
if (src.width == 0 || dst.width == 0) {
AddMessage(RGY_LOG_ERROR, _T("Invalid in/out memory.\n"));
return RGY_ERR_INVALID_FORMAT;
Expand Down Expand Up @@ -810,12 +810,12 @@ RGY_ERR RGAFilterDeinterlaceIEP::workerThreadFunc() {

RGY_ERR RGAFilterDeinterlaceIEP::setImage(RGYFrameMpp *frame, const IepCmd cmd) {
auto fd = mpp_buffer_get_fd(mpp_frame_get_buffer(frame->mpp()));
RK_S32 y_size = frame->pitch(0) * mpp_frame_get_ver_stride(frame->mpp());
RK_S32 y_size = frame->pitch(RGY_PLANE_Y) * mpp_frame_get_ver_stride(frame->mpp());
IepImg img;
img.format = IEP_FORMAT_YCbCr_420_SP;
img.act_w = frame->width();
img.act_h = frame->height();
img.vir_w = frame->pitch(0);
img.vir_w = frame->pitch(RGY_PLANE_Y);
img.vir_h = mpp_frame_get_ver_stride(frame->mpp());
img.x_off = 0;
img.y_off = 0;
Expand Down Expand Up @@ -910,7 +910,7 @@ RGY_ERR RGAFilterDeinterlaceIEP::runFilter(std::vector<RGYFrameMpp*> dst, const
params.param.com.dswap = IEP2_YUV_SWAP_SP_UV; // nv12
params.param.com.width = src[0]->width();
params.param.com.height = src[0]->height();
params.param.com.hor_stride = src[0]->pitch(0);
params.param.com.hor_stride = src[0]->pitch(RGY_PLANE_Y);
err = err_to_rgy(m_iepCtx->ops->control(m_iepCtx->priv, IEP_CMD_SET_DEI_CFG, &params));
if (err != RGY_ERR_NONE) {
AddMessage(RGY_LOG_ERROR, _T("Failed to set deinterlace params: %s.\n"), get_err_mes(err));
Expand Down
4 changes: 2 additions & 2 deletions mppcore/mpp_pipeline.h
Original file line number Diff line number Diff line change
Expand Up @@ -1992,7 +1992,7 @@ class PipelineTaskRGA : public PipelineTask {
auto crop = initCrop();
m_convert->run((mappedHost.picstruct & RGY_PICSTRUCT_INTERLACED) ? 1 : 0,
(void **)m_inputFrameTmp->ptr().data(), (const void **)mappedHost.ptr,
mappedHost.width, mappedHost.pitch[0], mappedHost.pitch[1], m_inputFrameTmp->pitch(0),
mappedHost.width, mappedHost.pitch[0], mappedHost.pitch[1], m_inputFrameTmp->pitch(RGY_PLANE_Y),
mappedHost.height, m_inputFrameTmp->height(), crop.c);

m_inputFrameTmp->setPropertyFrom(surfVppInCL);
Expand Down Expand Up @@ -2164,7 +2164,7 @@ class PipelineTaskIEP : public PipelineTask {
auto crop = initCrop();
m_convert->run((mappedHost.picstruct & RGY_PICSTRUCT_INTERLACED) ? 1 : 0,
(void **)inputFrameTmp->ptr().data(), (const void **)mappedHost.ptr,
mappedHost.width, mappedHost.pitch[0], mappedHost.pitch[1], inputFrameTmp->pitch(0),
mappedHost.width, mappedHost.pitch[0], mappedHost.pitch[1], inputFrameTmp->pitch(RGY_PLANE_Y),
inputFrameTmp->height(), inputFrameTmp->height(), crop.c);

inputFrameTmp->setPropertyFrom(surfVppInCL);
Expand Down

0 comments on commit d433f23

Please sign in to comment.