From 2edb2d91e8005a768dcff20ada01ca10a955107b Mon Sep 17 00:00:00 2001 From: Grey Li Date: Wed, 8 Jun 2022 11:54:17 +0800 Subject: [PATCH] [jpegd]: unsupport yuv400 upsampling Signed-off-by: Grey Li Change-Id: I4a7488e83a336517ed5dd6b5783b574e43953dd7 --- mpp/codec/dec/jpeg/jpegd_parser.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mpp/codec/dec/jpeg/jpegd_parser.c b/mpp/codec/dec/jpeg/jpegd_parser.c index e6f5ec3f..aa16d78e 100644 --- a/mpp/codec/dec/jpeg/jpegd_parser.c +++ b/mpp/codec/dec/jpeg/jpegd_parser.c @@ -149,7 +149,11 @@ static MPP_RET jpeg_judge_yuv_mode(JpegdCtx *ctx) if (s->h_count[0] == s->v_count[0] && s->h_count[0] != 0) { s->yuv_mode = JPEGDEC_YUV400; s->output_fmt = MPP_FMT_YUV400; - + if (s->output_fmt != ctx->output_fmt) { + mpp_err_f("unsupported upsampling(%d*%d)\n", s->output_fmt, + ctx->output_fmt); + ret = MPP_ERR_STREAM; + } /* check if fill needed */ if ((s->width & 0xf) && ((s->width & 0xf) <= 8)) { s->fill_right = 1;