Commit graph

62 commits

Author SHA1 Message Date
Karl Kurbjun
e4345365f1 Add in BMP loader for vertical stride and include lcd-16bit-vert.c in SOURCES
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22580 a1c6a512-1295-4272-9138-f99709370657
2009-09-01 00:57:47 +00:00
Jens Arnold
1d6df54df2 Convert a number of places in core and plugins to use the BIT_N() macro instead of 1<<n. Speeds up things on SH1, and also reduces core binsize. Most notable speedups: 1 bit lcd driver: drawpixel +20%, drawline + 27%, hline +5%; jpeg viewer: +8% for 1/8 scaling. Other targets are unaffected.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21205 a1c6a512-1295-4272-9138-f99709370657
2009-06-07 21:27:05 +00:00
Maurus Cuelenaere
d2ea7db6f5 Should fix red
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21082 a1c6a512-1295-4272-9138-f99709370657
2009-05-25 20:15:02 +00:00
Maurus Cuelenaere
0bddb7eb65 Fix FORMAT_RETURN_SIZE in read_bmp_*() when scaling (thanks to Andrew Mahone)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21078 a1c6a512-1295-4272-9138-f99709370657
2009-05-25 15:19:34 +00:00
Maurus Cuelenaere
aec37aa5fe * read_bmp_*(): add FORMAT_RETURN_SIZE
* Lua: add luaL_checkboolean() & luaL_optboolean()
* Lua: add read_bmp_file


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21074 a1c6a512-1295-4272-9138-f99709370657
2009-05-25 11:12:27 +00:00
Andrew Mahone
59e70b50d8 Inline output_row_8_native when building bmp.c in core without HAVE_JPEG or HAVE_BMP_SCALING.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20886 a1c6a512-1295-4272-9138-f99709370657
2009-05-09 10:32:07 +00:00
Andrew Mahone
91efc16256 Split 8-bit-to-native conversion in bmp.c into a function, add support for plugging unscaled output in BMP and JPEG loaders, use output_row_8_native in JPEG decoder when possible.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20884 a1c6a512-1295-4272-9138-f99709370657
2009-05-09 07:31:27 +00:00
Andrew Mahone
eef7945a97 Move YUV->RGB in JPEG load from before scaler to after scaler. Required 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-06 04:53:56 +00:00
Andrew Mahone
20f76d61ae Make JPEG and BMP scaler optional with HAVE_JPEG and HAVE_BMP_SCALING, both 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-04 15:46:41 +00:00
Maurus Cuelenaere
36c71a60ca Get checkwps working again
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19880 a1c6a512-1295-4272-9138-f99709370657
2009-01-29 20:49:43 +00:00
Andrew Mahone
07e982df8a cleanup for core-file-in-pluginlib compilation:
wrapper C files in pluginlib renamed to the same name as the core files they
wrap

pluginlib-only init functions for resize and bmp moved into the wrapper files,
and declared in the associated header files

API() macro removed entirely, in favor of a core-only header file that
redefines core function names to use a plugin_api pointer

some unnecessary uses of PLUGIN in apps/recorder/bmp.c removed


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19712 a1c6a512-1295-4272-9138-f99709370657
2009-01-08 02:49:23 +00:00
Andrew Mahone
4eedc93357 build a scaling-enabled bitmap loader in pluginlib for mono bitmap targets, and use it in the test greylib scaler plugin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19671 a1c6a512-1295-4272-9138-f99709370657
2009-01-04 21:22:05 +00:00
Andrew Mahone
9058620849 Make scaler output truly pluggable, add an 8-bit greyscale output to
pluginlib for use with greylib, and add source for a test scaled bmp
viewer using greylib.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19593 a1c6a512-1295-4272-9138-f99709370657
2008-12-26 07:05:13 +00:00
Andrew Mahone
f7fa7e5ad5 Latest work on the bmp on-load scaler:
Macros for calculating size needed for bitmap load and scaling, so that
these can be compile-time constant when their inputs are.

Reduce size of bayer dither by chopping all but first row of dither
matrix, and replacing 2D lookup with 1D lookup and small calculation.

Move some functions not related to actual bmp file loading out of bmp.c.

A smaller brightness() for mono targets, and a higher-quality one for
greyscale targets, both replacing the division by 10 with a shift.

Port of the linear and area scalers to greyscale targets, this costs
some binsize but produces better output even when dithered to 2bpp.

Move duplicated row output code from inside vertical scalers to a
separate row output function.

