summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>2017-08-08 07:27:08 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-08-20 08:02:21 -0400
commit4d7be605e0998e1e7a6151028f1ddbb83cbe8fdb (patch)
treebd743d245b474fbd0f023a8807e61c9d00795b10
parent6c83c1d8e7058a22840b22f54f3b1acad2c2207c (diff)
downloadop-kernel-dev-4d7be605e0998e1e7a6151028f1ddbb83cbe8fdb.zip
op-kernel-dev-4d7be605e0998e1e7a6151028f1ddbb83cbe8fdb.tar.gz
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: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r--drivers/media/platform/s5p-jpeg/jpeg-core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c
index 917c962..faac816 100644
--- a/drivers/media/platform/s5p-jpeg/jpeg-core.c
+++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c
@@ -628,11 +628,12 @@ static int s5p_jpeg_to_user_subsampling(struct s5p_jpeg_ctx *ctx)
return V4L2_JPEG_CHROMA_SUBSAMPLING_411;
return exynos3250_decoded_subsampling[ctx->subsampling];
case SJPEG_EXYNOS4:
- case SJPEG_EXYNOS5433:
WARN_ON(ctx->subsampling > 3);
if (ctx->subsampling > 2)
return V4L2_JPEG_CHROMA_SUBSAMPLING_420;
return exynos4x12_decoded_subsampling[ctx->subsampling];
+ case SJPEG_EXYNOS5433:
+ return ctx->subsampling; /* parsed from header */
default:
WARN_ON(ctx->subsampling > 3);
return V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY;
OpenPOWER on IntegriCloud