Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category LCD
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes 1
  • Private
Attached to Project: Rockbox
Opened by jott - 2007-12-12
Last edited by nicolas_p - 2008-04-06

FS#8308 - Port of a imlib2 based smooth scaling algorithm for bitmaps.

This patch will add support for smooth scaling of bitmaps based on a imlib2
algorithm. The main code is placed under bmp_smooth_scale.c and made visible
via bmp.h.

It is a drop-in replacement for the just introduced “simple_resize_bitmap”:

int smooth_resize_bitmap(struct bitmap *src, struct bitmap *dst);

The algorithm performs a bilinear scaling with different code-pathes, depending
on scaling directions (up or down) as well as scaling down only horizontally or
vertically. Currently the maximum source size is LCD_WIDTHxLCD_HEIGHT, due to
static allocation of some lookup tables.

The patch also renames the plugin based test case from resize_test.c to
test_resize.c, to make it consistent with the other tests and adds it to the
apps CATEGORIES (you still have to add it to SOURCES). The test expects a
bitmap “/test.bmp” for now (which can be up to 200x200px).

Closed by  nicolas_p
2008-04-06 22:31
Reason for closing:  Accepted

Is this meant be an alternative to the bmp_resize patch? Also, what’s do you mean with the “just introduced simple_resize_bitmap”?

jott commented on 2007-12-12 14:11

This scaling algorithm can be used on runtime, not on load-time of a
bmp file, so it can be used dynamically (e.g. image viewer).
It also gives a much higher quality due to the bilinear interpolation.
But it is clearly related to the bmp_resize patch and open for further
discussion.
As for “just introduced simple_resize_bitmap” see r15913, the nearest
neighbour algorithm is in SVN now.

jac0b commented on 2007-12-13 13:23

If we want to use this patch do we need to also apply the bmp-resize patch and then this patch or just use this patch instead of the bmp-resize patch?

jac0b: It’s a bit more complicated than that. This patch isn’t designed the same way as  FS#5697 . Making use of the functionality provided by this patch requires code changes, not just applying patches.

jott commented on 2007-12-13 17:46

I updated the patch. Now the algorithm does not need look-up tables anymore
and hence there is no need for static allocations.

jac0b commented on 2008-01-14 17:32

How do you change the picture height and width?

Sync. I also included a change to the slide puzzle plugin to make it use the smooth resize. Apply with -p1.

I’m easily confused, so bear with me. Is this latest “smooth_resize.patch” posted by nicolas_p a new version of the original patch on this tracker page (port of a imlib2-based…)? Or is it instead of the smooth resize patch in  FS#5697 ?

The patch I posted here is an updated version of the original one from this task.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing