summaryrefslogtreecommitdiff
path: root/apps/recorder/bmp.c (follow)
Commit message (Collapse)AuthorAge
* Fix some build errors and warnings.Thomas Martitz2014-06-21
| | | | Change-Id: I149c00fc6ba47d5134ad4f74c364bffd24079824
* lcd-24bit: Introduce a 24-bit mid-level LCD driverThomas Martitz2014-06-21
| | | | | | | | | | | | | | | | | With LCD driver all calculation will be performed on RGB888 and the hardware/OS can display from our 24bit framebuffer. It is not yet as performance optimized as the existing drivers but should be good enough.The vast number of small changes is due to the fact that fb_data can be a struct type now, while most of the code expected a scalar type. lcd-as-memframe ASM code does not work with 24bit currently so the with 24bit it enforces the generic C code. All plugins are ported over. Except for rockpaint. It uses so much memory that it wouldnt fit into the 512k plugin buffer anymore (patches welcome). Change-Id: Ibb1964545028ce0d8ff9833ccc3ab66be3ee0754
* bmp loader: Fix loading of monochrome/greyscale BMPs with newer headers.Thomas Martitz2014-01-11
| | | | | | | | | The code expected the color table at offset 54 (14+size of BITMAPINFOHEADER), which was after the BITMAPINFOHEADER header. However, newer BITMAPINFOHEADER versions exist which have more fields before the color table. Fix this by explicitely seeking to the color table. Change-Id: If1dfc77e7485e5a9e0bc0e7f577152da9358bd71
* bmp.c: Undo debug stuff that got in by accident.Thomas Martitz2014-01-05
| | | | Change-Id: Ic37658ab8d81405e28a4097d38785900fd0951cd
* Do not include kernel.h in system.h.Thomas Martitz2014-01-05
| | | | | | | system.h doesn't need it on its own and this change makes it less dependant on Rockbox internals. Change-Id: I4e1e4108a52a7b599627a829204eb82b392fc6d6
* Revert "Fix data abort introduced by ef92ed4a."Thomas Martitz2014-01-05
| | | | | | | | | | | This reverts commit 61a096499b72f82dd8efc782e30cfeb1a31ef400. The original issue was caused by a new structure member which caused bmp_args::buf to be unaligned for 2-byte reads. Enforcing that alignment should be the faster fix. Aligning to cache (while at it) should improve bmp loading times even more. Change-Id: I58a2caaf08c0ce46e2fb9666de628a30a36ea5f4
* Fix data abort introduced by ef92ed4a.Frank Gevaerts2014-01-04
| | | | Change-Id: I3e1bf2434238835d2d2b8f5f2a8f44b0df97b33d
* Fix errors introduced by a62bd92.Thomas Martitz2013-12-22
| | | | Change-Id: I3f65ca5347d08e1b77196c73ccb3a0951f14c850
* Fix warning and re-order code a bit.Thomas Martitz2013-12-22
| | | | Change-Id: I1d733b3d0bd17cc541218f9a2b7712712ad314dd
* Support GIMP bmp files.Thomas Martitz2013-12-22
| | | | Change-Id: I7380ceeaf696b67e1641d24e7b932e3d74770932
* bitmap drawing: Negate alpha channel to match alpha information format of ↵Thomas Martitz2013-02-12
| | | | | | | | | | font files. The comment about the format was actually incorrect. The alpha information is now negated during conversion to native format, according to the corrected comment. Change-Id: Ifdb9ffdf9b55e39e64983eec2d9d60339e570bd9
* Handle 32bit bitmaps with all-zero alpha channel as fully opaque.Thomas Martitz2011-11-11
| | | | | | | | | | This is what gimp does when opening such a file. Tt saves the alpha channel with all-0xff, but other programs might use 0x00. As a fully transparent image doesn't make sense this should be OK. Also split the 32bit and 24bit case in the bmp reader, they're sufficiently different. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30968 a1c6a512-1295-4272-9138-f99709370657
* Document the internal alpha channel format better, and fixes for 32bit alpha ↵Thomas Martitz2011-11-11
| | | | | | | | | bitmaps. For images, rows need to be even (this is not true for anti-aliased font files). Fix stride and size calculation. This makes images that have odd pixel rows display properly and fixes buffer overflows. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30966 a1c6a512-1295-4272-9138-f99709370657
* Fix warning on mrobe100.Thomas Martitz2011-11-08
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30942 a1c6a512-1295-4272-9138-f99709370657
* Support for transparency in 32bit bitmaps on color targets.Thomas Martitz2011-11-08
| | | | | | | | | This uses the alpha blending capabilities introduced with anti-aliased fonts to draw bitmaps with transparency information. The bmp loader is extended to read this information (pass FORMAT_TRANSPARENT in format). The alpha information will be used when drawing the bitmap. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30937 a1c6a512-1295-4272-9138-f99709370657
* Roll back r30416. A proper fix of this warning will end in an #ifdef-hell.Andree Buschmann2011-09-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30417 a1c6a512-1295-4272-9138-f99709370657
* Remove 'set but not used' warning by GCC 4.6.1.Andree Buschmann2011-09-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30416 a1c6a512-1295-4272-9138-f99709370657
* #ifdef hell makes effectively suppressing this warning impossible, so stop ↵Frank Gevaerts2011-08-01
| | | | | | trying git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30238 a1c6a512-1295-4272-9138-f99709370657
* Move the "warning suppression" down, so it comes after the last write to ↵Frank Gevaerts2011-08-01
| | | | | | "remote", to ensure better warning avoidance git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30237 a1c6a512-1295-4272-9138-f99709370657
* Suppress a "variable 'remote' set but not used" warning that some gcc ↵Frank Gevaerts2011-08-01
| | | | | | versions (rightly) emit for the m:robe 100 sim. The "correct" solution would be to add about twenty five more #ifdefs to a function that already has way too many of them, or to rewrite the entire function. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30236 a1c6a512-1295-4272-9138-f99709370657
* Remove a couple of dead inits and assignments found by the ↵Nils Wallménius2011-06-12
| | | | | | clang-static-analyzer. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29996 a1c6a512-1295-4272-9138-f99709370657
* Fix several 'variable set but not used' warnings reported from GCC 4.6.0.Andree Buschmann2011-05-01
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29805 a1c6a512-1295-4272-9138-f99709370657
* FS#10535: bmp viewer plugin.Teruaki Kawashima2010-02-18
| | | | | | | * changed bmp.c so that it loads bitmap larger than LCD correctly. * removed bmp entry form inbuilt_filetypes in filetypes.c so that bmp files will be opened with bmp viewer when selected in browser. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24754 a1c6a512-1295-4272-9138-f99709370657
* fix checkwps breakage caused by r229900Nils Wallménius2009-10-06
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22993 a1c6a512-1295-4272-9138-f99709370657
* Fix STRIDE macro for multiscreen and add stride support for picture lib.Karl Kurbjun2009-09-04
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22615 a1c6a512-1295-4272-9138-f99709370657
* Add in BMP loader for vertical stride and include lcd-16bit-vert.c in SOURCESKarl Kurbjun2009-09-01
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22580 a1c6a512-1295-4272-9138-f99709370657
* Convert a number of places in core and plugins to use the BIT_N() macro ↵Jens Arnold2009-06-07
| | | | | | 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
* Should fix redMaurus Cuelenaere2009-05-25
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21082 a1c6a512-1295-4272-9138-f99709370657
* Fix FORMAT_RETURN_SIZE in read_bmp_*() when scaling (thanks to Andrew Mahone)Maurus Cuelenaere2009-05-25
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21078 a1c6a512-1295-4272-9138-f99709370657
* * read_bmp_*(): add FORMAT_RETURN_SIZEMaurus Cuelenaere2009-05-25
| | | | | | | | * 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
* Inline output_row_8_native when building bmp.c in core without HAVE_JPEG or ↵Andrew Mahone2009-05-09
| | | | | | HAVE_BMP_SCALING. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20886 a1c6a512-1295-4272-9138-f99709370657
* Split 8-bit-to-native conversion in bmp.c into a function, add support for ↵Andrew Mahone2009-05-09
| | | | | | 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
* Move YUV->RGB in JPEG load from before scaler to after scaler. Required ↵Andrew Mahone2009-05-06
| | | | | | 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
* Make JPEG and BMP scaler optional with HAVE_JPEG and HAVE_BMP_SCALING, both ↵Andrew Mahone2009-05-04
| | | | | | | | 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
* Get checkwps working againMaurus Cuelenaere2009-01-29
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19880 a1c6a512-1295-4272-9138-f99709370657
* cleanup for core-file-in-pluginlib compilation:Andrew Mahone2009-01-08
| | | | | | | | | | | | | | | | 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
* build a scaling-enabled bitmap loader in pluginlib for mono bitmap targets, ↵Andrew Mahone2009-01-04
| | | | | | and use it in the test greylib scaler plugin git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19671 a1c6a512-1295-4272-9138-f99709370657
* Make scaler output truly pluggable, add an 8-bit greyscale output toAndrew Mahone2008-12-26
| | | | | | | 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
* Latest work on the bmp on-load scaler:Andrew Mahone2008-12-26
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* resize-on-load for bitmap files on 2bpp and color targetsAndrew Mahone2008-12-09
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19374 a1c6a512-1295-4272-9138-f99709370657
* Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg2008-06-28
| | | | | | | | | 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
* Remove some more simulator debugging output.Steve Bavin2008-04-07
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17019 a1c6a512-1295-4272-9138-f99709370657
* Major cleanup of checkwps - fix all warnings and add a script to build ↵Dave Chapman2008-03-26
| | | | | | 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
* 1) Make Rockbox reject any WPSs if there are errors loading any of the ↵Dave Chapman2008-03-26
| | | | | | 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
* Fix BMP loader for the iAudio M3 display.Jens Arnold2008-03-20
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16722 a1c6a512-1295-4272-9138-f99709370657
* BMP loader: Handle top-down BMP files (height is negative). Note that the ↵Jens Arnold2007-11-30
| | | | | | 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
* Add read_bmp_fd and make the first parameter of read_bmp_file ("filename") ↵Nicolas Pennequin2007-11-10
| | | | | | const. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15553 a1c6a512-1295-4272-9138-f99709370657
* Customizable icons for all bitmap targets. (FS#7013)Jonathan Gordon2007-04-16
| | | | | | | 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
* BMP loader: Using shifts for division by powers of 2 saves a bit on code size.Jens Arnold2006-11-20
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11559 a1c6a512-1295-4272-9138-f99709370657
* BMP loader: Remote LCD format support.Jens Arnold2006-11-20
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11558 a1c6a512-1295-4272-9138-f99709370657