Merge branch 'master' into pu/fb-setmode

Fix merge conflict


Origin commit data
------------------
Branch: ni/coolstream
Commit: 65f81b146d
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2017-02-14 (Tue, 14 Feb 2017)



------------------
This commit was generated by Migit
This commit is contained in:
Michael Liebmann
2017-02-14 20:11:08 +01:00
9 changed files with 40 additions and 15 deletions

View File

@@ -299,3 +299,20 @@ bool CFbAccelCSHD2::fullHdAvailable()
return true;
return false;
}
/* align for hw blit */
uint32_t CFbAccelCSHD2::getWidth4FB_HW_ACC(const uint32_t _x, const uint32_t _w, const bool max)
{
uint32_t ret = _w;
if ((_x + ret) >= xRes)
ret = xRes-_x-1;
if (ret%4 == 0)
return ret;
int add = (max) ? 3 : 0;
ret = ((ret + add) / 4) * 4;
if ((_x + ret) >= xRes)
ret -= 4;
return ret;
}