Merge "hwc/overlay: MDSS driver requires 4-aligned crop.h for interlaced"

This commit is contained in:
Linux Build Service Account
2013-05-30 12:07:27 -07:00
committed by Gerrit - the friendly Code Review server
2 changed files with 8 additions and 0 deletions

View File

@@ -770,6 +770,9 @@ int configRotator(Rotator *rot, const Whf& whf,
if (ovutils::isYuv(whf.format)) { if (ovutils::isYuv(whf.format)) {
ovutils::normalizeCrop((uint32_t&)crop.left, crop_w); ovutils::normalizeCrop((uint32_t&)crop.left, crop_w);
ovutils::normalizeCrop((uint32_t&)crop.top, crop_h); 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.right = crop.left + crop_w;
crop.bottom = crop.top + crop_h; crop.bottom = crop.top + crop_h;
} }

View File

@@ -181,6 +181,11 @@ bool MdpCtrl::set() {
if(mdpVersion < MDSS_V5) { if(mdpVersion < MDSS_V5) {
utils::even_floor(mOVInfo.dst_rect.w); utils::even_floor(mOVInfo.dst_rect.w);
utils::even_floor(mOVInfo.dst_rect.h); 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);
} }
} }