|
@@ -1634,6 +1634,12 @@ static int s5p_jpeg_s_fmt(struct s5p_jpeg_ctx *ct, struct v4l2_format *f)
|
|
FMT_TYPE_OUTPUT : FMT_TYPE_CAPTURE;
|
|
FMT_TYPE_OUTPUT : FMT_TYPE_CAPTURE;
|
|
|
|
|
|
q_data->fmt = s5p_jpeg_find_format(ct, pix->pixelformat, f_type);
|
|
q_data->fmt = s5p_jpeg_find_format(ct, pix->pixelformat, f_type);
|
|
|
|
+ if (ct->mode == S5P_JPEG_ENCODE ||
|
|
|
|
+ (ct->mode == S5P_JPEG_DECODE &&
|
|
|
|
+ q_data->fmt->fourcc != V4L2_PIX_FMT_JPEG)) {
|
|
|
|
+ q_data->w = pix->width;
|
|
|
|
+ q_data->h = pix->height;
|
|
|
|
+ }
|
|
if (q_data->fmt->fourcc != V4L2_PIX_FMT_JPEG) {
|
|
if (q_data->fmt->fourcc != V4L2_PIX_FMT_JPEG) {
|
|
/*
|
|
/*
|
|
* During encoding Exynos4x12 SoCs access wider memory area
|
|
* During encoding Exynos4x12 SoCs access wider memory area
|
|
@@ -1641,8 +1647,6 @@ static int s5p_jpeg_s_fmt(struct s5p_jpeg_ctx *ct, struct v4l2_format *f)
|
|
* the JPEG_IMAGE_SIZE register. In order to avoid sysmmu
|
|
* the JPEG_IMAGE_SIZE register. In order to avoid sysmmu
|
|
* page fault calculate proper buffer size in such a case.
|
|
* page fault calculate proper buffer size in such a case.
|
|
*/
|
|
*/
|
|
- q_data->w = pix->width;
|
|
|
|
- q_data->h = pix->height;
|
|
|
|
if (ct->jpeg->variant->hw_ex4_compat &&
|
|
if (ct->jpeg->variant->hw_ex4_compat &&
|
|
f_type == FMT_TYPE_OUTPUT && ct->mode == S5P_JPEG_ENCODE)
|
|
f_type == FMT_TYPE_OUTPUT && ct->mode == S5P_JPEG_ENCODE)
|
|
q_data->size = exynos4_jpeg_get_output_buffer_size(ct,
|
|
q_data->size = exynos4_jpeg_get_output_buffer_size(ct,
|