liboverlay: Make sure the crop rectangles' dimensions are even
Even out the values for both dimensions and position on both src and destination rects. This fixes both over and underrun issues, especially with HD panels Change-Id: I781792d69cad83f76c3c0a45a5179a731661c3cf
This commit is contained in:
parent
2657e2e851
commit
ad7f1aa0d3
@ -333,6 +333,10 @@ inline void MdpCtrl::setSrcRectDim(const overlay::utils::Dim d) {
|
||||
mOVInfo.src_rect.y = d.y;
|
||||
mOVInfo.src_rect.w = d.w;
|
||||
mOVInfo.src_rect.h = d.h;
|
||||
utils::even_ceil(mOVInfo.src_rect.x);
|
||||
utils::even_ceil(mOVInfo.src_rect.y);
|
||||
utils::even_floor(mOVInfo.src_rect.w);
|
||||
utils::even_floor(mOVInfo.src_rect.h);
|
||||
}
|
||||
|
||||
inline overlay::utils::Dim MdpCtrl::getDstRectDim() const {
|
||||
@ -347,6 +351,10 @@ inline void MdpCtrl::setDstRectDim(const overlay::utils::Dim d) {
|
||||
mOVInfo.dst_rect.y = d.y;
|
||||
mOVInfo.dst_rect.w = d.w;
|
||||
mOVInfo.dst_rect.h = d.h;
|
||||
utils::even_ceil(mOVInfo.dst_rect.x);
|
||||
utils::even_ceil(mOVInfo.dst_rect.y);
|
||||
utils::even_floor(mOVInfo.dst_rect.w);
|
||||
utils::even_floor(mOVInfo.dst_rect.h);
|
||||
}
|
||||
|
||||
inline int MdpCtrl::getUserData() const { return mOVInfo.user_data[0]; }
|
||||
|
Loading…
Reference in New Issue
Block a user