summaryrefslogtreecommitdiff
path: root/draw/draw_simple_scale.c
AgeCommit message (Collapse)Author
2012-05-08Fix bug in ARM code in draw_simple_scaleRobin Watts
The scale_row_from_temp code was broken. Firstly the rounding was wrong in the 'bulk' case (not a big deal), but more importantly on configurations where unaligned loads were not allowed (such as the nook), we could still crash due to an incorrect test to avoid that code. Thanks to Kammerer for the report, and testing of fixed version.
2012-03-06Split fitz.h/mupdf.h into internal/external headers.Robin Watts
Attempt to separate public API from internal functions.
2012-01-26Fix possible SEGV/assert in downscaler.Robin Watts
On extreme downscales, the weights for each pixel can all round to zero; this results in no weights being stored at all, and causes either an exception or a SEGV. The simple fix is to ensure that the first pixel that's actually in range (and there will always be one) always has a weight of at least 1. Thanks to malc for finding the test cases that lead to this bugfix.
2012-01-23Update ARM optimised scaling code in line with recent changes.Robin Watts
The ARM optimised code relied on the size of the weights structure which was changed by the addition of a new member as part of the patch scaling changes. Fix the code here, and add a note to the structure in the hopes that this will avoid such breakages happening in future.
2012-01-21Update image scaling subpixel offset calculations for top-down images.Tor Andersson
2012-01-21Clean up some stray mixed tabs and spaces.Tor Andersson
2012-01-20Bitmap 'patch' scaling - second attempt.Robin Watts
When scaling a bitmap, currently we always scale the entire bitmap, even if we only need a small section of the result. This patch changes the code to take an optional 'clip' bbox, and only scales as many pixels as are required to generate the required output region.
2012-01-20Revert "Bitmap 'patch' scaling."Tor Andersson
This reverts commit 08e84b18e5c1dbe8f3d32dd0aeb4b4c43debce9f.
2012-01-19Bitmap 'patch' scaling.Robin Watts
When scaling a bitmap, currently we always scale the entire bitmap, even if we only need a small section of the result. This patch changes the code to take an optional 'clip' bbox, and only scales as much of the input as as required for this output region.
2012-01-10Fix many spelling errors.Sebastian Rasmussen
2011-12-19More Memory squeezing fixesRobin Watts
2011-12-08Stylistic changes when testing pointer values for NULL.Tor Andersson
Also: use 'cannot' instead of 'failed to' in error messages.
2011-11-15Merge branch 'master' into contextRobin Watts
Mostly redoing the xps_context to xps_document change and adding contexts to newly written code. Conflicts: apps/pdfapp.c apps/pdfapp.h apps/x11_main.c apps/xpsdraw.c draw/draw_device.c draw/draw_scale.c fitz/base_object.c fitz/fitz.h pdf/mupdf.h pdf/pdf_interpret.c pdf/pdf_outline.c pdf/pdf_page.c xps/muxps.h xps/xps_doc.c xps/xps_xml.c
2011-11-14Grid fitting tweaks.Robin Watts
Extract the grid fitting code from the scaling code and the affine image drawing code into it's own separate function. This reduces code duplication. It also allows us to make better allowance for rounding errors. Add a voodoo offset in the draw_affine.c code for painting interpolated images. This gives us the best possible match between all the different combinations of scaled/unscaled and interpolated/uninterpolated images.
2011-11-14Add 'simple scale' variant of scaling routines.Robin Watts
draw_simple_scale.c is a cut down version of draw_scale.c, that only uses filter functions that return values strictly in the 0 to 1 range. Because of that, we can use bytes rather than ints as intermediate storage, and have no clipping to do.