summaryrefslogtreecommitdiffstats
path: root/apps/plugins/pictureflow.c
AgeCommit message (Collapse)AuthorFilesLines
2010-08-24Second try: Introduce plugin_crt0.c that every plugin links.Thomas Martitz1-1/+1
It handles exit() properly, calling the handler also when the plugin returns normally (also make exit() more standard compliant while at it). It also holds PLUGIN_HEADER, so that it doesn't need to be in each plugin anymore. To work better together with callbacks passed to rb->default_event_handler_ex() introduce exit_on_usb() which will call the exit handler before showing the usb screen and exit() after it. In most cases rb->default_event_handler_ex() was passed a callback which was manually called at all other return points. This can now be done via atexit(). In future plugin_crt0.c could also handle clearing bss, initializing iram and more. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27873 a1c6a512-1295-4272-9138-f99709370657
2010-08-23Revert "Introduce plugin_crt0.c that every plugin links."Thomas Martitz1-1/+1
Too much errors and no time to fix them now. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27863 a1c6a512-1295-4272-9138-f99709370657
2010-08-23Introduce plugin_crt0.c that every plugin links.Thomas Martitz1-1/+1
It handles exit() properly, calling the handler also when the plugin returns normally (also it makes exit() more standard compliant while at it). It also holds PLUGIN_HEADER, so that it doesn't need to be in each plugin anymore. To work better together with callbacks passed to rb->default_event_handler_ex introduce exit_on_usb() which will call the exit handler before showing the usb screen and exit() after it. In most cases it was passed a callback which was manually called at all other return points. This can now be done via atexit(). In future plugin_crt0.c could also handle clearing bss, initializing iram and more. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27862 a1c6a512-1295-4272-9138-f99709370657
2009-05-07Add missing PictureFlow overlay source, fix properties on new files.Andrew Mahone1-0/+33
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20865 a1c6a512-1295-4272-9138-f99709370657
2009-05-07Build pictureflow using overlay on lowmem targets, support JPEG AA in PF on ↵Andrew Mahone1-2580/+0
all targets. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20864 a1c6a512-1295-4272-9138-f99709370657
2009-05-06Move YUV->RGB in JPEG load from before scaler to after scaler. Required ↵Andrew Mahone1-0/+30
change to struct custom_format, so sorted the plugin API as well. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20856 a1c6a512-1295-4272-9138-f99709370657
2009-05-04Make JPEG and BMP scaler optional with HAVE_JPEG and HAVE_BMP_SCALING, both ↵Andrew Mahone1-0/+5
defined for all targets that have HAVE_ALBUMART. Disable JPEG in PictureFlow and pluginlib album art search with 32KiB plugin buffer until PictureFlow gets overlay support. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20851 a1c6a512-1295-4272-9138-f99709370657
2009-05-02PictureFlow JPEG AA support for all non-mono targets (mono targets will need ↵Andrew Mahone1-2/+3
overlay for this). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20841 a1c6a512-1295-4272-9138-f99709370657
2009-04-08Undo revert of r20653Andrew Mahone1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20657 a1c6a512-1295-4272-9138-f99709370657
2009-04-08fix accidental reverts in r20651Andrew Mahone1-11/+6
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20656 a1c6a512-1295-4272-9138-f99709370657
2009-04-08Fix yellowAndrew Mahone1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20653 a1c6a512-1295-4272-9138-f99709370657
2009-04-08FS#9992: remove PLA use from PictureFlow, replacing it with maps designed ↵Andrew Mahone1-68/+147
for each target, and inheriting the targets' standard actions git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20651 a1c6a512-1295-4272-9138-f99709370657
2009-03-22Pictureflow optimisations: (1) No need to restore the drawmode, the core ↵Jens Arnold1-64/+50
takes care of that. (2) Making the angle positive before masking is redundant. (3) Slide rendering: * Precalculate a faded reflection table for alpha < 256, saving a multiply in the inner loop. * Group the inner loops so that less variables are precalculated, helping to keep stuff in registers. * Combine loop conditions so that a single check is sufficient. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20456 a1c6a512-1295-4272-9138-f99709370657
2009-03-09Greyscale targets: Make the gradient a bit brighter and simplify the ↵Jens Arnold1-0/+4
calculation. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20253 a1c6a512-1295-4272-9138-f99709370657
2009-03-07Revert the static'ing, as it causes crashes/freezes. Needs investigation.Jens Arnold1-40/+41
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20229 a1c6a512-1295-4272-9138-f99709370657
2009-03-07Made all local functions static, saving ~500 bytes of binsize on coldfire ↵Jens Arnold1-51/+40
and SH1, and ~150 bytes on ARM. * Removed an unused static inline function. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20228 a1c6a512-1295-4272-9138-f99709370657
2009-03-07Mono targets: Make sure the splash screen uses white on black and the logo ↵Jens Arnold1-4/+17
doesn't look inverted. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20224 a1c6a512-1295-4272-9138-f99709370657
2009-03-07Performance tweaks for SH1. No changes for coldfire and ARM, apart from ↵Jens Arnold1-12/+21
changing a bunch of signed shifts to unsigned shifts. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20223 a1c6a512-1295-4272-9138-f99709370657
2009-03-06add the needed plugin API exports for pictureflow to hwcodec, use the audio ↵Andrew Mahone1-25/+29
buffer if plugin buffer is too small, build on any target with bitmap + tagcache git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20213 a1c6a512-1295-4272-9138-f99709370657
2009-03-06pictureflow: use correct priority to free slides when extending cache on ↵Andrew Mahone1-4/+4
right, catch and handle failure to find a slide to free git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20212 a1c6a512-1295-4272-9138-f99709370657
2009-03-04FS#9919 pictureflow cache rework, footprint reduction, buflib useAndrew Mahone1-239/+383
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20203 a1c6a512-1295-4272-9138-f99709370657
2009-02-15Spelling fixes (UK English) by Alex ParkerFrank Gevaerts1-2/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20009 a1c6a512-1295-4272-9138-f99709370657
2009-02-08align frontmost edge of slides with plane of displayAndrew Mahone1-3/+7
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19948 a1c6a512-1295-4272-9138-f99709370657
2009-02-08simplify zo calculation a bit, "zoom" the center margin value and add term ↵Andrew Mahone1-11/+13
for zo to offset calculation, so that margins are still correct when zooming git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19947 a1c6a512-1295-4272-9138-f99709370657
2009-02-07rewrite of pictureflow renderer with 3D projection, this will allow many ↵Andrew Mahone1-56/+98
possible tweaks in the future, such as moving only the center slide "closer", changing the angle of side slides, etc, while keeping the same meaning for the center margin and spacing settings git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19942 a1c6a512-1295-4272-9138-f99709370657
2009-02-06use a table-free clz on coldfire, where it benchmarks a bit fasterAndrew Mahone1-0/+39
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19933 a1c6a512-1295-4272-9138-f99709370657
2009-01-30per Jens Arnold's suggestion:Andrew Mahone1-18/+8
use platform clz instruction only on ARMv5+, where we know it returns 32 for a 0 input, and remove the special case for 0 use binary search only to find most significant four bits, then use lookup table to add number of leading zeroes within those bits git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19888 a1c6a512-1295-4272-9138-f99709370657
2009-01-30correct clz in pictureflow.cAndrew Mahone1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19887 a1c6a512-1295-4272-9138-f99709370657
2009-01-30remove 64-bit math from fdiv in pictureflow.c, replacing it with limited ↵Andrew Mahone1-8/+63
pre-shifting of input values git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19886 a1c6a512-1295-4272-9138-f99709370657
2009-01-29pictureflow tweaks:Andrew Mahone1-5/+5
allow wider covers on landscape, bringing square covers closer to suggested size from pre-scaling pictureflow tweak defaults for center margin and cover spacing a little bit change default title display to bottom if LCD_HEIGHT <= 100 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19877 a1c6a512-1295-4272-9138-f99709370657
2009-01-29fix divide-by-zero error in pictureflow when selecting albumAndrew Mahone1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19876 a1c6a512-1295-4272-9138-f99709370657
2009-01-24remove MEM_FUNCTION_WRAPPERS, and private mem* implementations from plugins, ↵Andrew Mahone1-2/+0
and replace with pluginlib implementations in plugins/lib/gcc-support.c git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19847 a1c6a512-1295-4272-9138-f99709370657
2009-01-24fix red on mono hardware - add mem function wrappers to pictureflowAndrew Mahone1-0/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19839 a1c6a512-1295-4272-9138-f99709370657
2009-01-24plugins/lib/feature_wrappers.h to provide easy access to some feature that ↵Andrew Mahone1-5/+25
may be in either API or pluginlib depending on target pictureflow modified to use feature wrappers, and built on all targets that have tagcache and are swcodec git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19837 a1c6a512-1295-4272-9138-f99709370657
2009-01-24fix for targets using greylib in pictureflow, they need to set drawmode for ↵Andrew Mahone1-1/+2
both normal and greylib drawing, so using MYLCD for that was inappropriate git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19836 a1c6a512-1295-4272-9138-f99709370657
2009-01-21replace DIV255 with an inline function, the macro version caused unneeded ↵Andrew Mahone1-2/+6
recalculations git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19809 a1c6a512-1295-4272-9138-f99709370657
2009-01-20fix red on grayscale in pictureflowAndrew Mahone1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19803 a1c6a512-1295-4272-9138-f99709370657
2009-01-20scaler optimizations:Andrew Mahone1-11/+11
on sh, use 8.24 fixed-point C math for final division in scaler on coldfire, use 8.32 fixed-point via emac on other architectures, use 8.32 fixed-point C math use shift-and-add to divide when adjusting scale factors in pictureflow git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19802 a1c6a512-1295-4272-9138-f99709370657
2009-01-18use multiply-shift to scale reciprocals for rgb16 output, instead ofAndrew Mahone1-5/+8
multiply-divide git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19788 a1c6a512-1295-4272-9138-f99709370657
2009-01-17unify pointers to value for configfile, and add TYPE_BOOL type, used byAndrew Mahone1-19/+18
pictureflow git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19786 a1c6a512-1295-4272-9138-f99709370657
2009-01-17fix pictureflow, previous fix caused cache to never be marked as goodAndrew Mahone1-2/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19785 a1c6a512-1295-4272-9138-f99709370657
2009-01-17fix yellow, but in the long run, configfile needs a TYPE_BOOL as a clean fix ↵Andrew Mahone1-10/+14
to this git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19783 a1c6a512-1295-4272-9138-f99709370657
2009-01-17return to transposed images in cache, via new output plugins, to saveAndrew Mahone1-17/+50
multiplies in render_slide fix empty slide regen on cache version change git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19782 a1c6a512-1295-4272-9138-f99709370657
2009-01-17remove unused fh from create_albumart_cacheAndrew Mahone1-2/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19781 a1c6a512-1295-4272-9138-f99709370657
2009-01-17pictureflow configfile conversion:Andrew Mahone1-118/+86
settings use configfile from pluginlib cache version is stored in config file, so that changes to the cache file format can trigger rebuild automatically cache version is set to 0 to flag cache as needing rebuild git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19780 a1c6a512-1295-4272-9138-f99709370657
2009-01-17pictureflow cleanup:Andrew Mahone1-15/+12
remove some old, unused #defines split DISPLAY_SIZE into DISPLAY_WIDTH and DISPLAY_HEIGHT scale DISPLAY_WIDTH to compensate for pixel aspect ratio use new DISPLAY_HEIGHT where appropriate, instead of calculating based on LCD size git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19779 a1c6a512-1295-4272-9138-f99709370657
2009-01-16loader-initialized global plugin API:Andrew Mahone1-9/+5
struct plugin_api *rb is declared in PLUGIN_HEADER, and pointed to by __header.api the loader uses this pointer to initialize rb before calling entry_point entry_point is no longer passed a pointer to the plugin API all plugins, and pluginlib functions, are modified to refer to the global rb pluginlib functions which only served to copy the API pointer are removed git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19776 a1c6a512-1295-4272-9138-f99709370657
2009-01-16fix bug causing pictureflow to write one column past left side of screen, ↵Andrew Mahone1-1/+1
resulting in a stripe of rightmost slide appearing on the left side of the screen git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19775 a1c6a512-1295-4272-9138-f99709370657
2009-01-14reduce pictureflow's fade_color by one multiply, and a few shifts, while ↵Andrew Mahone1-8/+10
still maintaining reasonable quality git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19770 a1c6a512-1295-4272-9138-f99709370657
2009-01-13remove align_buffer from firmare/general.c, replacing with ALIGN_BUFFER ↵Andrew Mahone1-2/+1
macro, and replace all uses of it (only resize.c in core, and pictureflow and mpegplayer plugins), remove it from plugin_api, and remove wrapper for it from plugin.h git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19758 a1c6a512-1295-4272-9138-f99709370657