____
`````|````` | | | ..''''
| | | |______ .''
| | | | ..'
| | |_______ |___________ ....''
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
|
|
|
/*
|
|
|
|
* Copyright 2011, Blender Foundation.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
* Contributor:
|
|
|
|
* Jeroen Bakker
|
|
|
|
* Monique Dewanchand
|
|
|
|
*/
|
|
|
|
|
2018-04-12 10:27:38 +02:00
|
|
|
#include <string.h>
|
2012-08-16 12:32:48 +00:00
|
|
|
#include "MEM_guardedalloc.h"
|
2018-04-12 10:27:38 +02:00
|
|
|
#include "BLI_math.h"
|
____
`````|````` | | | ..''''
| | | |______ .''
| | | | ..'
| | |_______ |___________ ....''
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
|
|
|
extern "C" {
|
2018-04-14 22:26:12 +02:00
|
|
|
#include "BLI_jitter_2d.h"
|
____
`````|````` | | | ..''''
| | | |______ .''
| | | | ..'
| | |_______ |___________ ....''
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
|
|
|
}
|
2018-04-12 10:27:38 +02:00
|
|
|
#include "COM_VectorBlurOperation.h"
|
____
`````|````` | | | ..''''
| | | |______ .''
| | | | ..'
| | |_______ |___________ ....''
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
|
|
|
|
2018-04-12 10:27:38 +02:00
|
|
|
|
|
|
|
/* Defined */
|
2018-04-14 22:26:12 +02:00
|
|
|
#define PASS_VECTOR_MAX 10000.0f
|
2018-04-12 10:27:38 +02:00
|
|
|
|
|
|
|
/* Forward declarations */
|
|
|
|
struct ZSpan;
|
|
|
|
struct DrawBufPixel;
|
|
|
|
void zbuf_accumulate_vecblur(
|
2018-04-14 22:26:12 +02:00
|
|
|
NodeBlurData *nbd, int xsize, int ysize, float *newrect,
|
|
|
|
const float *imgrect, float *vecbufrect, const float *zbufrect);
|
2018-04-12 10:27:38 +02:00
|
|
|
void zbuf_alloc_span(ZSpan *zspan, int rectx, int recty, float clipcrop);
|
|
|
|
void zbuf_free_span(ZSpan *zspan);
|
|
|
|
void antialias_tagbuf(int xsize, int ysize, char *rectmove);
|
|
|
|
|
|
|
|
|
|
|
|
/* VectorBlurOperation */
|
2012-06-15 09:58:52 +00:00
|
|
|
VectorBlurOperation::VectorBlurOperation() : NodeOperation()
|
2012-05-17 22:55:28 +00:00
|
|
|
{
|
____
`````|````` | | | ..''''
| | | |______ .''
| | | | ..'
| | |_______ |___________ ....''
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
|
|
|
this->addInputSocket(COM_DT_COLOR);
|
|
|
|
this->addInputSocket(COM_DT_VALUE); // ZBUF
|
|
|
|
this->addInputSocket(COM_DT_COLOR); //SPEED
|
|
|
|
this->addOutputSocket(COM_DT_COLOR);
|
2012-06-26 01:22:05 +00:00
|
|
|
this->m_settings = NULL;
|
|
|
|
this->m_cachedInstance = NULL;
|
|
|
|
this->m_inputImageProgram = NULL;
|
|
|
|
this->m_inputSpeedProgram = NULL;
|
|
|
|
this->m_inputZProgram = NULL;
|
____
`````|````` | | | ..''''
| | | |______ .''
| | | | ..'
| | |_______ |___________ ....''
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
|
|
|
setComplex(true);
|
|
|
|
}
|
2012-05-17 22:55:28 +00:00
|
|
|
void VectorBlurOperation::initExecution()
|
|
|
|
{
|
____
`````|````` | | | ..''''
| | | |______ .''
| | | | ..'
| | |_______ |___________ ....''
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
|
|
|
initMutex();
|
2012-06-26 01:22:05 +00:00
|
|
|
this->m_inputImageProgram = getInputSocketReader(0);
|
|
|
|
this->m_inputZProgram = getInputSocketReader(1);
|
|
|
|
this->m_inputSpeedProgram = getInputSocketReader(2);
|
|
|
|
this->m_cachedInstance = NULL;
|
____
`````|````` | | | ..''''
| | | |______ .''
| | | | ..'
| | |_______ |___________ ....''
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
|
|
|
QualityStepHelper::initExecution(COM_QH_INCREASE);
|
2018-04-12 10:27:38 +02:00
|
|
|
|
____
`````|````` | | | ..''''
| | | |______ .''
| | | | ..'
| | |_______ |___________ ....''
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
|
|
|
}
|
|
|
|
|
2012-08-10 14:07:24 +00:00
|
|
|
void VectorBlurOperation::executePixel(float output[4], int x, int y, void *data)
|
2012-05-17 22:55:28 +00:00
|
|
|
{
|
2018-04-14 22:26:12 +02:00
|
|
|
float *buffer = (float *)data;
|
2015-01-19 18:13:26 +01:00
|
|
|
int index = (y * this->getWidth() + x) * COM_NUM_CHANNELS_COLOR;
|
2012-08-10 14:07:24 +00:00
|
|
|
copy_v4_v4(output, &buffer[index]);
|
____
`````|````` | | | ..''''
| | | |______ .''
| | | | ..'
| | |_______ |___________ ....''
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
|
|
|
}
|
|
|
|
|
2012-05-17 22:55:28 +00:00
|
|
|
void VectorBlurOperation::deinitExecution()
|
|
|
|
{
|
____
`````|````` | | | ..''''
| | | |______ .''
| | | | ..'
| | |_______ |___________ ....''
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
|
|
|
deinitMutex();
|
2012-06-26 01:22:05 +00:00
|
|
|
this->m_inputImageProgram = NULL;
|
|
|
|
this->m_inputSpeedProgram = NULL;
|
|
|
|
this->m_inputZProgram = NULL;
|
|
|
|
if (this->m_cachedInstance) {
|
2012-08-16 12:32:48 +00:00
|
|
|
MEM_freeN(this->m_cachedInstance);
|
2012-06-26 01:22:05 +00:00
|
|
|
this->m_cachedInstance = NULL;
|
____
`````|````` | | | ..''''
| | | |______ .''
| | | | ..'
| | |_______ |___________ ....''
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
|
|
|
}
|
|
|
|
}
|
2012-07-13 12:24:42 +00:00
|
|
|
void *VectorBlurOperation::initializeTileData(rcti *rect)
|
2012-05-17 22:55:28 +00:00
|
|
|
{
|
2012-06-26 01:22:05 +00:00
|
|
|
if (this->m_cachedInstance) {
|
|
|
|
return this->m_cachedInstance;
|
|
|
|
}
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2012-06-13 12:34:56 +00:00
|
|
|
lockMutex();
|
2012-06-26 01:22:05 +00:00
|
|
|
if (this->m_cachedInstance == NULL) {
|
2012-07-13 12:24:42 +00:00
|
|
|
MemoryBuffer *tile = (MemoryBuffer *)this->m_inputImageProgram->initializeTileData(rect);
|
|
|
|
MemoryBuffer *speed = (MemoryBuffer *)this->m_inputSpeedProgram->initializeTileData(rect);
|
|
|
|
MemoryBuffer *z = (MemoryBuffer *)this->m_inputZProgram->initializeTileData(rect);
|
2012-08-16 12:32:48 +00:00
|
|
|
float *data = (float *)MEM_dupallocN(tile->getBuffer());
|
____
`````|````` | | | ..''''
| | | |______ .''
| | | | ..'
| | |_______ |___________ ....''
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
|
|
|
this->generateVectorBlur(data, tile, speed, z);
|
2012-06-26 01:22:05 +00:00
|
|
|
this->m_cachedInstance = data;
|
____
`````|````` | | | ..''''
| | | |______ .''
| | | | ..'
| | |_______ |___________ ....''
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
|
|
|
}
|
2012-06-13 12:34:56 +00:00
|
|
|
unlockMutex();
|
2012-06-26 01:22:05 +00:00
|
|
|
return this->m_cachedInstance;
|
____
`````|````` | | | ..''''
| | | |______ .''
| | | | ..'
| | |_______ |___________ ....''
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
|
|
|
}
|
|
|
|
|
2015-03-27 15:49:07 +05:00
|
|
|
bool VectorBlurOperation::determineDependingAreaOfInterest(rcti * /*input*/, ReadBufferOperation *readOperation, rcti *output)
|
2012-05-17 22:55:28 +00:00
|
|
|
{
|
2012-06-26 01:22:05 +00:00
|
|
|
if (this->m_cachedInstance == NULL) {
|
____
`````|````` | | | ..''''
| | | |______ .''
| | | | ..'
| | |_______ |___________ ....''
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
|
|
|
rcti newInput;
|
|
|
|
newInput.xmax = this->getWidth();
|
|
|
|
newInput.xmin = 0;
|
|
|
|
newInput.ymax = this->getHeight();
|
|
|
|
newInput.ymin = 0;
|
|
|
|
return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output);
|
2012-05-17 13:44:15 +00:00
|
|
|
}
|
|
|
|
else {
|
____
`````|````` | | | ..''''
| | | |______ .''
| | | | ..'
| | |_______ |___________ ....''
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
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-05-17 22:55:28 +00:00
|
|
|
void VectorBlurOperation::generateVectorBlur(float *data, MemoryBuffer *inputImage, MemoryBuffer *inputSpeed, MemoryBuffer *inputZ)
|
|
|
|
{
|
____
`````|````` | | | ..''''
| | | |______ .''
| | | | ..'
| | |_______ |___________ ....''
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
|
|
|
NodeBlurData blurdata;
|
2012-06-26 01:22:05 +00:00
|
|
|
blurdata.samples = this->m_settings->samples / QualityStepHelper::getStep();
|
|
|
|
blurdata.maxspeed = this->m_settings->maxspeed;
|
|
|
|
blurdata.minspeed = this->m_settings->minspeed;
|
|
|
|
blurdata.curved = this->m_settings->curved;
|
|
|
|
blurdata.fac = this->m_settings->fac;
|
2018-04-12 10:27:38 +02:00
|
|
|
zbuf_accumulate_vecblur(&blurdata, this->getWidth(), this->getHeight(), data, inputImage->getBuffer(), inputSpeed->getBuffer(), inputZ->getBuffer());
|
____
`````|````` | | | ..''''
| | | |______ .''
| | | | ..'
| | |_______ |___________ ....''
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
|
|
|
return;
|
|
|
|
}
|
2018-04-12 10:27:38 +02:00
|
|
|
|
|
|
|
/* ****************** Spans ******************************* */
|
|
|
|
/* span fill in method, is also used to localize data for zbuffering */
|
|
|
|
typedef struct ZSpan {
|
|
|
|
/* range for clipping */
|
|
|
|
int rectx, recty;
|
|
|
|
|
|
|
|
/* actual filled in range */
|
|
|
|
int miny1, maxy1, miny2, maxy2;
|
|
|
|
/* vertex pointers detect min/max range in */
|
|
|
|
const float *minp1, *maxp1, *minp2, *maxp2;
|
|
|
|
float *span1, *span2;
|
|
|
|
|
|
|
|
/* transform from hoco to zbuf co */
|
|
|
|
float zmulx, zmuly, zofsx, zofsy;
|
|
|
|
|
|
|
|
int *rectz;
|
2018-04-14 22:26:12 +02:00
|
|
|
DrawBufPixel *rectdraw;
|
2018-04-12 10:27:38 +02:00
|
|
|
float clipcrop;
|
|
|
|
|
|
|
|
} ZSpan;
|
|
|
|
|
|
|
|
/* each zbuffer has coordinates transformed to local rect coordinates, so we can simply clip */
|
|
|
|
void zbuf_alloc_span(ZSpan *zspan, int rectx, int recty, float clipcrop)
|
|
|
|
{
|
|
|
|
memset(zspan, 0, sizeof(ZSpan));
|
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
zspan->rectx = rectx;
|
|
|
|
zspan->recty = recty;
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
zspan->span1 = (float *)MEM_mallocN(recty * sizeof(float), "zspan");
|
|
|
|
zspan->span2 = (float *)MEM_mallocN(recty * sizeof(float), "zspan");
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
zspan->clipcrop = clipcrop;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void zbuf_free_span(ZSpan *zspan)
|
|
|
|
{
|
|
|
|
if (zspan) {
|
|
|
|
if (zspan->span1) MEM_freeN(zspan->span1);
|
|
|
|
if (zspan->span2) MEM_freeN(zspan->span2);
|
2018-04-14 22:26:12 +02:00
|
|
|
zspan->span1 = zspan->span2 = NULL;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* reset range for clipping */
|
|
|
|
static void zbuf_init_span(ZSpan *zspan)
|
|
|
|
{
|
2018-04-14 22:26:12 +02:00
|
|
|
zspan->miny1 = zspan->miny2 = zspan->recty + 1;
|
|
|
|
zspan->maxy1 = zspan->maxy2 = -1;
|
|
|
|
zspan->minp1 = zspan->maxp1 = zspan->minp2 = zspan->maxp2 = NULL;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void zbuf_add_to_span(ZSpan *zspan, const float v1[2], const float v2[2])
|
|
|
|
{
|
|
|
|
const float *minv, *maxv;
|
|
|
|
float *span;
|
|
|
|
float xx1, dx0, xs0;
|
|
|
|
int y, my0, my2;
|
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
if (v1[1] < v2[1]) {
|
|
|
|
minv = v1; maxv = v2;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
else {
|
2018-04-14 22:26:12 +02:00
|
|
|
minv = v2; maxv = v1;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
my0 = ceil(minv[1]);
|
|
|
|
my2 = floor(maxv[1]);
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
if (my2 < 0 || my0 >= zspan->recty) return;
|
2018-04-12 10:27:38 +02:00
|
|
|
|
|
|
|
/* clip top */
|
2018-04-14 22:26:12 +02:00
|
|
|
if (my2 >= zspan->recty) my2 = zspan->recty - 1;
|
2018-04-12 10:27:38 +02:00
|
|
|
/* clip bottom */
|
2018-04-14 22:26:12 +02:00
|
|
|
if (my0 < 0) my0 = 0;
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
if (my0 > my2) return;
|
2018-04-12 10:27:38 +02:00
|
|
|
/* if (my0>my2) should still fill in, that way we get spans that skip nicely */
|
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
xx1 = maxv[1] - minv[1];
|
|
|
|
if (xx1 > FLT_EPSILON) {
|
|
|
|
dx0 = (minv[0] - maxv[0]) / xx1;
|
|
|
|
xs0 = dx0 * (minv[1] - my2) + minv[0];
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
dx0 = 0.0f;
|
|
|
|
xs0 = min_ff(minv[0], maxv[0]);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* empty span */
|
|
|
|
if (zspan->maxp1 == NULL) {
|
2018-04-14 22:26:12 +02:00
|
|
|
span = zspan->span1;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
2018-04-14 22:26:12 +02:00
|
|
|
else { /* does it complete left span? */
|
|
|
|
if (maxv == zspan->minp1 || minv == zspan->maxp1) {
|
|
|
|
span = zspan->span1;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
else {
|
2018-04-14 22:26:12 +02:00
|
|
|
span = zspan->span2;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
if (span == zspan->span1) {
|
2018-04-12 10:27:38 +02:00
|
|
|
// printf("left span my0 %d my2 %d\n", my0, my2);
|
2018-04-14 22:26:12 +02:00
|
|
|
if (zspan->minp1 == NULL || zspan->minp1[1] > minv[1]) {
|
|
|
|
zspan->minp1 = minv;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
2018-04-14 22:26:12 +02:00
|
|
|
if (zspan->maxp1 == NULL || zspan->maxp1[1] < maxv[1]) {
|
|
|
|
zspan->maxp1 = maxv;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
2018-04-14 22:26:12 +02:00
|
|
|
if (my0 < zspan->miny1) zspan->miny1 = my0;
|
|
|
|
if (my2 > zspan->maxy1) zspan->maxy1 = my2;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
// printf("right span my0 %d my2 %d\n", my0, my2);
|
2018-04-14 22:26:12 +02:00
|
|
|
if (zspan->minp2 == NULL || zspan->minp2[1] > minv[1]) {
|
|
|
|
zspan->minp2 = minv;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
2018-04-14 22:26:12 +02:00
|
|
|
if (zspan->maxp2 == NULL || zspan->maxp2[1] < maxv[1]) {
|
|
|
|
zspan->maxp2 = maxv;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
2018-04-14 22:26:12 +02:00
|
|
|
if (my0 < zspan->miny2) zspan->miny2 = my0;
|
|
|
|
if (my2 > zspan->maxy2) zspan->maxy2 = my2;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
for (y = my2; y >= my0; y--, xs0 += dx0) {
|
2018-04-12 10:27:38 +02:00
|
|
|
/* xs0 is the xcoord! */
|
2018-04-14 22:26:12 +02:00
|
|
|
span[y] = xs0;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ******************** VECBLUR ACCUM BUF ************************* */
|
|
|
|
|
|
|
|
typedef struct DrawBufPixel {
|
|
|
|
const float *colpoin;
|
|
|
|
float alpha;
|
|
|
|
} DrawBufPixel;
|
|
|
|
|
|
|
|
|
|
|
|
static void zbuf_fill_in_rgba(ZSpan *zspan, DrawBufPixel *col, float *v1, float *v2, float *v3, float *v4)
|
|
|
|
{
|
|
|
|
DrawBufPixel *rectpofs, *rp;
|
|
|
|
double zxd, zyd, zy0, zverg;
|
|
|
|
float x0, y0, z0;
|
|
|
|
float x1, y1, z1, x2, y2, z2, xx1;
|
|
|
|
const float *span1, *span2;
|
|
|
|
float *rectzofs, *rz;
|
|
|
|
int x, y;
|
|
|
|
int sn1, sn2, rectx, my0, my2;
|
|
|
|
|
|
|
|
/* init */
|
|
|
|
zbuf_init_span(zspan);
|
|
|
|
|
|
|
|
/* set spans */
|
|
|
|
zbuf_add_to_span(zspan, v1, v2);
|
|
|
|
zbuf_add_to_span(zspan, v2, v3);
|
|
|
|
zbuf_add_to_span(zspan, v3, v4);
|
|
|
|
zbuf_add_to_span(zspan, v4, v1);
|
|
|
|
|
|
|
|
/* clipped */
|
2018-04-14 22:26:12 +02:00
|
|
|
if (zspan->minp2 == NULL || zspan->maxp2 == NULL) return;
|
2018-04-12 10:27:38 +02:00
|
|
|
|
|
|
|
my0 = max_ii(zspan->miny1, zspan->miny2);
|
|
|
|
my2 = min_ii(zspan->maxy1, zspan->maxy2);
|
|
|
|
|
|
|
|
// printf("my %d %d\n", my0, my2);
|
2018-04-14 22:26:12 +02:00
|
|
|
if (my2 < my0) return;
|
2018-04-12 10:27:38 +02:00
|
|
|
|
|
|
|
/* ZBUF DX DY, in floats still */
|
2018-04-14 22:26:12 +02:00
|
|
|
x1 = v1[0] - v2[0];
|
|
|
|
x2 = v2[0] - v3[0];
|
|
|
|
y1 = v1[1] - v2[1];
|
|
|
|
y2 = v2[1] - v3[1];
|
|
|
|
z1 = v1[2] - v2[2];
|
|
|
|
z2 = v2[2] - v3[2];
|
|
|
|
x0 = y1 * z2 - z1 * y2;
|
|
|
|
y0 = z1 * x2 - x1 * z2;
|
|
|
|
z0 = x1 * y2 - y1 * x2;
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
if (z0 == 0.0f) return;
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
xx1 = (x0 * v1[0] + y0 * v1[1]) / z0 + v1[2];
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
zxd = -(double)x0 / (double)z0;
|
|
|
|
zyd = -(double)y0 / (double)z0;
|
|
|
|
zy0 = ((double)my2) * zyd + (double)xx1;
|
2018-04-12 10:27:38 +02:00
|
|
|
|
|
|
|
/* start-offset in rect */
|
2018-04-14 22:26:12 +02:00
|
|
|
rectx = zspan->rectx;
|
|
|
|
rectzofs = (float *)(zspan->rectz + rectx * my2);
|
|
|
|
rectpofs = ((DrawBufPixel *)zspan->rectdraw) + rectx * my2;
|
2018-04-12 10:27:38 +02:00
|
|
|
|
|
|
|
/* correct span */
|
2018-04-14 22:26:12 +02:00
|
|
|
sn1 = (my0 + my2) / 2;
|
2018-04-12 10:27:38 +02:00
|
|
|
if (zspan->span1[sn1] < zspan->span2[sn1]) {
|
2018-04-14 22:26:12 +02:00
|
|
|
span1 = zspan->span1 + my2;
|
|
|
|
span2 = zspan->span2 + my2;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
else {
|
2018-04-14 22:26:12 +02:00
|
|
|
span1 = zspan->span2 + my2;
|
|
|
|
span2 = zspan->span1 + my2;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
for (y = my2; y >= my0; y--, span1--, span2--) {
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
sn1 = floor(*span1);
|
|
|
|
sn2 = floor(*span2);
|
2018-04-12 10:27:38 +02:00
|
|
|
sn1++;
|
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
if (sn2 >= rectx) sn2 = rectx - 1;
|
|
|
|
if (sn1 < 0) sn1 = 0;
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
if (sn2 >= sn1) {
|
|
|
|
zverg = (double)sn1 * zxd + zy0;
|
|
|
|
rz = rectzofs + sn1;
|
|
|
|
rp = rectpofs + sn1;
|
|
|
|
x = sn2 - sn1;
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
while (x >= 0) {
|
2018-04-12 10:27:38 +02:00
|
|
|
if (zverg < (double)*rz) {
|
2018-04-14 22:26:12 +02:00
|
|
|
*rz = zverg;
|
|
|
|
*rp = *col;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
2018-04-14 22:26:12 +02:00
|
|
|
zverg += zxd;
|
2018-04-12 10:27:38 +02:00
|
|
|
rz++;
|
|
|
|
rp++;
|
|
|
|
x--;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
zy0 -= zyd;
|
|
|
|
rectzofs -= rectx;
|
|
|
|
rectpofs -= rectx;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* char value==255 is filled in, rest should be zero */
|
|
|
|
/* returns alpha values, but sets alpha to 1 for zero alpha pixels that have an alpha value as neighbor */
|
|
|
|
void antialias_tagbuf(int xsize, int ysize, char *rectmove)
|
|
|
|
{
|
|
|
|
char *row1, *row2, *row3;
|
|
|
|
char prev, next;
|
|
|
|
int a, x, y, step;
|
|
|
|
|
|
|
|
/* 1: tag pixels to be candidate for AA */
|
2018-04-14 22:26:12 +02:00
|
|
|
for (y = 2; y < ysize; y++) {
|
2018-04-12 10:27:38 +02:00
|
|
|
/* setup rows */
|
2018-04-14 22:26:12 +02:00
|
|
|
row1 = rectmove + (y - 2) * xsize;
|
|
|
|
row2 = row1 + xsize;
|
|
|
|
row3 = row2 + xsize;
|
|
|
|
for (x = 2; x < xsize; x++, row1++, row2++, row3++) {
|
2018-04-12 10:27:38 +02:00
|
|
|
if (row2[1]) {
|
2018-04-14 22:26:12 +02:00
|
|
|
if (row2[0] == 0 || row2[2] == 0 || row1[1] == 0 || row3[1] == 0)
|
|
|
|
row2[1] = 128;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 2: evaluate horizontal scanlines and calculate alphas */
|
2018-04-14 22:26:12 +02:00
|
|
|
row1 = rectmove;
|
|
|
|
for (y = 0; y < ysize; y++) {
|
2018-04-12 10:27:38 +02:00
|
|
|
row1++;
|
2018-04-14 22:26:12 +02:00
|
|
|
for (x = 1; x < xsize; x++, row1++) {
|
|
|
|
if (row1[0] == 128 && row1[1] == 128) {
|
2018-04-12 10:27:38 +02:00
|
|
|
/* find previous color and next color and amount of steps to blend */
|
2018-04-14 22:26:12 +02:00
|
|
|
prev = row1[-1];
|
|
|
|
step = 1;
|
|
|
|
while (x + step < xsize && row1[step] == 128)
|
2018-04-12 10:27:38 +02:00
|
|
|
step++;
|
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
if (x + step != xsize) {
|
2018-04-12 10:27:38 +02:00
|
|
|
/* now we can blend values */
|
2018-04-14 22:26:12 +02:00
|
|
|
next = row1[step];
|
2018-04-12 10:27:38 +02:00
|
|
|
|
|
|
|
/* note, prev value can be next value, but we do this loop to clear 128 then */
|
2018-04-14 22:26:12 +02:00
|
|
|
for (a = 0; a < step; a++) {
|
2018-04-12 10:27:38 +02:00
|
|
|
int fac, mfac;
|
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
fac = ((a + 1) << 8) / (step + 1);
|
|
|
|
mfac = 255 - fac;
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
row1[a] = (prev * mfac + next * fac) >> 8;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 3: evaluate vertical scanlines and calculate alphas */
|
|
|
|
/* use for reading a copy of the original tagged buffer */
|
2018-04-14 22:26:12 +02:00
|
|
|
for (x = 0; x < xsize; x++) {
|
|
|
|
row1 = rectmove + x + xsize;
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
for (y = 1; y < ysize; y++, row1 += xsize) {
|
|
|
|
if (row1[0] == 128 && row1[xsize] == 128) {
|
2018-04-12 10:27:38 +02:00
|
|
|
/* find previous color and next color and amount of steps to blend */
|
2018-04-14 22:26:12 +02:00
|
|
|
prev = row1[-xsize];
|
|
|
|
step = 1;
|
|
|
|
while (y + step < ysize && row1[step * xsize] == 128)
|
2018-04-12 10:27:38 +02:00
|
|
|
step++;
|
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
if (y + step != ysize) {
|
2018-04-12 10:27:38 +02:00
|
|
|
/* now we can blend values */
|
2018-04-14 22:26:12 +02:00
|
|
|
next = row1[step * xsize];
|
2018-04-12 10:27:38 +02:00
|
|
|
/* note, prev value can be next value, but we do this loop to clear 128 then */
|
2018-04-14 22:26:12 +02:00
|
|
|
for (a = 0; a < step; a++) {
|
2018-04-12 10:27:38 +02:00
|
|
|
int fac, mfac;
|
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
fac = ((a + 1) << 8) / (step + 1);
|
|
|
|
mfac = 255 - fac;
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
row1[a * xsize] = (prev * mfac + next * fac) >> 8;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* last: pixels with 0 we fill in zbuffer, with 1 we skip for mask */
|
2018-04-14 22:26:12 +02:00
|
|
|
for (y = 2; y < ysize; y++) {
|
2018-04-12 10:27:38 +02:00
|
|
|
/* setup rows */
|
2018-04-14 22:26:12 +02:00
|
|
|
row1 = rectmove + (y - 2) * xsize;
|
|
|
|
row2 = row1 + xsize;
|
|
|
|
row3 = row2 + xsize;
|
|
|
|
for (x = 2; x < xsize; x++, row1++, row2++, row3++) {
|
|
|
|
if (row2[1] == 0) {
|
|
|
|
if (row2[0] > 1 || row2[2] > 1 || row1[1] > 1 || row3[1] > 1)
|
|
|
|
row2[1] = 1;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* in: two vectors, first vector points from origin back in time, 2nd vector points to future */
|
|
|
|
/* we make this into 3 points, center point is (0, 0) */
|
|
|
|
/* and offset the center point just enough to make curve go through midpoint */
|
|
|
|
|
|
|
|
static void quad_bezier_2d(float *result, float *v1, float *v2, float *ipodata)
|
|
|
|
{
|
|
|
|
float p1[2], p2[2], p3[2];
|
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
p3[0] = -v2[0];
|
|
|
|
p3[1] = -v2[1];
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
p1[0] = v1[0];
|
|
|
|
p1[1] = v1[1];
|
2018-04-12 10:27:38 +02:00
|
|
|
|
|
|
|
/* official formula 2*p2 - 0.5*p1 - 0.5*p3 */
|
2018-04-14 22:26:12 +02:00
|
|
|
p2[0] = -0.5f * p1[0] - 0.5f * p3[0];
|
|
|
|
p2[1] = -0.5f * p1[1] - 0.5f * p3[1];
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
result[0] = ipodata[0] * p1[0] + ipodata[1] * p2[0] + ipodata[2] * p3[0];
|
|
|
|
result[1] = ipodata[0] * p1[1] + ipodata[1] * p2[1] + ipodata[2] * p3[1];
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void set_quad_bezier_ipo(float fac, float *data)
|
|
|
|
{
|
2018-04-14 22:26:12 +02:00
|
|
|
float mfac = (1.0f - fac);
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
data[0] = mfac * mfac;
|
|
|
|
data[1] = 2.0f * mfac * fac;
|
|
|
|
data[2] = fac * fac;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void zbuf_accumulate_vecblur(
|
2018-04-14 22:26:12 +02:00
|
|
|
NodeBlurData *nbd, int xsize, int ysize, float *newrect,
|
|
|
|
const float *imgrect, float *vecbufrect, const float *zbufrect)
|
2018-04-12 10:27:38 +02:00
|
|
|
{
|
|
|
|
ZSpan zspan;
|
|
|
|
DrawBufPixel *rectdraw, *dr;
|
|
|
|
static float jit[256][2];
|
|
|
|
float v1[3], v2[3], v3[3], v4[3], fx, fy;
|
|
|
|
const float *dimg, *dz, *ro;
|
|
|
|
float *rectvz, *dvz, *dvec1, *dvec2, *dz1, *dz2, *rectz;
|
2018-04-14 22:26:12 +02:00
|
|
|
float *minvecbufrect = NULL, *rectweight, *rw, *rectmax, *rm;
|
|
|
|
float maxspeedsq = (float)nbd->maxspeed * nbd->maxspeed;
|
|
|
|
int y, x, step, maxspeed = nbd->maxspeed, samples = nbd->samples;
|
|
|
|
int tsktsk = 0;
|
|
|
|
static int firsttime = 1;
|
2018-04-12 10:27:38 +02:00
|
|
|
char *rectmove, *dm;
|
|
|
|
|
|
|
|
zbuf_alloc_span(&zspan, xsize, ysize, 1.0f);
|
2018-04-14 22:26:12 +02:00
|
|
|
zspan.zmulx = ((float)xsize) / 2.0f;
|
|
|
|
zspan.zmuly = ((float)ysize) / 2.0f;
|
|
|
|
zspan.zofsx = 0.0f;
|
|
|
|
zspan.zofsy = 0.0f;
|
2018-04-12 10:27:38 +02:00
|
|
|
|
|
|
|
/* the buffers */
|
2018-04-14 22:26:12 +02:00
|
|
|
rectz = (float *)MEM_mapallocN(sizeof(float) * xsize * ysize, "zbuf accum");
|
|
|
|
zspan.rectz = (int *)rectz;
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
rectmove = (char *)MEM_mapallocN(xsize * ysize, "rectmove");
|
|
|
|
rectdraw = (DrawBufPixel *)MEM_mapallocN(sizeof(DrawBufPixel) * xsize * ysize, "rect draw");
|
|
|
|
zspan.rectdraw = rectdraw;
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
rectweight = (float *)MEM_mapallocN(sizeof(float) * xsize * ysize, "rect weight");
|
|
|
|
rectmax = (float *)MEM_mapallocN(sizeof(float) * xsize * ysize, "rect max");
|
2018-04-12 10:27:38 +02:00
|
|
|
|
|
|
|
/* debug... check if PASS_VECTOR_MAX still is in buffers */
|
2018-04-14 22:26:12 +02:00
|
|
|
dvec1 = vecbufrect;
|
|
|
|
for (x = 4 * xsize * ysize; x > 0; x--, dvec1++) {
|
|
|
|
if (dvec1[0] == PASS_VECTOR_MAX) {
|
|
|
|
dvec1[0] = 0.0f;
|
|
|
|
tsktsk = 1;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if (tsktsk) printf("Found uninitialized speed in vector buffer... fixed.\n");
|
|
|
|
|
|
|
|
/* min speed? then copy speedbuffer to recalculate speed vectors */
|
|
|
|
if (nbd->minspeed) {
|
2018-04-14 22:26:12 +02:00
|
|
|
float minspeed = (float)nbd->minspeed;
|
|
|
|
float minspeedsq = minspeed * minspeed;
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
minvecbufrect = (float *)MEM_mapallocN(4 * sizeof(float) * xsize * ysize, "minspeed buf");
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
dvec1 = vecbufrect;
|
|
|
|
dvec2 = minvecbufrect;
|
|
|
|
for (x = 2 * xsize * ysize; x > 0; x--, dvec1 += 2, dvec2 += 2) {
|
|
|
|
if (dvec1[0] == 0.0f && dvec1[1] == 0.0f) {
|
|
|
|
dvec2[0] = dvec1[0];
|
|
|
|
dvec2[1] = dvec1[1];
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
else {
|
2018-04-14 22:26:12 +02:00
|
|
|
float speedsq = dvec1[0] * dvec1[0] + dvec1[1] * dvec1[1];
|
2018-04-12 10:27:38 +02:00
|
|
|
if (speedsq <= minspeedsq) {
|
2018-04-14 22:26:12 +02:00
|
|
|
dvec2[0] = 0.0f;
|
|
|
|
dvec2[1] = 0.0f;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
speedsq = 1.0f - minspeed / sqrtf(speedsq);
|
2018-04-14 22:26:12 +02:00
|
|
|
dvec2[0] = speedsq * dvec1[0];
|
|
|
|
dvec2[1] = speedsq * dvec1[1];
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
SWAP(float *, minvecbufrect, vecbufrect);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* make vertex buffer with averaged speed and zvalues */
|
2018-04-14 22:26:12 +02:00
|
|
|
rectvz = (float *)MEM_mapallocN(4 * sizeof(float) * (xsize + 1) * (ysize + 1), "vertices");
|
|
|
|
dvz = rectvz;
|
|
|
|
for (y = 0; y <= ysize; y++) {
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
if (y == 0)
|
|
|
|
dvec1 = vecbufrect + 4 * y * xsize;
|
2018-04-12 10:27:38 +02:00
|
|
|
else
|
2018-04-14 22:26:12 +02:00
|
|
|
dvec1 = vecbufrect + 4 * (y - 1) * xsize;
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
if (y == ysize)
|
|
|
|
dvec2 = vecbufrect + 4 * (y - 1) * xsize;
|
2018-04-12 10:27:38 +02:00
|
|
|
else
|
2018-04-14 22:26:12 +02:00
|
|
|
dvec2 = vecbufrect + 4 * y * xsize;
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
for (x = 0; x <= xsize; x++) {
|
2018-04-12 10:27:38 +02:00
|
|
|
|
|
|
|
/* two vectors, so a step loop */
|
2018-04-14 22:26:12 +02:00
|
|
|
for (step = 0; step < 2; step++, dvec1 += 2, dvec2 += 2, dvz += 2) {
|
2018-04-12 10:27:38 +02:00
|
|
|
/* average on minimal speed */
|
2018-04-14 22:26:12 +02:00
|
|
|
int div = 0;
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
if (x != 0) {
|
|
|
|
if (dvec1[-4] != 0.0f || dvec1[-3] != 0.0f) {
|
|
|
|
dvz[0] = dvec1[-4];
|
|
|
|
dvz[1] = dvec1[-3];
|
2018-04-12 10:27:38 +02:00
|
|
|
div++;
|
|
|
|
}
|
2018-04-14 22:26:12 +02:00
|
|
|
if (dvec2[-4] != 0.0f || dvec2[-3] != 0.0f) {
|
|
|
|
if (div == 0) {
|
|
|
|
dvz[0] = dvec2[-4];
|
|
|
|
dvz[1] = dvec2[-3];
|
2018-04-12 10:27:38 +02:00
|
|
|
div++;
|
|
|
|
}
|
2018-04-14 22:26:12 +02:00
|
|
|
else if ( (ABS(dvec2[-4]) + ABS(dvec2[-3])) < (ABS(dvz[0]) + ABS(dvz[1])) ) {
|
|
|
|
dvz[0] = dvec2[-4];
|
|
|
|
dvz[1] = dvec2[-3];
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
if (x != xsize) {
|
|
|
|
if (dvec1[0] != 0.0f || dvec1[1] != 0.0f) {
|
|
|
|
if (div == 0) {
|
|
|
|
dvz[0] = dvec1[0];
|
|
|
|
dvz[1] = dvec1[1];
|
2018-04-12 10:27:38 +02:00
|
|
|
div++;
|
|
|
|
}
|
2018-04-14 22:26:12 +02:00
|
|
|
else if ( (ABS(dvec1[0]) + ABS(dvec1[1])) < (ABS(dvz[0]) + ABS(dvz[1])) ) {
|
|
|
|
dvz[0] = dvec1[0];
|
|
|
|
dvz[1] = dvec1[1];
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
}
|
2018-04-14 22:26:12 +02:00
|
|
|
if (dvec2[0] != 0.0f || dvec2[1] != 0.0f) {
|
|
|
|
if (div == 0) {
|
|
|
|
dvz[0] = dvec2[0];
|
|
|
|
dvz[1] = dvec2[1];
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
2018-04-14 22:26:12 +02:00
|
|
|
else if ( (ABS(dvec2[0]) + ABS(dvec2[1])) < (ABS(dvz[0]) + ABS(dvz[1])) ) {
|
|
|
|
dvz[0] = dvec2[0];
|
|
|
|
dvz[1] = dvec2[1];
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (maxspeed) {
|
2018-04-14 22:26:12 +02:00
|
|
|
float speedsq = dvz[0] * dvz[0] + dvz[1] * dvz[1];
|
2018-04-12 10:27:38 +02:00
|
|
|
if (speedsq > maxspeedsq) {
|
|
|
|
speedsq = (float)maxspeed / sqrtf(speedsq);
|
2018-04-14 22:26:12 +02:00
|
|
|
dvz[0] *= speedsq;
|
|
|
|
dvz[1] *= speedsq;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* set border speeds to keep border speeds on border */
|
2018-04-14 22:26:12 +02:00
|
|
|
dz1 = rectvz;
|
|
|
|
dz2 = rectvz + 4 * (ysize) * (xsize + 1);
|
|
|
|
for (x = 0; x <= xsize; x++, dz1 += 4, dz2 += 4) {
|
|
|
|
dz1[1] = 0.0f;
|
|
|
|
dz2[1] = 0.0f;
|
|
|
|
dz1[3] = 0.0f;
|
|
|
|
dz2[3] = 0.0f;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
2018-04-14 22:26:12 +02:00
|
|
|
dz1 = rectvz;
|
|
|
|
dz2 = rectvz + 4 * (xsize);
|
|
|
|
for (y = 0; y <= ysize; y++, dz1 += 4 * (xsize + 1), dz2 += 4 * (xsize + 1)) {
|
|
|
|
dz1[0] = 0.0f;
|
|
|
|
dz2[0] = 0.0f;
|
|
|
|
dz1[2] = 0.0f;
|
|
|
|
dz2[2] = 0.0f;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* tag moving pixels, only these faces we draw */
|
2018-04-14 22:26:12 +02:00
|
|
|
dm = rectmove;
|
|
|
|
dvec1 = vecbufrect;
|
|
|
|
for (x = xsize * ysize; x > 0; x--, dm++, dvec1 += 4) {
|
|
|
|
if ((dvec1[0] != 0.0f || dvec1[1] != 0.0f || dvec1[2] != 0.0f || dvec1[3] != 0.0f))
|
|
|
|
*dm = 255;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
antialias_tagbuf(xsize, ysize, rectmove);
|
|
|
|
|
|
|
|
/* has to become static, the init-jit calls a random-seed, screwing up texture noise node */
|
|
|
|
if (firsttime) {
|
2018-04-14 22:26:12 +02:00
|
|
|
firsttime = 0;
|
2018-04-12 10:27:38 +02:00
|
|
|
BLI_jitter_init(jit, 256);
|
|
|
|
}
|
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
memset(newrect, 0, sizeof(float) * xsize * ysize * 4);
|
2018-04-12 10:27:38 +02:00
|
|
|
|
|
|
|
/* accumulate */
|
2018-04-14 22:26:12 +02:00
|
|
|
samples /= 2;
|
|
|
|
for (step = 1; step <= samples; step++) {
|
|
|
|
float speedfac = 0.5f * nbd->fac * (float)step / (float)(samples + 1);
|
2018-04-12 10:27:38 +02:00
|
|
|
int side;
|
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
for (side = 0; side < 2; side++) {
|
2018-04-12 10:27:38 +02:00
|
|
|
float blendfac, ipodata[4];
|
|
|
|
|
|
|
|
/* clear zbuf, if we draw future we fill in not moving pixels */
|
|
|
|
if (0)
|
2018-04-14 22:26:12 +02:00
|
|
|
for (x = xsize * ysize - 1; x >= 0; x--) rectz[x] = 10e16;
|
2018-04-12 10:27:38 +02:00
|
|
|
else
|
2018-04-14 22:26:12 +02:00
|
|
|
for (x = xsize * ysize - 1; x >= 0; x--) {
|
|
|
|
if (rectmove[x] == 0)
|
|
|
|
rectz[x] = zbufrect[x];
|
2018-04-12 10:27:38 +02:00
|
|
|
else
|
2018-04-14 22:26:12 +02:00
|
|
|
rectz[x] = 10e16;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* clear drawing buffer */
|
2018-04-14 22:26:12 +02:00
|
|
|
for (x = xsize * ysize - 1; x >= 0; x--) rectdraw[x].colpoin = NULL;
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
dimg = imgrect;
|
|
|
|
dm = rectmove;
|
|
|
|
dz = zbufrect;
|
|
|
|
dz1 = rectvz;
|
|
|
|
dz2 = rectvz + 4 * (xsize + 1);
|
2018-04-12 10:27:38 +02:00
|
|
|
|
|
|
|
if (side) {
|
2018-04-14 22:26:12 +02:00
|
|
|
if (nbd->curved == 0) {
|
|
|
|
dz1 += 2;
|
|
|
|
dz2 += 2;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
2018-04-14 22:26:12 +02:00
|
|
|
speedfac = -speedfac;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
set_quad_bezier_ipo(0.5f + 0.5f * speedfac, ipodata);
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
for (fy = -0.5f + jit[step & 255][0], y = 0; y < ysize; y++, fy += 1.0f) {
|
|
|
|
for (fx = -0.5f + jit[step & 255][1], x = 0; x < xsize; x++, fx += 1.0f, dimg += 4, dz1 += 4, dz2 += 4, dm++, dz++) {
|
|
|
|
if (*dm > 1) {
|
2018-04-12 10:27:38 +02:00
|
|
|
float jfx = fx + 0.5f;
|
|
|
|
float jfy = fy + 0.5f;
|
|
|
|
DrawBufPixel col;
|
|
|
|
|
|
|
|
/* make vertices */
|
2018-04-14 22:26:12 +02:00
|
|
|
if (nbd->curved) { /* curved */
|
|
|
|
quad_bezier_2d(v1, dz1, dz1 + 2, ipodata);
|
|
|
|
v1[0] += jfx; v1[1] += jfy; v1[2] = *dz;
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
quad_bezier_2d(v2, dz1 + 4, dz1 + 4 + 2, ipodata);
|
|
|
|
v2[0] += jfx + 1.0f; v2[1] += jfy; v2[2] = *dz;
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
quad_bezier_2d(v3, dz2 + 4, dz2 + 4 + 2, ipodata);
|
|
|
|
v3[0] += jfx + 1.0f; v3[1] += jfy + 1.0f; v3[2] = *dz;
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
quad_bezier_2d(v4, dz2, dz2 + 2, ipodata);
|
|
|
|
v4[0] += jfx; v4[1] += jfy + 1.0f; v4[2] = *dz;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
else {
|
2018-04-14 22:26:12 +02:00
|
|
|
ARRAY_SET_ITEMS(v1, speedfac * dz1[0] + jfx, speedfac * dz1[1] + jfy, *dz);
|
|
|
|
ARRAY_SET_ITEMS(v2, speedfac * dz1[4] + jfx + 1.0f, speedfac * dz1[5] + jfy, *dz);
|
|
|
|
ARRAY_SET_ITEMS(v3, speedfac * dz2[4] + jfx + 1.0f, speedfac * dz2[5] + jfy + 1.0f, *dz);
|
|
|
|
ARRAY_SET_ITEMS(v4, speedfac * dz2[0] + jfx, speedfac * dz2[1] + jfy + 1.0f, *dz);
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
2018-04-14 22:26:12 +02:00
|
|
|
if (*dm == 255) col.alpha = 1.0f;
|
|
|
|
else if (*dm < 2) col.alpha = 0.0f;
|
|
|
|
else col.alpha = ((float)*dm) / 255.0f;
|
|
|
|
col.colpoin = dimg;
|
2018-04-12 10:27:38 +02:00
|
|
|
|
|
|
|
zbuf_fill_in_rgba(&zspan, &col, v1, v2, v3, v4);
|
|
|
|
}
|
|
|
|
}
|
2018-04-14 22:26:12 +02:00
|
|
|
dz1 += 4;
|
|
|
|
dz2 += 4;
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* blend with a falloff. this fixes the ugly effect you get with
|
|
|
|
* a fast moving object. then it looks like a solid object overlayed
|
|
|
|
* over a very transparent moving version of itself. in reality, the
|
|
|
|
* whole object should become transparent if it is moving fast, be
|
|
|
|
* we don't know what is behind it so we don't do that. this hack
|
|
|
|
* overestimates the contribution of foreground pixels but looks a
|
|
|
|
* bit better without a sudden cutoff. */
|
2018-04-14 22:26:12 +02:00
|
|
|
blendfac = ((samples - step) / (float)samples);
|
2018-04-12 10:27:38 +02:00
|
|
|
/* smoothstep to make it look a bit nicer as well */
|
2018-04-14 22:26:12 +02:00
|
|
|
blendfac = 3.0f * pow(blendfac, 2.0f) - 2.0f * pow(blendfac, 3.0f);
|
2018-04-12 10:27:38 +02:00
|
|
|
|
|
|
|
/* accum */
|
2018-04-14 22:26:12 +02:00
|
|
|
rw = rectweight;
|
|
|
|
rm = rectmax;
|
|
|
|
for (dr = rectdraw, dz2 = newrect, x = xsize * ysize - 1; x >= 0; x--, dr++, dz2 += 4, rw++, rm++) {
|
2018-04-12 10:27:38 +02:00
|
|
|
if (dr->colpoin) {
|
2018-04-14 22:26:12 +02:00
|
|
|
float bfac = dr->alpha * blendfac;
|
2018-04-12 10:27:38 +02:00
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
dz2[0] += bfac * dr->colpoin[0];
|
|
|
|
dz2[1] += bfac * dr->colpoin[1];
|
|
|
|
dz2[2] += bfac * dr->colpoin[2];
|
|
|
|
dz2[3] += bfac * dr->colpoin[3];
|
2018-04-12 10:27:38 +02:00
|
|
|
|
|
|
|
*rw += bfac;
|
2018-04-14 22:26:12 +02:00
|
|
|
*rm = MAX2(*rm, bfac);
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* blend between original images and accumulated image */
|
2018-04-14 22:26:12 +02:00
|
|
|
rw = rectweight;
|
|
|
|
rm = rectmax;
|
|
|
|
ro = imgrect;
|
|
|
|
dm = rectmove;
|
|
|
|
for (dz2 = newrect, x = xsize * ysize - 1; x >= 0; x--, dz2 += 4, ro += 4, rw++, rm++, dm++) {
|
2018-04-12 10:27:38 +02:00
|
|
|
float mfac = *rm;
|
2018-04-14 22:26:12 +02:00
|
|
|
float fac = (*rw == 0.0f) ? 0.0f : mfac / (*rw);
|
2018-04-12 10:27:38 +02:00
|
|
|
float nfac = 1.0f - mfac;
|
|
|
|
|
2018-04-14 22:26:12 +02:00
|
|
|
dz2[0] = fac * dz2[0] + nfac * ro[0];
|
|
|
|
dz2[1] = fac * dz2[1] + nfac * ro[1];
|
|
|
|
dz2[2] = fac * dz2[2] + nfac * ro[2];
|
|
|
|
dz2[3] = fac * dz2[3] + nfac * ro[3];
|
2018-04-12 10:27:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
MEM_freeN(rectz);
|
|
|
|
MEM_freeN(rectmove);
|
|
|
|
MEM_freeN(rectdraw);
|
|
|
|
MEM_freeN(rectvz);
|
|
|
|
MEM_freeN(rectweight);
|
|
|
|
MEM_freeN(rectmax);
|
|
|
|
if (minvecbufrect) MEM_freeN(vecbufrect); /* rects were swapped! */
|
|
|
|
zbuf_free_span(&zspan);
|
|
|
|
}
|