mpp icon indicating copy to clipboard operation
mpp copied to clipboard

mpi_enc_test 运行后会出现横纹

Open jiangchunyu opened this issue 1 year ago • 4 comments

./test/mpi_enc_test -i /dev/video1 -o test.h264 -w 640 -h 480 -f 8 -t 7 运行这个命令会出现横纹,是什么原因引起的?,以下这段代码只有mpp_buffer_sync_end没有mpp_buffer_sync_begin 是不是这个原因引起的?如果是的话想要加mpp_buffer_sync_begin,应该加在什么位置?

MppBuffer camera_frame_to_buf(CamSource *ctx, RK_S32 idx) { MppBuffer buf = NULL;

if (idx < 0)
    return buf;

buf = ctx->fbuf[idx].buffer;
if (buf)
    mpp_buffer_sync_end(buf);

return buf;

}

jiangchunyu avatar Feb 23 '25 00:02 jiangchunyu

在硬件访问数据之前用 mpp_buffer_sync_end,把cpu访问后的数据写入到ddr

HermanChen avatar Mar 03 '25 07:03 HermanChen

我的也是> ./test/mpi_enc_test -i /dev/video1 -o test.h264 -w 640 -h 480 -f 8 -t 7

运行这个命令会出现横纹,是什么原因引起的?,以下这段代码只有mpp_buffer_sync_end没有mpp_buffer_sync_begin 是不是这个原因引起的?如果是的话想要加mpp_buffer_sync_begin,应该加在什么位置?

MppBuffer camera_frame_to_buf(CamSource *ctx, RK_S32 idx) { MppBuffer buf = NULL;

if (idx < 0)
    return buf;

buf = ctx->fbuf[idx].buffer;
if (buf)
    mpp_buffer_sync_end(buf);

return buf;

}

我的也是,解决了吗,是 mpp 库版本问题吗? 之前的 mpp 有这个问题吗?

Li-Chang-Yi avatar Mar 18 '25 03:03 Li-Chang-Yi

怎么同步啊

Li-Chang-Yi avatar Mar 18 '25 05:03 Li-Chang-Yi

这样调用用应该是可以的 cpu 访问 ddr 数据之前加 start,之后加 end

HermanChen avatar Mar 18 '25 06:03 HermanChen