I would like to inquire about a method to efficiently pass captured data to the memory allocated by VPU_EncGetMem.
Is it possible to achieve this without using address assignment?
I am using v4l and V4L2_MEMORY_MMAP for capturing.
The memory for encoding is allocated using VPU_EncGetMem.
When I use memcpy to copy the data to the memory allocated by VPU_EncGetMem, encoding works fine. However, if I assign the memory address of the memory allocated by VPU_EncGetMem directly to input_buf, the encoded video appears green.
OK:
memcpy(pInputVirt, input_buf, input_size);
NG: Encoded video appears green.
pInputVirt = input_buf;
pInputVirt: Memory allocated by VPU_EncGetMem for encoding.
input_buf: Memory allocated by mmap for capturing.
CPU: i.MX8MPlus