mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 10:37:38 -04:00
Greyscale library: Changed the internal data format once more (separated pixel values and phases), allowing for further optimisation of drawing, scrolling etc. * Optimised grey phase blitting in the core reduces CPU load on all architectures, most significantly on coldfire. Previous version was too slow to keep up at 45MHz, leading to unwanted graininess (update frequency was halved). Also fixed screendump on 2bpp targets with vertical pixel packing.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16043 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
75380fd27d
commit
6a56c14e17
13 changed files with 462 additions and 313 deletions
|
@ -169,7 +169,7 @@ void grey_ub_scroll_left(int count)
|
|||
idx = _GREY_MULUQ(_grey_info.width, y & ~3) + (~y & 3);
|
||||
#endif
|
||||
#endif /* LCD_PIXELFORMAT */
|
||||
dst = &_grey_info.data[idx].value;
|
||||
dst = _grey_info.values + idx;
|
||||
src = dst + count * _GREY_X_ADVANCE;
|
||||
end = dst + _grey_info.width * _GREY_X_ADVANCE;
|
||||
|
||||
|
@ -213,7 +213,7 @@ void grey_ub_scroll_right(int count)
|
|||
idx = _GREY_MULUQ(_grey_info.width, y & ~3) + (~y & 3);
|
||||
#endif
|
||||
#endif /* LCD_PIXELFORMAT */
|
||||
start = &_grey_info.data[idx].value;
|
||||
start = _grey_info.values + idx;
|
||||
dst = start + _grey_info.width * _GREY_X_ADVANCE;
|
||||
src = dst - count * _GREY_X_ADVANCE;
|
||||
|
||||
|
@ -259,8 +259,8 @@ void grey_ub_scroll_up(int count)
|
|||
is = _GREY_MULUQ(_grey_info.width, ys & ~3) + (~ys & 3);
|
||||
#endif
|
||||
#endif /* LCD_PIXELFORMAT */
|
||||
dst = &_grey_info.data[id].value;
|
||||
src = &_grey_info.data[is].value;
|
||||
dst = _grey_info.values + id;
|
||||
src = _grey_info.values + is;
|
||||
dst_end = dst + _grey_info.width * _GREY_X_ADVANCE;
|
||||
|
||||
do
|
||||
|
@ -282,7 +282,7 @@ void grey_ub_scroll_up(int count)
|
|||
id = _GREY_MULUQ(_grey_info.width, yd & ~3) + (~yd & 3);
|
||||
#endif
|
||||
#endif /* LCD_PIXELFORMAT */
|
||||
dst = &_grey_info.data[id].value;
|
||||
dst = _grey_info.values + id;
|
||||
dst_end = dst + _grey_info.width * _GREY_X_ADVANCE;
|
||||
|
||||
do
|
||||
|
@ -320,8 +320,8 @@ void grey_ub_scroll_down(int count)
|
|||
is = _GREY_MULUQ(_grey_info.width, ys & ~3) + (~ys & 3);
|
||||
#endif
|
||||
#endif /* LCD_PIXELFORMAT */
|
||||
dst = &_grey_info.data[id].value;
|
||||
src = &_grey_info.data[is].value;
|
||||
dst = _grey_info.values + id;
|
||||
src = _grey_info.values + is;
|
||||
dst_end = dst + _grey_info.width * _GREY_X_ADVANCE;
|
||||
|
||||
do
|
||||
|
@ -343,7 +343,7 @@ void grey_ub_scroll_down(int count)
|
|||
id = _GREY_MULUQ(_grey_info.width, yd & ~3) + (~yd & 3);
|
||||
#endif
|
||||
#endif /* LCD_PIXELFORMAT */
|
||||
dst = &_grey_info.data[id].value;
|
||||
dst = _grey_info.values + id;
|
||||
dst_end = dst + _grey_info.width * _GREY_X_ADVANCE;
|
||||
|
||||
do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue