]> git.baikalelectronics.ru Git - kernel.git/commit
[media] exynos-gsc: do proper bytesperline and sizeimage calculation
authorJavier Martinez Canillas <javier@osg.samsung.com>
Fri, 30 Sep 2016 21:16:44 +0000 (18:16 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 16 Nov 2016 18:27:52 +0000 (16:27 -0200)
commit136fe657382ce9bdc41a558d0b808db86deea776
tree222649e15ff618aa28002773412a46823dd03499
parent95efee3c0f608df1ca35939f4cc2dcf698f674c7
[media] exynos-gsc: do proper bytesperline and sizeimage calculation

The driver don't take into account the differences between packed, semi
planar and multi planar formats when calculating the pixel format bytes
per lines and image size values. This makes GStreamer to fail when the
following formats are used NV12, NV21, NV16, NV61, YV12, I420 and Y42B:

"gst_video_frame_map_id: failed to map video frame plane 1"

Nicolas suggested to use the logic found in the Exynos FIMC v4l2 driver
since does this correctly. So this patch changes the bytes per line and
image size calculation according to what's done in this media driver.

After this patch most supported formats work correctly. There are still
issues with the NV21 and NV61 formats, but that seems to be a separate
problem since NV12 and NV16 work and these formats use the same values.

So this can be fixed as a follow-up and shouldn't be a blocker for this
change that improves the driver's support.

Suggested-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/exynos-gsc/gsc-core.c