Commit Graph

  • 7a8c9196d1 unroll vertical_upsample inner loop, and reverse loop nesting to minimize work Sean Barrett 2014-09-13 07:41:39 -07:00
  • 9c2ae9bdb8 cache filter-width derived computations that use floor/ceil because those were showing up like crazy on VC6 profile despite only being per-scanline-ish?!? unroll inner loop in horizontal_resample Sean Barrett 2014-09-13 07:29:04 -07:00
  • 972456cb63 explicit performance tests variants Sean Barrett 2014-09-13 06:53:53 -07:00
  • c9600c012f unroll channel loops in downsampler Sean Barrett 2014-09-13 06:23:07 -07:00
  • 3ee97c221f compile as C Sean Barrett 2014-09-13 06:12:40 -07:00
  • 59898db411 tweak grammar Sean Barrett 2014-09-13 06:05:00 -07:00
  • a2f1cadde8 convert tabs to spaces so it's consistent with other stb libs Sean Barrett 2014-09-13 06:03:48 -07:00
  • 60064f9803 add stb_image_resize.h to readme Sean Barrett 2014-09-13 05:56:06 -07:00
  • 0fa5b5c66f rename cubic to cubicbspline; tweak filter type documentation Sean Barrett 2014-09-13 05:52:19 -07:00
  • 316beb987d Merge branch 'master' of https://github.com/kennethdmiller3/stb Ken Miller 2014-09-13 00:38:04 -05:00
  • 29b36b3dea rename filters, document them Sean Barrett 2014-09-12 05:28:24 -07:00
  • da2aa8f6b7 checkboard test to verify srgb Sean Barrett 2014-09-12 05:04:38 -07:00
  • a9778b8dbd tweak docs; fix compile error in UNUSED_PARAM stuff Sean Barrett 2014-09-12 04:46:41 -07:00
  • 99f3b78bbd Merge branch 'resample' of http://github.com/bsvino/stb into resample Sean Barrett 2014-09-12 03:54:17 -07:00
  • df128b7995 update STBIR__UNUSED_PARAM to match stb_image.h version Sean Barrett 2014-09-12 03:53:36 -07:00
  • ca88b6fba6 Calculate and store vertical contributors first so that they can be normalized and optimized. Jorge Rodriguez 2014-09-11 12:45:18 -07:00
  • a25c1d2bbd Merge remote-tracking branch 'remotes/nothings/resample' into resample Jorge Rodriguez 2014-09-11 10:00:57 -07:00
  • 36b417f6b4 Optimizations: Skip zero-coefficient contributions. Reduce the size of the coefficients array when downsampling. Jorge Rodriguez 2014-09-11 09:39:03 -07:00
  • 27f26f8337 Documentation; rename STBIR_FLAG_PREMULTIPLED_ALPHA to STBIR_FLAG_ALPHA_PREMULTIPLIED so that both flags have "ALPHA" first Sean Barrett 2014-09-11 03:02:20 -07:00
  • 7a4f1f4665 update with new tests for srgb conversion Sean Barrett 2014-09-11 02:10:37 -07:00
  • 16d68d14f8 fix stbir__linear_to_srgb_uchar: 1. table stored threshhold of transition from i to i+1, but wants to be i-1 to i 2. table was computed by dividing uchar by 256.0 instead of 255.0, causing it to be 100% wrong Sean Barrett 2014-09-11 02:05:53 -07:00
  • 30c7a981ec compile as C; fix some unsigned/signed comparisons; avoid round() since it's not in pre-C99 C; remove MAX_CHANNELS since I never ended up needing it; rename STBIR_EPSILON to STBIR_ALPHA_EPSILON; don't use STBIR_ALPHA_EPSILON on float input (can't remove it properly due to numeric precision, and they can do it themselves); optimize subtraction of STBIR_ALPHA_EPSILON; sorry i forgot to commit these separately!; Sean Barrett 2014-09-11 01:47:50 -07:00
  • 1208730e1e Merge branch 'resample' of http://github.com/bsvino/stb into resample Sean Barrett 2014-09-11 01:15:09 -07:00
  • 793818d1af Skip zero-coefficient contributors, a fairly decent speedup. Jorge Rodriguez 2014-09-10 20:26:14 -07:00
  • 46dc8f84fb Use vertical pixel width for the ring buffer. Jorge Rodriguez 2014-09-10 20:12:38 -07:00
  • 953a637841 Use a carefully shaped trapezoid instead of a box filter to avoid jumps between pixel values. Jorge Rodriguez 2014-09-10 19:08:11 -07:00
  • 671f04bd7e debugging truetype crash Sean Barrett 2014-09-10 15:35:06 -07:00
  • 4e580cf9ed fix compile Sean Barrett 2014-09-10 15:11:35 -07:00
  • 6922628106 Use an even smaller epsilon. Allow the user to avoid the epsilon business if they want to preserve their alpha values. Jorge Rodriguez 2014-09-10 15:03:55 -07:00
  • 057f29f813 update version number nothings 2014-09-10 11:03:49 -07:00
  • 87b7e3db41 update version number nothings 2014-09-10 11:03:26 -07:00
  • 5db8a8bc36 Merge pull request #42 from rygorous/master nothings 2014-09-10 11:02:04 -07:00
  • 40cc1c59b2 Add support for alternative keyboard shortcuts for text/line start/end. Fabian Giesen 2014-09-10 10:54:22 -07:00
  • c9d67446d2 Reverse allocation routines parameter order so that the context is at the back. Jorge Rodriguez 2014-09-09 22:57:15 -07:00
  • 17b931047c Add the epsilon value into the alpha instead of using an if statement. It's a tiny bit faster and it can be removed afterwards. Jorge Rodriguez 2014-09-09 22:47:53 -07:00
  • 1d5c902e2e These minor optimizations were probably already done by the compiler but they can't hurt. Jorge Rodriguez 2014-09-09 22:07:40 -07:00
  • 41e6aad693 Avoid repeated adds and ensure correct round-trip result. Jorge Rodriguez 2014-09-09 21:57:46 -07:00
  • f2102d906f Use the info structure to keep track of our memory block sizes to reduce duplicated code and cut down on errors. Jorge Rodriguez 2014-09-09 20:58:19 -07:00
  • 969ff7c850 Make sure calculate_memory matches with the allocations. Fix some errant asserts. Jorge Rodriguez 2014-09-09 20:51:29 -07:00
  • 8355ea1184 Use height, not width, for correct progress report. Jorge Rodriguez 2014-09-09 18:41:28 -07:00
  • 4b69c0637e If alpha is zero then sneakily replace it with a very small nonzero so that the color data is preserved. Jorge Rodriguez 2014-09-09 17:03:20 -07:00
  • d510d70b6a Report downsample progress by when we empty the ring buffer, it's more accurate that way. Jorge Rodriguez 2014-09-09 16:35:00 -07:00
  • 084baed15c Replace premul test with better premul test that doesn't require visual inspection. Jorge Rodriguez 2014-09-09 16:30:06 -07:00
  • 497eab8339 Normalize downsample coefficients. Jorge Rodriguez 2014-09-09 15:22:29 -07:00
  • 43fbc1d5e3 Rearrange the algebra on two of the filters to avoid repeating decimals which cause precision loss. Use int32 to test filters because it's more accurate. Jorge Rodriguez 2014-09-09 14:10:14 -07:00
  • ca241daefa Use rounding to try to preserve the original value. Fix test case. Jorge Rodriguez 2014-09-09 12:16:23 -07:00
  • 145690788c Use input_h + pixel_margin * 2 to prevent progress report from ever going above 1. Always report a 0 before and a 1 at the end of each resize. Jorge Rodriguez 2014-09-09 10:58:01 -07:00
  • fb8eabd6b8 Add .hdr file writing support baldurk 2014-09-09 08:33:25 +01:00
  • 118f28557e Tests to ensure images of a solid color stay the same solid color after resampling. Jorge Rodriguez 2014-09-07 16:47:02 -07:00
  • e6c47ec657 Fix kernel lookup for downsampling. Jorge Rodriguez 2014-09-07 11:56:11 -07:00
  • 8cc6a3abfc If there's no context we're using the simple API functions - fall back to malloc and free. Jorge Rodriguez 2014-09-07 10:02:51 -07:00
  • 36db03f390 tighten bounds on filter normalization test Sean Barrett 2014-09-07 05:31:40 -07:00
  • 7f8ac35e42 check whether filter kernels are normalized Sean Barrett 2014-09-07 05:29:43 -07:00
  • 7da729bfce restore correct definition of box Sean Barrett 2014-09-07 04:07:07 -07:00
  • 08ca345839 Merge branch 'resample2' into resample Sean Barrett 2014-09-07 03:36:16 -07:00
  • cd1fbacbb6 rename NEAREST to BOX write test for BOX Sean Barrett 2014-09-07 03:19:18 -07:00
  • 8e91cb2b7d treat vertical tab and form feed characters as whitespace Ken Miller 2014-09-07 00:48:48 -05:00
  • e003c66498 support PGM and PPM formats Ken Miller 2014-09-07 00:38:18 -05:00
  • 586e84087c Correctly specify alpha channels. Jorge Rodriguez 2014-09-06 21:50:28 -07:00
  • 38ce5494bc Clarify some comments. Make stbir__resize_arbitrary an internal function. Update test cases to use actual API functions. Jorge Rodriguez 2014-09-06 20:17:19 -07:00
  • 41555b5d53 update test cases to work on things other than barbara.png Sean Barrett 2014-09-06 14:58:32 -07:00
  • fb059fcece Progress report. Jorge Rodriguez 2014-09-06 10:57:21 -07:00
  • 75bdd2da83 Fix malloc context and whitespace. Jorge Rodriguez 2014-09-06 08:48:46 -07:00
  • ce7aed0fb7 Merge pull request #3 from nothings/resample Jorge Rodriguez 2014-09-05 16:52:49 -07:00
  • 2572f3177a Merge pull request #38 from lgvz/comments nothings 2014-09-05 09:14:53 -07:00
  • a5f1cb5657 Fix comments Tero Hänninen 2014-09-05 18:38:39 +03:00
  • 952c26e626 inline stbir__encode_pixel into stbir__encode_scanline Sean Barrett 2014-09-01 19:29:28 -07:00
  • aee30095c7 refactor internal interfaces to avoid passing things multiple times; finish prepping 'stbir__info' even before calculate_memory; get rid of 'noinfo' functions since now calculate_memory doesn't need 'em; add new binary-searched sRGB function (untested) Sean Barrett 2014-09-01 16:52:04 -07:00
  • 24c540e1b0 rename alpha gamma flag Sean Barrett 2014-08-31 10:00:54 -07:00
  • 07c35180f7 tweak new API Sean Barrett 2014-08-31 09:45:29 -07:00
  • 84520de6c4 finish STBI_EDGE_ZERO, untested Sean Barrett 2014-08-31 09:32:17 -07:00
  • 9a1d34843e STBIR_EDGE_ZERO Sean Barrett 2014-08-31 09:10:49 -07:00
  • 732fec68ee tweak new API, get it partly working Sean Barrett 2014-08-31 08:55:41 -07:00
  • 664d8961f5 new API partially in-use Sean Barrett 2014-08-31 08:34:05 -07:00
  • bbd4e2ee9a new API "finished" but untested Sean Barrett 2014-08-31 07:32:10 -07:00
  • 2549d8156e in-progress refactoring Sean Barrett 2014-08-31 07:23:34 -07:00
  • 034674c142 Merge branch 'resample2' into resample Sean Barrett 2014-08-31 07:23:22 -07:00
  • 1bd9770e75 separate filter for horizontal and vertical Sean Barrett 2014-08-31 06:47:45 -07:00
  • c1b876768e in progress new API Sean Barrett 2014-08-31 06:31:50 -07:00
  • 067a1d1be1 update readme version #s Sean Barrett 2014-08-27 22:01:50 -07:00
  • b8e0530fdf update contributor list & version number Sean Barrett 2014-08-27 22:01:37 -07:00
  • 33d621ca48 tweaks to const-correct API change Sean Barrett 2014-08-27 22:00:07 -07:00
  • 93c02695e3 Const in decode/open memory. Alejandro Pereda 2014-08-28 06:53:13 +08:00
  • 6bb8eb3695 update version number Sean Barrett 2014-08-26 13:41:04 -07:00
  • 578b4e18b4 Merge branch 'master' of https://github.com/nothings/stb Sean Barrett 2014-08-26 13:40:54 -07:00
  • a14339a019 fix handling of tRNS chunk in PNG (used wrong variable for output channels) Sean Barrett 2014-08-26 13:39:53 -07:00
  • b75eff36f8 Merge pull request #1 from nothings/resample Jorge Rodriguez 2014-08-18 11:29:19 -07:00
  • 5dfa79fb31 stride doesn't have to be multiples of pixels Sean Barrett 2014-08-18 10:18:59 -07:00
  • 32b626859d remove most per-pixel switches, beginnings of removing encode_pixel switch Sean Barrett 2014-08-18 10:02:00 -07:00
  • 5eb0236d9d reverse default behavior of linear/gamma for alpha Sean Barrett 2014-08-18 09:33:01 -07:00
  • b9bb05b81c minor cleanups Sean Barrett 2014-08-18 09:14:11 -07:00
  • 6ef563d089 rename to stb_image_resize.h Sean Barrett 2014-08-18 09:12:59 -07:00
  • eb0781fda0 add comments describing the purpose of the s,t-rectangle tests Sean Barrett 2014-08-18 09:01:33 -07:00
  • 9ba3dc1fc5 make resample tests work in VC6 Sean Barrett 2014-08-18 08:56:44 -07:00
  • 9b6c354fe6 Update stb_howto.txt nothings 2014-08-17 21:16:18 -07:00
  • 492e3f3463 update version numbers Sean Barrett 2014-08-17 21:12:16 -07:00
  • 14e8b66119 fix broken map generation Sean Barrett 2014-08-17 21:08:43 -07:00
  • 45469cfa27 fix warnings Sean Barrett 2014-08-17 16:47:55 -07:00
  • 7e079c670d tweak TGA monochrome support Sean Barrett 2014-08-16 13:52:47 -07:00
  • caf6d08f2b Merge branch 'master' of https://github.com/Skylark13/stb into working Sean Barrett 2014-08-16 13:50:16 -07:00