Commit 4d7be605 authored by Andrzej Pietrasiewicz's avatar Andrzej Pietrasiewicz Committed by Mauro Carvalho Chehab

media: s5p-jpeg: directly use parsed subsampling on exynos5433

On exynos5433 variant JPEG data is parsed by hardware only from SOS
marker, so subsampling is parsed by software. As such, its value need
not to be translated from hardware-specific encoding to V4L2 encoding.
Signed-off-by: default avatarAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 6c83c1d8
...@@ -628,11 +628,12 @@ static int s5p_jpeg_to_user_subsampling(struct s5p_jpeg_ctx *ctx) ...@@ -628,11 +628,12 @@ static int s5p_jpeg_to_user_subsampling(struct s5p_jpeg_ctx *ctx)
return V4L2_JPEG_CHROMA_SUBSAMPLING_411; return V4L2_JPEG_CHROMA_SUBSAMPLING_411;
return exynos3250_decoded_subsampling[ctx->subsampling]; return exynos3250_decoded_subsampling[ctx->subsampling];
case SJPEG_EXYNOS4: case SJPEG_EXYNOS4:
case SJPEG_EXYNOS5433:
WARN_ON(ctx->subsampling > 3); WARN_ON(ctx->subsampling > 3);
if (ctx->subsampling > 2) if (ctx->subsampling > 2)
return V4L2_JPEG_CHROMA_SUBSAMPLING_420; return V4L2_JPEG_CHROMA_SUBSAMPLING_420;
return exynos4x12_decoded_subsampling[ctx->subsampling]; return exynos4x12_decoded_subsampling[ctx->subsampling];
case SJPEG_EXYNOS5433:
return ctx->subsampling; /* parsed from header */
default: default:
WARN_ON(ctx->subsampling > 3); WARN_ON(ctx->subsampling > 3);
return V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY; return V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment