display: Do not align down input rotator src height
Aligning down the input rotator source height value introduces
green line in the output of the rotator. Remove aligning down the
input rotator source height for YV12 format.
For 1/8th downscale use aligndown instead of alignup.
Change-Id: I9152ee873c5ee79877653c78f33eb0cf7e2f9871
CRs-Fixed: 453033
diff --git a/liboverlay/overlayMdpRot.cpp b/liboverlay/overlayMdpRot.cpp
old mode 100644
new mode 100755
index d0242d6..a802b4b
--- a/liboverlay/overlayMdpRot.cpp
+++ b/liboverlay/overlayMdpRot.cpp
@@ -58,15 +58,12 @@
}
void MdpRot::setDownscale(int ds) {
- if (mRotImgInfo.src.format == MDP_Y_CR_CB_GH2V2 &&
- (mRotImgInfo.src_rect.h & 0xF)) {
- mRotImgInfo.src_rect.h = utils::aligndown(mRotImgInfo.src_rect.h, 16);
- } else if ((utils::ROT_DS_EIGHTH == ds) && (mRotImgInfo.src_rect.h & 0xF)) {
+ if ((utils::ROT_DS_EIGHTH == ds) && (mRotImgInfo.src_rect.h & 0xF)) {
// Ensure src_rect.h is a multiple of 16 for 1/8 downscaling.
// This is an undocumented MDP Rotator constraint.
// Note that src_rect.h is already ensured to be 32 pixel height aligned
// for MDP_Y_CRCB_H2V2_TILE and MDP_Y_CBCR_H2V2_TILE formats.
- mRotImgInfo.src_rect.h = utils::alignup(mRotImgInfo.src_rect.h, 16);
+ mRotImgInfo.src_rect.h = utils::aligndown(mRotImgInfo.src_rect.h, 16);
}
mRotImgInfo.downscale_ratio = ds;
}