Commit graph

19 commits

Author SHA1 Message Date
Solomon Peachy
092c340a20 [1/4] Remove SH support and all archos targets
This removes all code specific to SH targets

Change-Id: I7980523785d2596e65c06430f4638eec74a06061
2020-07-24 21:20:13 +00:00
Thomas Martitz
c7b8054714 Adapt the resize-on-load image scalers to support the alpha channel.
Now 32bit BMPs with alpha channel can be up- and downscaled without losing
transparency information.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30938 a1c6a512-1295-4272-9138-f99709370657
2011-11-08 21:39:23 +00:00
Andrew Mahone
00d6cfd389 Fix yellow when building with HAVE_ALBUMART, without HAVE_JPEG/HAVE_BMP_SCALING.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21092 a1c6a512-1295-4272-9138-f99709370657
2009-05-26 20:26:05 +00:00
Andrew Mahone
92785b8f2f Use pre-multiplication in scaler to save one multiply per color component on ARM and Coldfire, at the cost of an extra add/shift in the horizontal scaler to reduce values to a workable range. SH-1 retains the same basic math, as
the use of 16x16->32 hardware multiplication in the earlier scaler stages saves more than removing the 32x32->40 multiply to descale output.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21091 a1c6a512-1295-4272-9138-f99709370657
2009-05-26 20:00:47 +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
Andrew Mahone
1541c313a0 Improve scaler reciprocal precision by 1 bit, and remove unused SC_NUM, SC_FIX, and SC_SHIFT.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20654 a1c6a512-1295-4272-9138-f99709370657
2009-04-08 06:25:06 +00:00
Jens Arnold
d8ff94121f Get rid of a useless copy instruction in the SH1 32*32->64bit multiply routines (signed and unsigned).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20013 a1c6a512-1295-4272-9138-f99709370657
2009-02-15 23:13:26 +00:00
Jens Arnold
789b0a2eb9 Add an unsigned 32*32->top32 bit multiply for resizing on SH1, and switch to 32 bit precision using that.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20012 a1c6a512-1295-4272-9138-f99709370657
2009-02-15 17:07:18 +00:00
Jens Arnold
21a0504d16 Hopefully fix wrong colours on coldfire targets for certain scaling factors. EMAC needs to be in unsigned integer mode.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19853 a1c6a512-1295-4272-9138-f99709370657
2009-01-25 15:59:43 +00:00
Andrew Mahone
9f08068ecf fix test for SH in resize.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19804 a1c6a512-1295-4272-9138-f99709370657
2009-01-20 18:23:50 +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
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
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
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