Move some multiplies out of the line scaler, for a small speedup and
code size reduction, as well as a small improvement in accuracy for the
upscaling case.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19592 a1c6a512-1295-4272-9138-f99709370657
2008-12-26 07:03:22 +00:00
Andrew Mahone
781421afa2 resize-on-load for bitmap files on 2bpp and color targets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19374 a1c6a512-1295-4272-9138-f99709370657
2008-12-09 23:07:59 +00:00
Daniel Stenberg
2acc0ac542 Updated our source code header to explicitly mention that we are GPL v2 or
later. We still need to hunt down snippets used that are not. 1324 modified
files...
http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
2008-06-28 18:10:04 +00:00
Steve Bavin
799e9489ca Remove some more simulator debugging output.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17019 a1c6a512-1295-4272-9138-f99709370657
2008-04-07 17:19:53 +00:00
Dave Chapman
78d29f535f Major cleanup of checkwps - fix all warnings and add a script to build versions for all supported targets (plus some unsupported ones). You now need to run the version of checkwps that matches the device your WPS is for.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16831 a1c6a512-1295-4272-9138-f99709370657
2008-03-26 23:35:34 +00:00
Dave Chapman
b9bb723f12 1) Make Rockbox reject any WPSs if there are errors loading any of the required bmps; 2) Make checkwps actually load the images using the Rockbox bmp loader, and reject the WPS in the same was as Rockbox on bmp errors.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16822 a1c6a512-1295-4272-9138-f99709370657
2008-03-26 18:18:22 +00:00
Jens Arnold
8113717da9 Fix BMP loader for the iAudio M3 display.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16722 a1c6a512-1295-4272-9138-f99709370657
2008-03-20 17:40:58 +00:00
Jens Arnold
89bfb66939 BMP loader: Handle top-down BMP files (height is negative). Note that the e200 example pictures still don't work, as they are larger than the screen (not a loader problem).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15855 a1c6a512-1295-4272-9138-f99709370657
2007-11-30 08:51:18 +00:00
Nicolas Pennequin
ec6569ed22 Add read_bmp_fd and make the first parameter of read_bmp_file ("filename") const.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15553 a1c6a512-1295-4272-9138-f99709370657
2007-11-10 13:26:11 +00:00
Jonathan Gordon
6a5cc0bd25 Customizable icons for all bitmap targets. (FS#7013)
http://www.rockbox.org/twiki/bin/view/Main/CustomIcons for info on format and how to load them


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13177 a1c6a512-1295-4272-9138-f99709370657
2007-04-16 09:14:36 +00:00
Jens Arnold
0b2ac4b427 BMP loader: Using shifts for division by powers of 2 saves a bit on code size.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11559 a1c6a512-1295-4272-9138-f99709370657
2006-11-20 00:55:09 +00:00
Jens Arnold
848e0b5a16 BMP loader: Remote LCD format support.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11558 a1c6a512-1295-4272-9138-f99709370657
2006-11-20 00:20:09 +00:00
Jens Arnold
d1077a8a0c Fixed the dithering once more.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11555 a1c6a512-1295-4272-9138-f99709370657
2006-11-19 14:58:12 +00:00
Jens Arnold
adc4848772 Complete rework of the BMP loader: * Support for 4 bit, 15/16 bit and 32 bit BMPs in addition to the already supported 1 bit, 8 bit and 24 bit formats. * Better protection against corrupt BMP files. * Added dithering for 2 bit targets. * Optimised, compact code. There's almost no code size increase for SH1 (only 68 bytes), and even a decrease for coldfire, with all the additional features. * Code policed. * Fixes bug that loading a backdrop worked only once per session.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11548 a1c6a512-1295-4272-9138-f99709370657
2006-11-18 14:29:51 +00:00
Jens Arnold
83e18d982c Patch #5771 by Frederik Vestre: Fix BMP loader to work in 64bit environments (simulator).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11513 a1c6a512-1295-4272-9138-f99709370657
2006-11-11 11:26:42 +00:00
Michael Sevakis
e0710b2af1 More color adjustments. Better translation to and from native colors with even distribution of levels. Macros for extracting native depth components and packing them.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11227 a1c6a512-1295-4272-9138-f99709370657
2006-10-15 17:51:00 +00:00
Michael Sevakis
b5404b2ca6 Left some crud in bmp.c that should've been removed before committing. Don't know what's with me today
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11196 a1c6a512-1295-4272-9138-f99709370657
2006-10-12 00:25:21 +00:00
Michael Sevakis
fa0ea19d5a Fixed the problem with the backdrops on iPod. The same problem was in the updated color picker and that is fixed too.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11195 a1c6a512-1295-4272-9138-f99709370657
2006-10-11 23:26:17 +00:00
Michael Sevakis
bed0db213d Small bitmap dithering tweak
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11191 a1c6a512-1295-4272-9138-f99709370657
2006-10-11 18:12:36 +00:00
Michael Sevakis
756ce4abca Fixed errors. Forgot to include system.h for swap16 in bmp.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11181 a1c6a512-1295-4272-9138-f99709370657
2006-10-11 01:43:53 +00:00
Michael Sevakis
76a6aaa278 Added dithering for 24 bit backdrops on 16 bit displays. FORMAT_DITHER should be specified to dither a bitmap when loading. Feel free to flame me if I got the RGB565SWAPPED thing wrong.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11180 a1c6a512-1295-4272-9138-f99709370657
2006-10-11 01:26:09 +00:00
Frank Dischner
38ae72ac1e Fix color->grayscale bitmap loading on grayscale ipods and mono->grayscale on all grayscale targets.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9791 a1c6a512-1295-4272-9138-f99709370657
2006-04-24 15:52:05 +00:00
Jens Arnold
c279335ed2 Correct pallette->RGB565 conversion when loading 1-bit BMP files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9101 a1c6a512-1295-4272-9138-f99709370657
2006-03-18 20:34:45 +00:00
Linus Nielsen Feltzing
21229b2f09 The image size calculation was wrong on monochrome targets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9006 a1c6a512-1295-4272-9138-f99709370657
2006-03-11 20:25:16 +00:00
Linus Nielsen Feltzing
b69d59ba8e Handle 8-bit BMP files
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8514 a1c6a512-1295-4272-9138-f99709370657
2006-01-31 23:34:02 +00:00
Linus Nielsen Feltzing
62b22ba45f Slighly less confusing handling of inverted monochrome images
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8513 a1c6a512-1295-4272-9138-f99709370657
2006-01-31 23:02:05 +00:00
Magnus Holmgren
fe1c9f5846 Iriver: Another grayscale bmp loader bug fixed: clear the right amount of data, to avoid garbage in the images.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8510 a1c6a512-1295-4272-9138-f99709370657
2006-01-31 21:59:47 +00:00
Linus Nielsen Feltzing
5f0b75ebc7 Correct PaddedWidth calculation
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8509 a1c6a512-1295-4272-9138-f99709370657
2006-01-31 21:50:53 +00:00
Christi Scarborough
ae0ae6d5cf Small iPod colour BMP fix by linuxstd
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8504 a1c6a512-1295-4272-9138-f99709370657
2006-01-31 14:29:51 +00:00
Linus Nielsen Feltzing
ea72d05ec6 Fixed endianness problem in the BMP loader
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8498 a1c6a512-1295-4272-9138-f99709370657
2006-01-31 00:40:14 +00:00
Magnus Holmgren
3b8934d6d1 Iriver: Calculate proper height (i.e., size) for grayscale bitmaps.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8496 a1c6a512-1295-4272-9138-f99709370657
2006-01-30 21:35:34 +00:00
Linus Nielsen Feltzing
3722a99dd4 Better working fix for the BMP loader transparency flag bug
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8481 a1c6a512-1295-4272-9138-f99709370657
2006-01-29 09:58:53 +00:00
Brandon Low
8f0740333b Temporary fix for crashing when trying to enter the WPS, thanks to Adam Boot.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8480 a1c6a512-1295-4272-9138-f99709370657
2006-01-29 05:05:40 +00:00
Linus Nielsen Feltzing
745adad22a Color BMP support
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8472 a1c6a512-1295-4272-9138-f99709370657
2006-01-28 12:12:42 +00:00
Miika Pekkarinen
465982b2af Little optimization to the bmp loader loop (unfortunately almost no
effect as the open() takes the longest time).


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8436 a1c6a512-1295-4272-9138-f99709370657
2006-01-24 08:12:36 +00:00
Daniel Stenberg
1188f933aa Made it build warning-free on the sim. This could not have worked in the sim
previously. Made readshort() and readlong() static.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6444 a1c6a512-1295-4272-9138-f99709370657
2005-05-08 22:11:15 +00:00
Daniel Stenberg
113a58dca6 include autoconf for the endian defines
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6422 a1c6a512-1295-4272-9138-f99709370657
2005-05-07 23:08:14 +00:00