video: driver: update stride and scanline for NV21 color format

Added changes to update the proper stride and scanline info to firmware.

Change-Id: Ic8e119a48af8c3203fc21a320255d930f5c8585f
Signed-off-by: Gaviraju Doddabettahalli Bettegowda <quic_gdoddabe@quicinc.com>
This commit is contained in:
Gaviraju Doddabettahalli Bettegowda
2021-12-17 22:01:35 +05:30
committed by Govindaraj Rajagopal
parent f101f90626
commit 91703af2cf
2 changed files with 5 additions and 2 deletions

View File

@@ -168,7 +168,9 @@ static int msm_vdec_set_linear_stride_scanline(struct msm_vidc_inst *inst)
if (inst->fmts[OUTPUT_PORT].fmt.pix_mp.pixelformat !=
V4L2_PIX_FMT_NV12 &&
inst->fmts[OUTPUT_PORT].fmt.pix_mp.pixelformat !=
V4L2_PIX_FMT_VIDC_P010)
V4L2_PIX_FMT_VIDC_P010 &&
inst->fmts[OUTPUT_PORT].fmt.pix_mp.pixelformat !=
V4L2_PIX_FMT_NV21)
return 0;
stride_y = inst->fmts[OUTPUT_PORT].fmt.pix_mp.width;

View File

@@ -162,7 +162,8 @@ static int msm_venc_set_stride_scanline(struct msm_vidc_inst *inst,
stride_y = inst->fmts[INPUT_PORT].fmt.pix_mp.width;
scanline_y = inst->fmts[INPUT_PORT].fmt.pix_mp.height;
if (color_format == MSM_VIDC_FMT_NV12 ||
color_format == MSM_VIDC_FMT_P010) {
color_format == MSM_VIDC_FMT_P010 ||
color_format == MSM_VIDC_FMT_NV21) {
stride_uv = stride_y;
scanline_uv = scanline_y / 2;
}