linux/drivers/media/platform/s5p-jpeg
Tony K Nadackal 5ea3bf28ed media: s5p-jpeg: Call jpeg_bound_align_image after qbuf
When queuing an OUTPUT buffer for decoder, s5p_jpeg_parse_hdr()
function parses the input jpeg file and takes the width and height
parameters from its header. These new width/height values will be used
for the calculation of stride. HX_JPEG Hardware needs the width and
height values aligned on a 16 bits boundary. This width/height alignment
is handled in the s5p_jpeg_s_fmt_vid_cap() function during the S_FMT
ioctl call.

But if user space calls the QBUF of OUTPUT buffer after the S_FMT of
CAPTURE buffer, these aligned values will be replaced by the values in
jpeg header. If the width/height values of jpeg are not aligned, the
decoder output will be corrupted. So in this patch we call
jpeg_bound_align_image() to align the width/height values of Capture
buffer in s5p_jpeg_buf_queue().

Signed-off-by: Tony K Nadackal <tony.kn@samsung.com>
Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
Acked-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-26 08:28:52 -04:00
..
jpeg-core.c media: s5p-jpeg: Call jpeg_bound_align_image after qbuf 2017-07-26 08:28:52 -04:00
jpeg-core.h [media] media/platform: convert drivers to use the new vb2_queue dev field 2016-07-08 14:42:09 -03:00
jpeg-hw-exynos4.c [media] squash lines for simple wrapper functions 2016-11-16 13:28:40 -02:00
jpeg-hw-exynos4.h [media] s5p-jpeg: add support for 5433 2015-10-01 08:40:04 -03:00
jpeg-hw-exynos3250.c [media] s5p-jpeg: exynos3250: fix erroneous reset procedure 2015-03-04 08:59:34 -03:00
jpeg-hw-exynos3250.h [media] s5p-jpeg: Add support for Exynos3250 SoC 2014-07-30 19:15:06 -03:00
jpeg-hw-s5p.c [media] s5p-jpeg: Remove some unused functions 2015-04-07 08:15:15 -03:00
jpeg-hw-s5p.h [media] s5p-jpeg: Remove some unused functions 2015-04-07 08:15:15 -03:00
jpeg-regs.h [media] s5p-jpeg: add support for 5433 2015-10-01 08:40:04 -03:00
Makefile [media] s5p-jpeg: Add support for Exynos3250 SoC 2014-07-30 19:15:06 -03:00