I have a question in 01_video_encode of tegra_multimedia_api,the application YUV reads input buffers from a file, performs H.264 or H.265 video encoding.But now i want to input GPU device data directly to encode.
I use cudaMemcpy to copy device data to planes,but it fails.
char *buffer_ptr = (char *)buffer.planes[0].data;
cudaError_t cudaStatus = cudaMemcpy(buffer_ptr, imgbuffer, data_size, cudaMemcpyDeviceToDevice);
I try to modify this:
ctx->output_memory_type = V4L2_MEMORY_MMAP;//V4L2_MEMORY_DMABUF;
It also fails.Now i am confused.
Please tell me how to solve this problem.
Thank you!