[media] s5p-jpeg: Retrieve "YCbCr subsampling" field from the jpeg header
authorJacek Anaszewski <j.anaszewski@samsung.com>
Thu, 21 Nov 2013 16:33:09 +0000 (13:33 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Wed, 18 Dec 2013 13:48:16 +0000 (11:48 -0200)
commitf84339628d9224200e9145320da494da2d92cd50
treedba10e8c6d503672d30a9b08fd48f6ecf557fa11
parent80529ae5c13725e12ba0377e29b2160794ba6b25
[media] s5p-jpeg: Retrieve "YCbCr subsampling" field from the jpeg header

Make s5p_jpeg_parse_hdr function capable of parsing
"YCbCr subsampling" field of a jpeg file header. Store the
parsed value in the context.

The information about source JPEG subsampling is required to
make validation of destination format possible, which must be
conducted for exynos4x12 device as the decoding process will
not succeed if the destination format is set to YUV with
subsampling lower than the one of the source JPEG image.

With this knowledge the driver can adjust the destination format
appropriately.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/platform/s5p-jpeg/jpeg-core.c