Commit Graph

39 Commits

Author SHA1 Message Date
3316853323 Cleanup: conform headers to have license first
Also remove doxy comments for licenses and add missing GPL header.
2019-02-18 08:22:11 +11:00
65ec7ec524 Cleanup: remove redundant, invalid info from headers
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.
2019-02-02 01:36:28 +11:00
d7f55c4ff5 Cleanup: comment block tabs 2018-11-14 17:10:56 +11:00
b372766816 Cleanup: trailing newlines 2018-06-29 09:23:51 +02:00
a262ea8c47 Cleanup: trailing space for compositor 2018-06-17 17:05:29 +02:00
75fc1c3507 Cleanup: trailing whitespace (comment blocks)
Strip unindented comment blocks - mainly headers to avoid conflicts.
2018-06-01 18:19:39 +02:00
b098609186 Fix various compiler warnings. 2015-10-10 17:35:30 +02:00
2ada3512a2 Compositor: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
35d3b6316b D627: Memory usage optimization for the compositor.
The compostor used a fixed size of 4 floats to hold pixel data. this
patch will select size of a pixel based on its type.
It uses 1 float for Value, 3 float for vector and 4 floats for color
data types.

When benchmarking on shots (opening shot of caminandes) we get a
reduction of memory of 30% and a tiny speedup as less data
transformations needs to take place (but these are negligable.

More information of the patch can be found on
https://developer.blender.org/D627 and
http://wiki.blender.org/index.php/Dev:Ref/Proposals/Compositor2014_p1.1_TD

Developers: jbakker & mdewanchand
Thanks for Sergey for his indept review.
2015-01-19 18:17:50 +01:00
27630f41a7 Fix T40459: Gauss table can be NULL when ending the blur node operation,
which must not be passed to MEM_freeN.
2014-06-01 16:35:26 +02:00
09874df135 Structural cleanup and improvements for the compositor.
Many parts of the compositor are unnecessarily complicated. This patch
aims at reducing the complexity of writing nodes and making the code
more transparent.

== Separating Nodes and Operations ==

Currently these are both mixed in the same graph, even though they have
very different purposes and are used at distinct stages in the
compositing process. The patch introduces dedicated graph classes for
nodes and for operations.

This removes the need for a lot of special case checks (isOperation etc.)
and explicit type casts. It simplifies the code since it becomes clear
at every stage what type of node we are dealing with. The compiler can
use static typing to avoid common bugs from mixing up these types and
fewer runtime sanity checks are needed.

== Simplified Node Conversion ==

Converting nodes to operations was previously based on "relinking", i.e.
nodes would start with by mirroring links in the Blender DNA node trees,
then add operations and redirect these links to them. This was very hard
to follow in many cases and required a lot of attention to avoid invalid
states.

Now there is a helper class called the NodeConverter, which is passed to
nodes and implements a much simpler API for this process. Nodes can add
operations and explicit connections as before, but defining "external"
links to the inputs/outputs of the original node now uses mapping
instead of directly modifying link data. Input data (node graph) and
result (operations graph) are cleanly separated.

== Removed Redundant Data Structures ==

A few redundant data structures have been removed, notably the
SocketConnection. These are only needed temporarily during graph
construction. For executing the compositor operations it is perfectly
sufficient to store only the direct input link pointers. A common
pointer indirection is avoided this way (which might also give a little
performance improvement).

== Avoid virtual recursive functions ==

Recursive virtual functions are evil. They are very hard to follow
during debugging. At least in the parts this patch is concerned with
these functions have been replaced by a non-virtual recursive core
function (which might then call virtual non-recursive functions if
needed). See for example NodeOperationBuilder::group_operations.
2014-04-15 16:28:10 +02:00
c9233bfd82 Code cleanup: style 2014-02-19 08:02:59 +11:00
51efa8a1f5 Fix T38529, Blur node size 0 doesn't work.
The blur operations were clamping the filter size to 1, which prevents
no-op blur nodes. Further any value < 1 would also be ignored and in
many combinations the filter scale setting ("Size") would only work in
integer steps.

Now most blur settings will work with smooth Size value scaling as well,
meaning you can choose a reasonably large filter size (e.g. 10) and then
use the Size factor to scale the actual blur radius smoothly.

Note that non-integer filter sizes also depend on the filter type
selected in the Blur node, e.g. "Flat" filtering will still ignore
smooth filter sizes. Gaussian filters work best for this purpose.
2014-02-13 11:52:22 +01:00
c1c26c36f6 Style Cleanup: remove preprocessor indentation (updated wiki style guide too) 2013-12-22 14:12:19 +11:00
Lukas Toenne
447de0a6c4 Fix #34694. This was actually a bug in the compositor's Bokeh Blur operation. It was writing outside of allocated memory in case of (0, 0) size buffers, with the usual unpredictable results. 2013-03-20 15:54:16 +00:00
f213ae0b19 style cleanup 2012-11-01 09:54:00 +00:00
fec81d9b56 use min_ max_ functions in more places.
also fix minor error in MOD decimate when the modifier did nothing the reported face count would be wrong.
2012-10-23 16:21:55 +00:00
3bc16fd60d compositor: replace C++ new/delete with guardedalloc. 2012-08-16 12:32:48 +00:00
94a3945cf9 code cleanup: compositor - define size for executePixel function output float array 2012-08-10 14:07:24 +00:00
9ff4fa6671 style cleanup 2012-08-04 12:30:16 +00:00
854e122e5d style cleanup: compositor 2012-08-03 10:19:13 +00:00
a56f4fee38 Fix for
* [#32040] size-input of a blur-node is uniform for the whole picture
 * [#32062] Blur node Size input is not working with 
 * [#32140] Blur Node using a greyscale input as size multiplier fails
to work

Node now has a new option (new compositor cannot detect if the connected
part is a single value, or an image connected).

With this option the use of a reference image to multiply the size of
the blur per pixel can be enabled/disabled.

Regards, 
Jeroen
 - At Mind -
2012-07-19 11:05:18 +00:00
6eacb5791d Inner loop optimization of blur node 2012-07-13 12:50:10 +00:00
9987a8fca7 Removed parameter from executePixel and initializeTileData. 2012-07-13 12:24:42 +00:00
8b8bc164da Small optimizations in compositor.
Most of them are not noticeable.
2012-07-12 19:19:03 +00:00
6a1d82490e use m_ prefix for compositor class members (all compositor operations). 2012-06-26 01:22:05 +00:00
fa0c5a100d fix for crash with blur - happened most when there was a size input, need to mutex lock before allocating the gauss array.
also add suspiciously missing call to BlurBaseOperation::initExecution, X had but Y was missing.
2012-06-25 18:01:01 +00:00
4dacad06a9 code cleanup: spelling 'multiplyer' --> 'multiplier' 2012-06-16 15:32:18 +00:00
265262a5d5 feather option for dilate/erode node - needed for alpha masks so we can (blur in/out), currently only positive values supported. 2012-06-16 13:46:20 +00:00
e11692bc73 fix for other uninitialized values for the split viewer node as well as incorrect frees for gaussian blue nodes. 2012-06-15 13:56:54 +00:00
ec755bdfa7 style cleanup: composite/blur 2012-06-15 09:58:52 +00:00
e1241030db yse BLI_math for the compositor in more places. 2012-06-12 20:04:55 +00:00
8a5252c1cb * Blur node had some irregularities at the edge of the screen
only visible when doing large size blurs.
 also solved the catcom/mitch filter that didn't work at low/medium quality

 PS never use BokehBlur Gausian filter as it is 99%+ identicat as non bokeh <= top for sergey- :)
2012-06-11 08:28:04 +00:00
8e7d7d5ea5 code cleanup: reduce float/double promotion 2012-06-09 19:57:14 +00:00
0f2b4d4dff Fix for relative blur size for non-fast gaussian blur methods.
Call base blur's initExecution from GaussianBokehBlurOperation and GaussianXBlurOperation
2012-06-04 10:51:00 +00:00
5fbeda7efd Optimize Gaussian blurs 2012-06-01 11:50:32 +00:00
7862b2fa13 style cleanup: compositor, pointer syntax, function brace placement, line length 2012-05-17 22:55:28 +00:00
979f6bab9c style cleanup: braces, compositor 2012-05-17 13:44:15 +00:00
044e818cf8 ____
`````|````` | |        |                        ..'''' 
     |      | |        |______               .''       
     |      | |        |                  ..'          
     |      | |_______ |___________ ....''             
               merge to TRUNK!

 * The old compositor is still available (Debug Menu: 200)

This commit was brought to you by:

Developers:
 * Monique Dewanchand
 * Jeroen Bakker
 * Dalai Felinto
 * Lukas Tönne

Review:
 * Brecht van Lommel

Testers:
 * Nate Wiebe
 * Wolfgang Faehnle
 * Carlo Andreacchio
 * Daniel Salazar
 * Artur Mag
 * Christian Krupa
 * Francesco Siddi
 * Dan McGrath
 * Bassam Kurdali

But mostly by the community:
Gold:

    Joshua Faulkner
    Michael Tiemann
    Francesco Paglia
    Blender Guru
    Blender Developers Fund

Silver:

    Pablo Vazquez
    Joel Heethaar
    Amrein Olivier
    Ilias Karasavvidis
    Thomas Kumlehn
    Sebastian Koenig
    Hannu Hoffrén
    Benjamin Dansie
    Fred M'ule
    Michel Vilain
    Bradley Cathey
    Gianmichele Mariani
    Gottfried Hofmann
    Bjørnar Frøyse
    Valentijn Bruning
    Paul Holmes
    Clemens Rudolph
    Juris Graphix
    David Strebel
    Ronan Zeegers
    François Tarlier
    Felipe Andres Esquivel Reed
    Olaf Beckman
    Jesus Alberto Olmos Linares
    Kajimba
    Maria Figueiredo
    Alexandr Galperin
    Francesco Siddi
    Julio Iglesias Lopez
    Kjartan Tysdal
    Thomas Torfs
    Film Works
    Teruyuki Nakamura
    Roger Luethi
    Benoit Bolsee
    Stefan Abrahamsen
    Andreas Mattijat
    Xavier Bouchoux
    Blender 3D Graphics and Animation
    Henk Vostermans
    Daniel Blanco Delgado
    BlenderDay/2011
    Bradley Cathey
    Matthieu Dupont de Dinechin
    Gianmichele Mariani
    Jérôme Scaillet

Bronze (Ivo Grigull, Dylan Urquidi, Philippe Derungs, Phil Beauchamp, Bruce Parrott, Mathieu Quiblier, Daniel Martinez, Leandro Inocencio, Lluc Romaní Brasó, 
Jonathan Williamson, Michael Ehlen, Karlis Stigis, Dreamsteep, Martin Lindelöf, Filippo Saracino, Douwe van der Veen, Olli Äkräs, Bruno D'Arcangeli, 
Francisco Sedrez Warmling, Watchmike.ca, peter lener, Matteo Novellino, Martin Kirsch, Austars Schnore, KC Elliott, Massimiliano Puliero, Karl Stein, 
Wood Design Studios, Omer Khan, Jyrki Kanto, Michał Krupa, Lars Brubaker, Neil Richmond, Adam Kalisz, Robert Garlington, Ian Wilson, Carlo Andreacchio, 
Jeremias Boos, Robert Holcomb, Gabriel Zöller, Robert Cude, Natibel de Leon, Nathan Turnage, Nicolas Vergnes, Philipp Kleinhenz, Norman Hartig, Louis Kreusel, 
Christopher Taylor, Giovanni Remondini, Daniel Rentzsch, Nico Partipilo, Thomas Ventresco, Johannes Schwarz, Александр Коротеев, Brendon Harvey, 
Marcelo G. Malheiros, Marius Giurgi, Richard Burns, Perttu Iso-Metsälä, Steve Bazin, Radoslav Borisov, Yoshiyuki Shida, Julien Guigner, Andrew Hunter, 
Philipp Oeser, Daniel Thul, Thobias Johansson, Mauro Bonecchi, Georg Piorczynski, Sebastian Michailidis, L M Weedy, Gen X, Stefan Hinze, Nicolò Zubbini, 
Erik Pusch, Rob Scott, Florian Koch, Charles Razack, Adrian Baker, Oliver Villar Diz, David Revoy, Julio Iglesias Lopez, Coen Spoor, Carlos Folch, 
Joseph Christie, Victor Hernández García, David Mcsween, James Finnerty, Cory Kruckenberg, Giacomo Graziosi, Olivier Saraja, Lars Brubaker, Eric Hudson, 
Johannes Schwarz, David Elguea, Marcus Schulderinsky, Karel De Bruijn, Lucas van Wijngaarden, Stefano Ciarrocchi, Mehmet Eribol, Thomas Berglund, Zuofei Song, 
Dylan Urquidi )
2012-05-17 12:49:33 +00:00