Browse Source

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 <[email protected]>
Gaviraju Doddabettahalli Bettegowda 3 years ago
parent
commit
91703af2cf
2 changed files with 5 additions and 2 deletions
  1. 3 1
      driver/vidc/src/msm_vdec.c
  2. 2 1
      driver/vidc/src/msm_venc.c

+ 3 - 1
driver/vidc/src/msm_vdec.c

@@ -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;

+ 2 - 1
driver/vidc/src/msm_venc.c

@@ -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;
 	}