Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HACK: v4l2codecs: Support multi-planar YUV420M format
V4L's YUV420M multi-planar format almost equals to YUV420 format of Linux DRM and to I420 of GStreamer, but in fact it shouldn't because I420 is supposed to have 1 memory plane, while YUV420M 3 memory planes. This happens to work by chance, since neither GStreamer, nor kernel's V4L core handles properly plane's offsets by assuming that they all zeros always. Nevertheless, this situation is good enough for us for testing of V4L codecs plugin on NVIDIA Tegra. Note that I haven't removed the pitch comparison of decoded frames vs displayed from gstv4l2codech264dec that is unnecessary for YUV420M. Meaning that video resolutions that aren't multiple of 16 pixels in width will require software copying of video buffers, which is extremely slow. The pitch of YUV420M format isn't equal to pitch of I420, but pitch difference doesn't matter in a case of separate memory planes. Technically the comparison could be removed for testing, but will be better to support YUV420M properly. Testing of 720p videos will work fine since width is multiple of 16, 1080p won't work well without removal of the comparison.
- Loading branch information