Commit Graph

18 Commits

Author SHA1 Message Date
Bertrik Sikken
8e2ff63a7e Various files: make function implementations consistent with their declaration in the header file or static if
they're local.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19892 a1c6a512-1295-4272-9138-f99709370657
2009-01-31 23:51:11 +00:00
Andrew Mahone
1b13299769 scaler optimizations:
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-20 17:24:49 +00:00
Andrew Mahone
738a5643ad support pixel aspect ratio compensation in recalc_dimension, with PAR defined as 1:1 by default, and set to 4:5 for archos bitmap targets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19759 a1c6a512-1295-4272-9138-f99709370657
2009-01-13 14:41:29 +00:00
Andrew Mahone
2fbf09752d remove align_buffer from firmare/general.c, replacing with ALIGN_BUFFER 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
2009-01-13 13:48:26 +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
Bertrik Sikken
32c2f455d1 static/const/#include/tab police on various files
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19643 a1c6a512-1295-4272-9138-f99709370657
2009-01-02 21:43:52 +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
676fd32c96 fix yellow
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19440 a1c6a512-1295-4272-9138-f99709370657
2008-12-14 18:42:05 +00:00
Andrew Mahone
524c5409c3 remove unneeded test
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19439 a1c6a512-1295-4272-9138-f99709370657
2008-12-14 17:58:04 +00:00
Andrew Mahone
ea5d0bd7ec fix yellow
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19394 a1c6a512-1295-4272-9138-f99709370657
2008-12-12 03:16:06 +00:00
Andrew Mahone
66b0d8198e fix broken greyscale upscaling
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19393 a1c6a512-1295-4272-9138-f99709370657
2008-12-12 02:44:13 +00:00
Michael Sevakis
441fca176a Fix a wrong comment in thread.c and mention an alternative approach to inits. Fix a couple headers' Id fields while at it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19386 a1c6a512-1295-4272-9138-f99709370657
2008-12-10 21:10:34 +00:00
Andrew Mahone
995c89cb6f code cleanup, more descriptive variable names, and algorithm docs for color scalers
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19381 a1c6a512-1295-4272-9138-f99709370657
2008-12-10 12:09:03 +00:00
Andrew Mahone
eb04315b19 small binsize improvement for color scalers
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19380 a1c6a512-1295-4272-9138-f99709370657
2008-12-10 09:45:49 +00:00
Andrew Mahone
40ff47c7ee fix yellow - bogus unitialized use warnings
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19376 a1c6a512-1295-4272-9138-f99709370657
2008-12-09 23:48:34 +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