Browse Source

video: driver: update alignment for p010

update alignment to 128 for stride in  pixel
calculation for p010 color format.

Change-Id: I0fda66f06409bb9947c88a60a88a9ea8f70505a5
Signed-off-by: Darshana Patil <[email protected]>
Darshana Patil 4 years ago
parent
commit
6a6a3cba5c
1 changed files with 2 additions and 8 deletions
  1. 2 8
      driver/vidc/inc/msm_media_info.h

+ 2 - 8
driver/vidc/inc/msm_media_info.h

@@ -81,6 +81,7 @@ static inline unsigned int VIDEO_Y_STRIDE_PIX(unsigned int v4l2_fmt,
 	case V4L2_PIX_FMT_NV12:
 	case V4L2_PIX_FMT_NV21:
 	case V4L2_PIX_FMT_VIDC_NV12C:
+	case V4L2_PIX_FMT_VIDC_P010:
 		alignment = 128;
 		stride = MSM_MEDIA_ALIGN(width, alignment);
 		break;
@@ -88,10 +89,6 @@ static inline unsigned int VIDEO_Y_STRIDE_PIX(unsigned int v4l2_fmt,
 		alignment = 192;
 		stride = MSM_MEDIA_ALIGN(width, alignment);
 		break;
-	case V4L2_PIX_FMT_VIDC_P010:
-		alignment = 256;
-		stride = MSM_MEDIA_ALIGN(width, alignment);
-		break;
 	default:
 		break;
 	}
@@ -156,6 +153,7 @@ static inline unsigned int VIDEO_UV_STRIDE_PIX(unsigned int v4l2_fmt,
 	case V4L2_PIX_FMT_NV21:
 	case V4L2_PIX_FMT_NV12:
 	case V4L2_PIX_FMT_VIDC_NV12C:
+	case V4L2_PIX_FMT_VIDC_P010:
 		alignment = 128;
 		stride = MSM_MEDIA_ALIGN(width, alignment);
 		break;
@@ -163,10 +161,6 @@ static inline unsigned int VIDEO_UV_STRIDE_PIX(unsigned int v4l2_fmt,
 		alignment = 192;
 		stride = MSM_MEDIA_ALIGN(width, alignment);
 		break;
-	case V4L2_PIX_FMT_VIDC_P010:
-		alignment = 256;
-		stride = MSM_MEDIA_ALIGN(width, alignment);
-		break;
 	default:
 		break;
 	}