[media] s5p-jpeg: Retrieve "YCbCr subsampling" field from the jpeg header
[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 <6a953cb1c532e2765a42e582ecefff5a01106214@samsung.com>
Signed-off-by: Kyungmin Park <504c23c4986a3760712724894be3105092c27331@samsung.com>
Acked-by: Hans Verkuil <3a513708f73c27e7d36ebc496aa41dad6a3153ea@cisco.com>
Signed-off-by: Sylwester Nawrocki <1ca386fdc5066df13f7236f0837f22126191d06b@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <0cae1d1e981e84d16b82ca3d17be8a7f826608d3@samsung.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs