[Bf-codereview] New dilation code for bake filtering (issue4822045)
ideasman42 at gmail.com
ideasman42 at gmail.com
Sun Jul 24 11:46:09 CEST 2011
Aside from the minor concerns this patch looks good to commnit, tested
with alpha, with/without clear option enabled, and making sure overlaps
are handled properly.
http://codereview.appspot.com/4822045/diff/3002/source/blender/imbuf/intern/filter.c
File source/blender/imbuf/intern/filter.c (right):
http://codereview.appspot.com/4822045/diff/3002/source/blender/imbuf/intern/filter.c#newcode370
source/blender/imbuf/intern/filter.c:370: float weight[100];
This seems arbitrarily large, 25 is enough?
http://codereview.appspot.com/4822045/diff/3002/source/blender/imbuf/intern/filter.c#newcode381
source/blender/imbuf/intern/filter.c:381: const int is_float =
ibuf->rect_float!=NULL ? 1 : 0;
minor -
can just read:
const int is_float = ibuf->rect_float!=NULL;
and can be at the start of the function.
http://codereview.appspot.com/4822045/diff/3002/source/blender/imbuf/intern/filter.c#newcode435
source/blender/imbuf/intern/filter.c:435: ((unsigned char *)
dstbuf)[depth*index+c]= FTOCHAR(acc[c]/255.0f);
Seems unnecessary to /255, then *255 to convert to a char again.
http://codereview.appspot.com/4822045/
More information about the Bf-codereview
mailing list