videofilter: mpp/unmap memory will cause big cpu loading
Below code in gstvideofilter.c will map/unmap input/output buffer. It will call memory map/unmap when the memory allocated by V4L2 and ION driver. The map/unmap will cause high cpu loading. But gstvideofilter don't require CPU access for the memory. Can we avoid this kind of map/unmap? Note: I found the issue on GST1.16. GST1.14 hasn't the issue.
if (!gst_video_frame_map (&in_frame, &filter->in_info, inbuf,
GST_MAP_READ | GST_VIDEO_FRAME_MAP_FLAG_NO_REF))
goto invalid_buffer;
if (!gst_video_frame_map (&out_frame, &filter->out_info, outbuf,
GST_MAP_WRITE | GST_VIDEO_FRAME_MAP_FLAG_NO_REF)) {
gst_video_frame_unmap (&in_frame);
goto invalid_buffer;
}
res = fclass->transform_frame (filter, &in_frame, &out_frame);
gst_video_frame_unmap (&out_frame);
gst_video_frame_unmap (&in_frame);