[jpege]: Fix source format check error.

1. move format check to HAL.
2. fix NV61 fmt config error.
3. fix I420 offset config error.

Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: Ia42a94fe56ccd9bc92bba3c1779defa163122cfa
This commit is contained in:
xueman.ruan
2022-11-25 18:14:11 +08:00
committed by Herman Chen
parent 4de5a6948c
commit 796ec28f6a
3 changed files with 3 additions and 17 deletions

View File

@@ -118,7 +118,6 @@ static MPP_RET jpege_proc_prep_cfg(MppEncPrepCfg *dst, MppEncPrepCfg *src)
mpp_assert(change);
if (change) {
MppEncPrepCfg bak = *dst;
MppFrameFormat fmt;
RK_S32 mirroring;
RK_S32 rotation;
@@ -178,19 +177,6 @@ static MPP_RET jpege_proc_prep_cfg(MppEncPrepCfg *dst, MppEncPrepCfg *src)
ret = MPP_NOK;
}
fmt = dst->format & MPP_FRAME_FMT_MASK;
if ((fmt != MPP_FMT_YUV420SP &&
fmt != MPP_FMT_YUV420P &&
fmt != MPP_FMT_YUV422SP_VU &&
fmt != MPP_FMT_YUV422_YUYV &&
fmt != MPP_FMT_YUV422_UYVY &&
fmt < MPP_FRAME_FMT_RGB) ||
fmt == MPP_FMT_RGB888 ||
fmt == MPP_FMT_BGR888) {
mpp_err_f("invalid format %d is not supportted\n", dst->format);
ret = MPP_NOK;
}
dst->change |= change;
// parameter checking

View File

@@ -148,7 +148,7 @@ static MPP_RET vepu540c_jpeg_set_patch_info(MppDev dev, JpegeSyntax *syn,
/* input cr addr */
if (v_offset)
mpp_dev_set_reg_offset(dev, 266, u_offset);
mpp_dev_set_reg_offset(dev, 266, v_offset);
return ret;
}

View File

@@ -91,9 +91,9 @@ static VepuFmtCfg vepu541_yuv_cfg[MPP_FMT_YUV_BUTT] = {
.offset = zeros,
},
{ /* MPP_FMT_YUV422SP_VU */
.format = VEPU541_FMT_NONE,
.format = VEPU541_FMT_YUV422SP,
.alpha_swap = 0,
.rbuv_swap = 0,
.rbuv_swap = 1,
.src_range = 1,
.src_endian = 0,
.weight = zeros,