[media] s5p-jpeg: Adapt to new controls
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Mon, 20 Feb 2012 10:32:25 +0000 (07:32 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 8 Mar 2012 10:43:51 +0000 (07:43 -0300)
commitfb6f8c0269644a19ee5e9bd6db080b364ab28ea7
tree5210bf97704dc69128ddc50a2f2335c4e6fd2f31
parent27dda973e8057225e05a41597a21bc3a8f4d0c3e
[media] s5p-jpeg: Adapt to new controls

Adapt to new controls (subsampling).

For encoding, the destination format now needs to be set to V4L2_PIX_FMT_JPEG
and the subsampling (4:2:2 or 4:2:0) needs to be set using the respective
control (V4L2_CID_JPEG_CHROMA_SUBSAMPLING). Required buffer size for
destination image during encoding is no longer deduced from the format (which
generally implied overestimation), but needs to be given from userspace in
sizeimage.

Not strictly related to the added controls, this patch also fixes setting the
subsampling of the destination image for decoding, depending on the destination
format.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/s5p-jpeg/jpeg-core.c