Commit graph

30 commits

Author SHA1 Message Date
Jens Arnold
cebd767224 Grayscale library: Tuned frame frequency for the 2nd/3rd gen LCD.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14026 a1c6a512-1295-4272-9138-f99709370657
2007-07-27 16:21:01 +00:00
Jens Arnold
32c69452d6 Grayscale lib: Using a 32x32->32 bit multiplication is better on ARM, as 16x16->32 bit isn't a single instruction. Renamed the macro for pointing out that it's not necessarily 16 bit anymore, and to avoid collisions with similar macros in plugins.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11436 a1c6a512-1295-4272-9138-f99709370657
2006-11-05 14:40:14 +00:00
Jens Arnold
bd7248d106 * Use fast multiplication macro in some more places. * Better pipelining on SH1.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10652 a1c6a512-1295-4272-9138-f99709370657
2006-08-19 06:29:23 +00:00
Jens Arnold
e6ed58f6c5 Better implementation of the new greyscale algorithm. A bit faster (+2% on iPod and Archos, +7% on Iriver H1x0), and more straightforward. * Fixed garbage display when a plugin switches on the overlay before drawing anything.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10534 a1c6a512-1295-4272-9138-f99709370657
2006-08-11 23:40:05 +00:00
Jens Arnold
71dc284b5d New algorithm for grayscale buffer updates which is faster for large buffer depths. Speedup (unbuffered, depth==32): +8% on H1x0, +17% on Recorder (depth==24), and +83% on iPod Mini.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10529 a1c6a512-1295-4272-9138-f99709370657
2006-08-11 14:13:01 +00:00
Jens Arnold
f54c34eb0f ARM targets: Shave off one instruction from the multiply-by-75.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10503 a1c6a512-1295-4272-9138-f99709370657
2006-08-09 14:17:09 +00:00
Jens Arnold
e7aeebf0bf Fix sim warnings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10481 a1c6a512-1295-4272-9138-f99709370657
2006-08-07 22:34:20 +00:00
Jens Arnold
754e173c25 Grayscale lib: Working screendump on iPod (target + sim).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10478 a1c6a512-1295-4272-9138-f99709370657
2006-08-07 21:58:32 +00:00
Jens Arnold
c00d799fa3 * Assembler optimised gray_update_rect() and writearray() for arm (greyscale iPods). * Some slight optimisations for coldfire (H1x0) and SH1 (archos). * Comment and formatting cleanup.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10473 a1c6a512-1295-4272-9138-f99709370657
2006-08-07 17:21:38 +00:00
Jens Arnold
d55503d80b We can run the grayscale lib at full frame rate on iPods...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10471 a1c6a512-1295-4272-9138-f99709370657
2006-08-07 08:59:55 +00:00
Jens Arnold
c214e7bb0c Grayscale library ported to the grayscale iPods, first version. Added C reference versions of gray_update_rect() for both horizontal and vertical pixel packing. gray_update_rect() and gray_ub_gray_bitmap_part() not yet assembler optimised. Grayscale screendump doesn't work yet. * Fixed button assignments for iPod in grayscale.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10468 a1c6a512-1295-4272-9138-f99709370657
2006-08-07 01:46:42 +00:00
Jens Arnold
51d3dba10a Again smaller fixed point exp()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10455 a1c6a512-1295-4272-9138-f99709370657
2006-08-04 07:32:23 +00:00
Jens Arnold
f212e6cf5f Smaller & faster (on our targets) fixed point exp() with a multiplication.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10454 a1c6a512-1295-4272-9138-f99709370657
2006-08-04 07:02:34 +00:00
Jens Arnold
b4cb493135 Proper rounding...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10420 a1c6a512-1295-4272-9138-f99709370657
2006-08-02 21:15:22 +00:00
Jens Arnold
fd9bd310a2 Slightly better precision.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10419 a1c6a512-1295-4272-9138-f99709370657
2006-08-02 20:57:40 +00:00
Jens Arnold
344849cc22 Ooops, don't apply correction when it shouldn't be applied.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10418 a1c6a512-1295-4272-9138-f99709370657
2006-08-02 20:19:20 +00:00
Jens Arnold
628d20a610 Grayscale library: LCD linearisation and gamma correction.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10402 a1c6a512-1295-4272-9138-f99709370657
2006-08-02 00:22:01 +00:00
Jens Arnold
d43e719d59 SH1: Better placement of the C library routine references (gcc 3.4.x -Os and -O2 proof).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9748 a1c6a512-1295-4272-9138-f99709370657
2006-04-20 19:48:02 +00:00
Jens Arnold
1be25a4d71 Use TIMER_FREQ for timers in plugins. Fixes timer speed on iPod.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9427 a1c6a512-1295-4272-9138-f99709370657
2006-04-02 12:45:30 +00:00
Jens Arnold
6a972e0249 Finally - grayscale library support for the simulators. Currently SDL only, win32 and x11 won't link anymore due to missing simulator functions.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8845 a1c6a512-1295-4272-9138-f99709370657
2006-02-26 13:37:42 +00:00
Tomasz Malesinski
c31d2f84b7 Fixed warnings on iFP.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8550 a1c6a512-1295-4272-9138-f99709370657
2006-02-03 23:14:42 +00:00
Jens Arnold
ddad7197ed H1x0: Slight optimisation of the grayscale library.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7646 a1c6a512-1295-4272-9138-f99709370657
2005-10-20 19:56:32 +00:00
Jens Arnold
1cbac551be Grayscale lib on archos: Fixed bug introduced with the register usage change. Reusing a register twice won't work that well...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7577 a1c6a512-1295-4272-9138-f99709370657
2005-10-03 12:51:29 +00:00
Jens Arnold
cfb073c452 Coldfire: New timer handling on CPU frequency change, adjusting the prescaler on the fly, for both tick and user timer. Precondition is that the higher frequencies are integer multiples of the base: now NORMAL is 45 MHz and MAX is 124 MHz. Removes the need for applications with longer timer periods (>= 10 ms) to boost the CPU all the time, e.g. the grayscale lib. Timer counts are now always based on the base frequency (CPU_FREQ). * Adjusted the RAM refresh timers to the new frequencies (all frequencies for H100) * All: Fixed the tick timer count being off by one.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7576 a1c6a512-1295-4272-9138-f99709370657
2005-10-03 09:24:36 +00:00
Jens Arnold
05042affc7 Core: A graphics framework can now register a hook function to extend the core screendump routine. * Grayscale library: (1) Changed the screendump routine into a hook, and implemented it for H1x0. (2) The planar pixel setting routines now use one register less. Fixes build problem with developer builds (frame pointers enabled) on coldfire.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7574 a1c6a512-1295-4272-9138-f99709370657
2005-10-01 10:20:55 +00:00
Jens Arnold
1a40e10933 H1x0: Changed lcd_blit() and the grayscale library to use the same internal format as on archos (1bpp). While the slowdown of the ISR is minimal (the intermediate buffers are in IRAM), the planar grayscale buffer takes only half the space for a given depth, and gray_update[_rect]() and unbuffered drawing/scrolling are faster because less data needs to be moved. It should also make porting of video.rock somewhat easier. * Archos recorders, Ondios: Some slight optimisations of the grayscale library.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7571 a1c6a512-1295-4272-9138-f99709370657
2005-09-30 20:10:27 +00:00
Jens Arnold
00866dbf86 Grayscale library: (1) Ported to iriver H1x0. Experiments have shown that the intended 49-shade mode isn't possible due to interference between the internal greylevel generation of the LCD and external pixel flipping, so the lib allows 33 shades as on the Archos. The current implementation wastes RAM by not switching the LCD to b&w mode and simply using colours 0 and 3 only. However, this allows to show a partial greyscale overlay and normal 4-shade graphics in parallel. (2) Converted all asm blocks to use symbolic parameters. (3) Properly marked asm input parameters that are changed within the block as in-out and feed them from a temp variable where necessary. (4) Screenshot is not yet working on H1x0.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7244 a1c6a512-1295-4272-9138-f99709370657
2005-07-27 19:58:49 +00:00
Jens Arnold
e44372ef18 Moved implementation of user timer to the firmware layer, implemented it for iriver, and made it shareable based on priorities. On iriver, the user timer is shared between the backlight fading and other use, so if a plugin registers the timer, the backlight will resort to simple on/off switching until the plugin releases the timer again. Sorted and bumped the plugin api.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7242 a1c6a512-1295-4272-9138-f99709370657
2005-07-26 20:01:11 +00:00
Jens Arnold
c20a00ef3e Complete rework of the grayscale library: (1) Implemented the new rockbox graphics api. (2) Added buffered mode, and implemented most drawing functions for buffered mode only. Buffered mode will ease implementation of animated graphics. Some functions are additionally provided as unbuffered versions (drawing grayscale bitmaps, scrolling) since unbuffered mode is better suited for non-animated graphics (JPEG viewer, mandelbrot) and saves some RAM, which is important on Archos. (3) Put all functions in a couple of source files, no more one-function-per-files. This became possible since sectioned compilation for the plugin library and appropriate linking for the pluginswas introduced, otherwise the binaries would be bloated by unused functions.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7241 a1c6a512-1295-4272-9138-f99709370657
2005-07-25 20:50:34 +00:00
Jens Arnold
7c6bdd6493 Split grayscale library into several files to make up a real function library. Significantly decreases binary size for plugins using it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4802 a1c6a512-1295-4272-9138-f99709370657
2004-06-23 22:15:50 +00:00