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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-02-14 22:00:37 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-02-14 22:00:37 +0300
commit7a41c1634ba8099f1b4b94570edf8df2cf87da7a (patch)
treefce5cf38de95ffe1df4d02108dfca8c7a960fb7c /intern/cycles/render
parent349357a7bdffcf82705598d3cfc203812dd6d9a3 (diff)
parentde0e456a6c7d6da065d275104bc2022b69874648 (diff)
Merge branch 'blender2.7'
Diffstat (limited to 'intern/cycles/render')
-rw-r--r--intern/cycles/render/denoising.cpp11
-rw-r--r--intern/cycles/render/denoising.h2
2 files changed, 5 insertions, 8 deletions
diff --git a/intern/cycles/render/denoising.cpp b/intern/cycles/render/denoising.cpp
index bbc9f61522c..2fceee09c78 100644
--- a/intern/cycles/render/denoising.cpp
+++ b/intern/cycles/render/denoising.cpp
@@ -536,8 +536,6 @@ void DenoiseTask::free()
DenoiseImage::DenoiseImage()
{
- in = NULL;
-
width = 0;
height = 0;
num_channels = 0;
@@ -552,7 +550,6 @@ DenoiseImage::~DenoiseImage()
void DenoiseImage::close_input()
{
in_neighbors.clear();
- in.reset();
}
void DenoiseImage::free()
@@ -662,13 +659,13 @@ bool DenoiseImage::load(const string& in_filepath, string& error)
return false;
}
- in.reset(ImageInput::open(in_filepath));
+ unique_ptr<ImageInput> in(ImageInput::open(in_filepath));
if(!in) {
error = "Couldn't open file: " + in_filepath;
return false;
}
- const ImageSpec &in_spec = in->spec();
+ in_spec = in->spec();
width = in_spec.width;
height = in_spec.height;
num_channels = in_spec.nchannels;
@@ -725,7 +722,7 @@ bool DenoiseImage::load_neighbors(const vector<string>& filepaths, const vector<
foreach(DenoiseImageLayer& layer, layers) {
if(!layer.match_channels(neighbor,
- in->spec().channelnames,
+ in_spec.channelnames,
neighbor_spec.channelnames))
{
error = "Neighbor frame misses denoising data passes: " + filepath;
@@ -742,7 +739,7 @@ bool DenoiseImage::load_neighbors(const vector<string>& filepaths, const vector<
bool DenoiseImage::save_output(const string& out_filepath, string& error)
{
/* Save image with identical dimensions, channels and metadata. */
- ImageSpec out_spec = in->spec();
+ ImageSpec out_spec = in_spec;
/* Ensure that the output frame contains sample information even if the input didn't. */
for(int i = 0; i < layers.size(); i++) {
diff --git a/intern/cycles/render/denoising.h b/intern/cycles/render/denoising.h
index 85a1c7d0391..5bf1a8dd0fa 100644
--- a/intern/cycles/render/denoising.h
+++ b/intern/cycles/render/denoising.h
@@ -117,7 +117,7 @@ public:
array<float> pixels;
/* Image file handles */
- unique_ptr<ImageInput> in;
+ ImageSpec in_spec;
vector<unique_ptr<ImageInput>> in_neighbors;
/* Render layers */