Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2022-02-09Cleanup: remove "The Original Code is: ..." from code commentsCampbell Barton
This is almost always meaningless as most code has changed since the comment was added. Besides this, version control can be used to check if/when a file was modified. Some cases of this were kept when they contain details about the original copyright holder.
2022-01-06Cleanup: spelling in commentsCampbell Barton
2021-12-09Cleanup: move public doc-strings into headers for 'blenlib'Campbell Barton
- Added space below non doc-string comments to make it clear these aren't comments for the symbols directly below them. - Use doxy sections for some headers. - Minor improvements to doc-strings. Ref T92709
2021-10-04Fix T91911: error in image dithering code after recent changesBrecht Van Lommel
Thanks to Patrik Olsson for spotting this.
2021-10-04Cleanup: use system includesCampbell Barton
2021-07-30Cleanup: clarify license and origin of voronoi and dithering codeBrecht Van Lommel
2021-07-20Cleanup: use single back-tick quoting in commentsCampbell Barton
While doxygen supports both, conform to our style guide. Note that single back-tick's are already used in a majority of comments.
2021-02-17BLI: add BLI_simd.h header to wrap SSE includesBrecht Van Lommel
In preparation of adding Neon support. Ref D8237, T78710
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
2021-01-20Cleanup: remove extra in trailing asteriskCampbell Barton
Comment blocks not conforming to convention.
2020-10-27Cleanup: use over-line for doxy commentsCampbell Barton
Follow our code style for doxygen sections.
2020-03-09Cleanup: Replace ABS/SQUARE/CUBE with function callsSergey Sharybin
While it might be handy to have type-less functionality which is similar to how C++ math is implemented it can not be easily achieved with just preprocessor in a way which does not have side-effects on wrong usage. There macros where often used on a non-trivial expression, and there was at least one usage where it was causing an actual side effect/bug on Windows (see change around square_f(sh[index++]) in studiolight.c). For such cases it is handy to have a function which is guaranteed to have zero side-effects. The motivation behind actually removing the macros is that there is already a way to do similar calculation. Also, not having such macros is a way to guarantee that its usage is not changed in a way which have side-effects and that it's not used as an inspiration for cases where it should not be used. Differential Revision: https://developer.blender.org/D7051
2020-03-03Cleanup: formatting, spellingCampbell Barton
2020-02-17ColorManagement: Dithering ImprovementClément Foucault
- Unlock property range. - Use triangular noise to keep perceptual noise error more uniform. Remap range to preserve perceptual intensity. - Center noise distribution around 0 for GPU implementation because of rounding. - Do dithering after merging overlays. Effect of using triangular noise is not really noticeable if you don't use really low bitdepth. But doing a test in the shader were we artificially reduce the bitdepth (`col = (col * 16) / 16;`) reveals the real difference. Reviewed By: brecht Differential Revision: https://developer.blender.org/D6850
2019-08-05Cleanup: use unsigned char for theme colorsCampbell Barton
Nearly all byte-color functions use 'uchar' causing casts when then colors were passed in. Declare as uchar to remove the need for casts.
2019-04-21Cleanup: comments (long lines) in blenlibCampbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-03-27Cleanup: style, use braces for blenlibCampbell Barton
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2018-05-07Cleanup: rename char/float conversion functionsCampbell Barton
- FTOCHAR -> unit_float_to_uchar_clamp - F3TOCHAR3 -> unit_float_to_uchar_clamp_v3 (swap args) - F4TOCHAR4 -> unit_float_to_uchar_clamp_v4 (swap args) - FTOUSHORT -> unit_float_to_ushort_clamp - USHORTTOUCHAR -> unit_ushort_to_uchar
2017-11-14BLI: sync changes from 2.8Campbell Barton
2016-10-25API: Fix LinksAaron Carlisle
Self-explanatory. to find broken links run `sphinx-build -b linkcheck sphinx-in sphinx-out` Reviewers: mont29 Tags: #bf_blender, #python, #infrastructure:_websites Differential Revision: https://developer.blender.org/D2297
2016-06-08Fix FPE exception happening when converting linear<->srgb using SIMDSergey Sharybin
2016-05-05Cleanup: styleCampbell Barton
2016-05-05Optimize linear<->sRGB conversion for SSE2 processorsSergey Sharybin
Using SSE2 intrinsics when available for this kind of conversions. It's not totally accurate, but accurate enough for the purposes where we're using direct colorspace conversion by-passing OCIO. Partially based on code from Cycles, partially based on other online articles: https://stackoverflow.com/questions/6475373/optimizations-for-pow-with-const-non-integer-exponent Makes projection painting on hi-res float textures smoother. This commit also enables global SSE2 in Blender. It shouldn't bring any regressions in supported hardware (we require SSE2 since 2.64 now), but should keep an eye on because compilers might have some bugs with that (unlikely, but possible).
2015-03-23Cleanup: comments, styleCampbell Barton
2015-03-23Use same rgb -> greyscale for BLI_math as imbufCampbell Barton
2015-03-19Revert part of recent color-management commitCampbell Barton
This adds back rgb_to_grayscale, not all color is managed or depends on the current loaded blend file's CM options. Noted in comments that this is only to be used outside the CM pipeline.
2015-03-17Part 2 of D1082 by Troy Sobotka, remove our functions that do lumaAntony Riakiotakis
calculations and use the OCIO one instead.
2015-01-29Gooseberry request: Dithering support for byte images when painting onAntony Riakiotakis
projection painting (2D will be separate commit).
2014-07-30Cleanup: general cleanup in BLI_math code (mostly, use 'const' where ↵Bastien Montagne
possible, true/false for booleans, format for float litterals).
2013-12-05Code Cleanup: use strict flags for math lib, add inline declarationsCampbell Barton
2013-06-26correct typos in comments.Campbell Barton
2013-04-28Fix #34233: bad alpha blending for 3D texture painting. Same changes as theBrecht Van Lommel
previous fix for 2D image painting were done, and also: * For brushes that do masking (keeping the max contribution to a pixel limited), the alpha from textures is now part of the mask. In many cases the logic worked out the same and where it didn't it used to cause artifacts. * Color interpolation for smear and soften tools now happens in premultipied space, to avoid bleeding of RGB colors from zero alpha areas. * Fix a few cases where byte <=> float conversion was not doing the proper straight <=> premul conversion. * Replace some float division by constants with multiplications, is faster. Note: float texture painting seems to have some issues updating the OpenGL texture, but issue was already there before this commit.
2013-02-18fix [#34279] Python console: Selected region is not highlighted when using ↵Campbell Barton
white background color
2013-01-15Follow general mathutils rules for naming straight<->premul functionsSergey Sharybin
2013-01-05There was a typo in previous commitSergey Sharybin
Additional changes: - Made mipmapping operate with unsigned short instead of char which allowed to eliminate extra division by 255, so prevision should be a bit better now. - Actually, this is not real unsigned short range, but it's a range of 255*255 which is more convenient for mipmapping, so made conversion functions private for scaling.c Not sure it worth making this functions operate in 65535 range, for now current behavior seems to be just fine.
2013-01-04Optimization for speed regression in mipmap generationSergey Sharybin
Regression was caused by alpha premul cleanup commit and the reason of slowdown was uchar <-> float conversion which is slow. Replaced with uchar <-> int conversion which seeps to be accurate enough and mostly eliminates slowdown. Slowdown was easy to notice when movie clip is used for 3d vierport background and undistortion is enabled. In this case every frame will re-calculate mipmaps. It's still a nit slower than mipmap generation before cleanup commit, but couldn't think about extra boost here atm.
2012-12-31Alpha premul pipeline cleanupSergey Sharybin
This assumptions are now made: - Internally float buffers are always linear alpha-premul colors - Readers should worry about delivering float buffers with that assumptions. - There's an input image setting to say whether it's stored with straight/premul alpha on the disk. - Byte buffers are now assumed have straight alpha, readers should deliver straight alpha. Some implementation details: - Removed scene's color unpremultiply setting, which was very much confusing and was wrong for default settings. Now all renderers assumes to deliver premultiplied alpha. - IMB_buffer_byte_from_float will now linearize alpha when converting from buffer. - Sequencer's effects were changed to assume bytes have got straight alpha. Most of effects will work with bytes still, however for glow it was more tricky to avoid data loss, so there's a commented out glow implementation which converts byte buffer to floats first, operates on floats and returns bytes back. It's slower and not sure if it should actually be used -- who're using glow on alpha anyway? - Sequencer modifiers should also be working nice with straight bytes now. - GLSL preview will predivide float textures to make nice shading, shading with byte textures worked nice (GLSL was assuming straight alpha). - Blender Internal will set alpha=1 to the whole sky. The same happens in Cycles and there's no way to avoid this -- sky is neither straight nor premul and doesn't fit color pipeline well. - Straight alpha mode for render result was also eliminated. - Conversion to correct alpha need to be done before linearizing float buffer. - TIFF will now load and save files with proper alpha mode setting in file meta data header. - Remove Use Alpha from texture mapping and replaced with image datablock setting. Behaves much more predictable and clear from code point of view and solves possible regressions when non-premultiplied images were used as textures with ignoring alpha channel.
2012-11-08code cleanup:Campbell Barton
linearrgb_to_srgb_ushort4_predivide() was calling `linearrgb_to_srgb(t) * alpha` twice in the FTOUSHORT macro, which gcc didn't optimize out.
2012-09-19fix MESH_OT_tris_convert_to_quads() limit options (uv and vertex color) were ↵Campbell Barton
not working at all.
2012-07-08correct another case of nonnull (all should be correct now), and comment ↵Campbell Barton
about color conversion.
2012-07-03More spell and typo fixes (mostly visualise->visualize, grey->gray, ↵Bastien Montagne
normalise->normalize).
2012-06-25comment for TODO - rgb_to_bw / rgb_to_grayscale usage.Campbell Barton
2012-06-23rename WITH_BUILTIN_GLEW, WITH_SYSTEM_GLEW & negate.Campbell Barton
2012-06-22use an inline function for rgb -> bw conversion.Campbell Barton
2012-06-13move one line color conversion functions to be inline.Campbell Barton