- made EXPANDED_AGRP take bAnimContext as an argument.
- remove unneeded NULL check drawFacesColored functions.
- comment some vars which are set but not used.
really old one!, since initial commit blender would crash scaling down large sizes eg: 60962 -> 128 (width or height).
the problem is scaledownx/y doesn't check buffer endpoints, with really large images theres a loop on a float value which can fail with large image sizes.
previous commit added asserts if the buffer runs over (assuming it doesnt crash),
This commit changes an epsilon value, tested this with random small images as well as images over 200,000 px, and it works fine, this is still flakey though and for really really big images it probably still fails.
Old bug report:
Image Editor, Painting: crash when texture was visible in
Material or Texture preview. Was caused by paint code
freeing mipmaps. Now replaced with a mipmap tag (to be done
again), and a new mipmap function that doesn't re-allocate.
- removed deprecated bitmap arg from IMB_allocImBuf (plugins will need updating).
- mostly tagged UNUSED() since some of these functions look like they may need to have the arguments used later.
tile cache code in imbuf, but it is not hooked up to the render engine.
Imbuf module: some small refactoring and removing a lot of unused or old code
(about 6.5k lines).
* Added a ImFileType struct with callbacks to make adding an file format type,
or making changes to the API easier.
* Move imbuf init/exit code into IMB_init()/IMB_exit() functions.
* Increased mipmap levels from 10 to 20, you run into this limit already with
a 2k image.
* Removed hamx, amiga, anim5 format support.
* Removed colormap saving, only simple colormap code now for reading tga.
* Removed gen_dynlibtiff.py, editing this is almost as much work as just
editing the code directly.
* Functions removed that were only used for sequencer plugin API:
IMB_anim_nextpic, IMB_clever_double, IMB_antialias, IMB_gamwarp,
IMB_scalefieldImBuf, IMB_scalefastfieldImBuf, IMB_onethird, IMB_halflace,
IMB_dit0, IMB_dit2, IMB_cspace
* Write metadata info into OpenEXR images. Can be viewed with the command
line utility 'exrheader'
For the image tile cache code, see this page:
http://wiki.blender.org/index.php/Dev:2.5/Source/Imaging/ImageTileCache
New imbuf scaling code, advertised as "quick and quality" gave
inacceptable noise and rounding errors.
Check this bugreport for images that show it well:
http://projects.blender.org/tracker/?func=detail&atid=125&aid=18609&group_id=9
For release, better disable this code and fall back on perfectly
working old code. :)
This fixes a commit from Peter, revision 12931, Dec 17 2007
He added quick image scaling code, derived from ppmqscale,
http://libdv.sf.net
This implementation gave ugly banding. especially visible on
dark colors or byte images with very close colors.
Solution is to add correct rounding, seems to me normal for such
fixed point magic. Optimizing code and keeping quality is tricky
dudes! Results for scaling down in sequencer were bad for over a
year (2.47 and 2.48 both wrong).
Mipmap creation for render crashed, in this case:
- use Curves tool on an Image, which is UV mapped on object
- Save the image to disk, under new name
- Render (F12)
This fix is only for the crash, there's something not well coded
for Curves tool, how it manages float buffers. That's for 2.5.
Added a faster linear interpolation scaler to IMB_scaleImBuf.
Only handles common cases when we either
enlarge both, width and height or
shrink both, width and height
but that is pretty fast:
* does only blit once instead of two passes like the old code
(fewer cache misses)
* uses fixed point integer arithmetic for byte buffers
* doesn't branch in tight loops
Should be comparable in speed to the ImBuf ..._fast functions at least
for byte-buffers.
For the rather seldom situations that e.g. width is enlarged and height
is shrunken, the old code is still in use.
-------
Also small fix in sequencer: free float buffers on read now.
Added: Scale node in Compositor.
- Only works for RGBA buffers now
- I have added an option "Relative" or "Absolute" scale. So you can also
define actual pixels for scale. Values for scale are reset when you
switch, to prevent too weird situations.
- Scaling wasn't foreseen to work with the preview-panel in UV window, this
preview cropping only happens for Image and RenderResult nodes... actually
should be done for the scale too. I wait with t hat though... this preview
method isn't very advanced yet.
- The pass_on_compbuf() here crashed in tests with preview panel, that's
weak code... I have to recode that. For time being I use the
dupalloc_compbuf to have it stable.
Fixed the blur-plugin (and maybe a lot more) crashes by expecting
future float-buffer aware sequencer-plugins to have a bumped PLUGIN_VERSION
number. Since quality and speed is degraded by converting the float
buffer first to byte, performing the effect on bytes and then converting
back again an additional warning is displayed in the effect strip,
suggesting to update the used sequencer-plugins.
Fixed some more crashes along the way.
Float buffer aware sequencer plugins should
- first check, if the output-ibuf has a rect_float
=> perform all operations with floats (input and output)
- if not: perform everything on bytes (intput and output)