Merge "hwc/overlay: MDSS driver requires 4-aligned crop.h for interlaced"
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
commit
b2a40a4ce3
@@ -770,6 +770,9 @@ int configRotator(Rotator *rot, const Whf& whf,
|
||||
if (ovutils::isYuv(whf.format)) {
|
||||
ovutils::normalizeCrop((uint32_t&)crop.left, crop_w);
|
||||
ovutils::normalizeCrop((uint32_t&)crop.top, crop_h);
|
||||
// For interlaced, crop.h should be 4-aligned
|
||||
if ((mdpFlags & ovutils::OV_MDP_DEINTERLACE) && (crop_h % 4))
|
||||
crop_h = ovutils::aligndown(crop_h, 4);
|
||||
crop.right = crop.left + crop_w;
|
||||
crop.bottom = crop.top + crop_h;
|
||||
}
|
||||
|
||||
@@ -181,6 +181,11 @@ bool MdpCtrl::set() {
|
||||
if(mdpVersion < MDSS_V5) {
|
||||
utils::even_floor(mOVInfo.dst_rect.w);
|
||||
utils::even_floor(mOVInfo.dst_rect.h);
|
||||
} else if (mOVInfo.flags & MDP_DEINTERLACE) {
|
||||
// For interlaced, crop.h should be 4-aligned
|
||||
if (!(mOVInfo.flags & MDP_SOURCE_ROTATED_90) &&
|
||||
(mOVInfo.src_rect.h % 4))
|
||||
mOVInfo.src_rect.h = utils::aligndown(mOVInfo.src_rect.h, 4);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user