[Bf-blender-cvs] [8f4818c] experimental-build: Revert "Squashed soc-2016-cycles_denoising branch, second version (state da59443ed985)"
Lukas Stockner
noreply at git.blender.org
Tue Aug 23 23:03:48 CEST 2016
Commit: 8f4818c6f7676dbe856282593a24ade1f9c5c05a
Author: Lukas Stockner
Date: Tue Aug 23 23:03:45 2016 +0200
Branches: experimental-build
https://developer.blender.org/rB8f4818c6f7676dbe856282593a24ade1f9c5c05a
Revert "Squashed soc-2016-cycles_denoising branch, second version (state da59443ed985)"
This reverts commit ec96ba5c39e57aecbaf9f554cc43b01cf405ac9d.
===================================================================
M CMakeLists.txt
M intern/cycles/CMakeLists.txt
M intern/cycles/app/CMakeLists.txt
D intern/cycles/app/cycles_denoising.cpp
D intern/cycles/app/cycles_denoising.h
M intern/cycles/app/cycles_standalone.cpp
D intern/cycles/app/cycles_standalone.h
M intern/cycles/blender/addon/__init__.py
M intern/cycles/blender/addon/engine.py
M intern/cycles/blender/addon/ui.py
M intern/cycles/blender/blender_python.cpp
M intern/cycles/blender/blender_session.cpp
M intern/cycles/blender/blender_session.h
M intern/cycles/blender/blender_sync.cpp
M intern/cycles/blender/blender_sync.h
M intern/cycles/blender/blender_util.h
M intern/cycles/device/device_cpu.cpp
M intern/cycles/device/device_cuda.cpp
M intern/cycles/device/device_opencl.cpp
M intern/cycles/device/device_task.cpp
M intern/cycles/device/device_task.h
M intern/cycles/kernel/CMakeLists.txt
M intern/cycles/kernel/bvh/bvh.h
M intern/cycles/kernel/closure/bsdf_ashikhmin_velvet.h
M intern/cycles/kernel/closure/bsdf_diffuse.h
M intern/cycles/kernel/closure/bsdf_diffuse_ramp.h
M intern/cycles/kernel/closure/bsdf_microfacet.h
M intern/cycles/kernel/closure/bsdf_microfacet_multi.h
M intern/cycles/kernel/closure/bsdf_oren_nayar.h
M intern/cycles/kernel/closure/bsdf_phong_ramp.h
M intern/cycles/kernel/closure/bsdf_toon.h
M intern/cycles/kernel/closure/bssrdf.h
M intern/cycles/kernel/geom/geom_triangle.h
M intern/cycles/kernel/kernel_accumulate.h
M intern/cycles/kernel/kernel_bake.h
M intern/cycles/kernel/kernel_compat_cpu.h
M intern/cycles/kernel/kernel_compat_cuda.h
D intern/cycles/kernel/kernel_filter.h
D intern/cycles/kernel/kernel_filter_pre.h
D intern/cycles/kernel/kernel_filter_util.h
M intern/cycles/kernel/kernel_light.h
M intern/cycles/kernel/kernel_passes.h
M intern/cycles/kernel/kernel_path.h
M intern/cycles/kernel/kernel_path_branched.h
M intern/cycles/kernel/kernel_path_state.h
M intern/cycles/kernel/kernel_path_surface.h
M intern/cycles/kernel/kernel_projection.h
M intern/cycles/kernel/kernel_shader.h
M intern/cycles/kernel/kernel_types.h
M intern/cycles/kernel/kernels/cpu/kernel_cpu.h
M intern/cycles/kernel/kernels/cpu/kernel_cpu_impl.h
M intern/cycles/kernel/kernels/cuda/kernel.cu
M intern/cycles/kernel/svm/svm_closure.h
M intern/cycles/kernel/svm/svm_displace.h
M intern/cycles/kernel/svm/svm_image.h
M intern/cycles/kernel/svm/svm_types.h
M intern/cycles/render/buffers.cpp
M intern/cycles/render/buffers.h
M intern/cycles/render/film.cpp
M intern/cycles/render/film.h
M intern/cycles/render/integrator.cpp
M intern/cycles/render/integrator.h
M intern/cycles/render/mesh.cpp
M intern/cycles/render/session.cpp
M intern/cycles/render/session.h
M intern/cycles/render/tile.cpp
M intern/cycles/render/tile.h
M intern/cycles/util/util_debug.cpp
M intern/cycles/util/util_debug.h
D intern/cycles/util/util_math_matrix.h
M intern/cycles/util/util_simd.h
M intern/cycles/util/util_system.cpp
M intern/cycles/util/util_system.h
M intern/cycles/util/util_types.h
M release/scripts/startup/bl_ui/space_image.py
M source/blender/blenkernel/BKE_scene.h
M source/blender/blenkernel/intern/scene.c
M source/blender/blenloader/intern/versioning_270.c
M source/blender/editors/render/render_intern.h
M source/blender/editors/render/render_internal.c
M source/blender/editors/space_image/image_buttons.c
M source/blender/editors/space_image/image_intern.h
M source/blender/editors/space_image/image_ops.c
M source/blender/editors/space_image/space_image.c
M source/blender/makesdna/DNA_scene_types.h
M source/blender/makesrna/intern/rna_render.c
M source/blender/makesrna/intern/rna_scene.c
M source/blender/render/extern/include/RE_engine.h
M source/blender/render/extern/include/RE_pipeline.h
M source/blender/render/intern/include/render_result.h
M source/blender/render/intern/source/external_engine.c
M source/blender/render/intern/source/pipeline.c
M source/blender/render/intern/source/render_result.c
M source/blender/windowmanager/WM_api.h
M source/blenderplayer/bad_level_call_stubs/stubs.c
===================================================================
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7426afb..d7276f4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -405,14 +405,10 @@ mark_as_advanced(CYCLES_CUDA_BINARIES_ARCH)
unset(PLATFORM_DEFAULT)
option(WITH_CYCLES_LOGGING "Build Cycles with logging support" ON)
option(WITH_CYCLES_DEBUG "Build Cycles with extra debug capabilities" OFF)
-option(WITH_CYCLES_DEBUG_FILTER "Build Cycles with extra debug capabilities in the denoising filter" OFF)
option(WITH_CYCLES_NATIVE_ONLY "Build Cycles with native kernel only (which fits current CPU, use for development only)" OFF)
-option(WITH_CYCLES_DEBUG_FPE "Build Cycles with floating point exceptions enabled for easier debugging of numerical issues (only for CPU rendering)" OFF)
mark_as_advanced(WITH_CYCLES_LOGGING)
mark_as_advanced(WITH_CYCLES_DEBUG)
-mark_as_advanced(WITH_CYCLES_DEBUG_FILTER)
mark_as_advanced(WITH_CYCLES_NATIVE_ONLY)
-mark_as_advanced(WITH_CYCLES_DEBUG_FPE)
option(WITH_CUDA_DYNLOAD "Dynamically load CUDA libraries at runtime" ON)
mark_as_advanced(WITH_CUDA_DYNLOAD)
@@ -724,9 +720,6 @@ if(WITH_CYCLES)
if(WITH_CYCLES_OSL)
set(WITH_LLVM ON CACHE BOOL "" FORCE)
endif()
- if(WITH_CYCLES_DEBUG_FPE AND APPLE)
- message(FATAL_ERROR "WITH_CYCLES_DEBUG_FPE is not supported on OSX!")
- endif()
else()
set(WITH_CYCLES_OSL OFF)
endif()
diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt
index ea7d137..97854a8 100644
--- a/intern/cycles/CMakeLists.txt
+++ b/intern/cycles/CMakeLists.txt
@@ -109,10 +109,6 @@ if(CXX_HAS_AVX2)
add_definitions(-DWITH_KERNEL_AVX2)
endif()
-if(WITH_CYCLES_DEBUG_FPE)
- add_definitions(-DWITH_CYCLES_DEBUG_FPE)
-endif()
-
if(WITH_CYCLES_OSL)
if(WIN32 AND MSVC)
set(RTTI_DISABLE_FLAGS "/GR- -DBOOST_NO_RTTI -DBOOST_NO_TYPEID")
@@ -204,10 +200,6 @@ if(WITH_CYCLES_DEBUG)
add_definitions(-DWITH_CYCLES_DEBUG)
endif()
-if(WITH_CYCLES_DEBUG_FILTER)
- add_definitions(-DWITH_CYCLES_DEBUG_FILTER)
-endif()
-
include_directories(
SYSTEM
${BOOST_INCLUDE_DIR}
diff --git a/intern/cycles/app/CMakeLists.txt b/intern/cycles/app/CMakeLists.txt
index ff72bd7..8cd499b 100644
--- a/intern/cycles/app/CMakeLists.txt
+++ b/intern/cycles/app/CMakeLists.txt
@@ -107,11 +107,8 @@ endmacro()
if(WITH_CYCLES_STANDALONE)
set(SRC
cycles_standalone.cpp
- cycles_standalone.h
cycles_xml.cpp
cycles_xml.h
- cycles_denoising.cpp
- cycles_denoising.h
)
add_executable(cycles ${SRC})
cycles_target_link_libraries(cycles)
diff --git a/intern/cycles/app/cycles_denoising.cpp b/intern/cycles/app/cycles_denoising.cpp
deleted file mode 100644
index 3f6c611..0000000
--- a/intern/cycles/app/cycles_denoising.cpp
+++ /dev/null
@@ -1,282 +0,0 @@
-/*
- * Copyright 2016 Blender Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "cycles_denoising.h"
-
-#include "util_image.h"
-
-CCL_NAMESPACE_BEGIN
-
-typedef class PassTypeInfo
-{
-public:
- PassTypeInfo(DenoiseExtendedTypes type, int num_channels, string channels)
- : type(type), num_channels(num_channels), channels(channels) {}
- PassTypeInfo() : type(EX_TYPE_NONE), num_channels(0), channels("") {}
-
- DenoiseExtendedTypes type;
- int num_channels;
- string channels;
-
- bool operator<(const PassTypeInfo &other) const {
- return type < other.type;
- }
-} PassTypeInfo;
-
-static map<string, PassTypeInfo> denoise_passes_init()
-{
- map<string, PassTypeInfo> passes;
-
- passes["DenoiseNormal"] = PassTypeInfo(EX_TYPE_DENOISE_NORMAL, 3, "XYZ");
- passes["DenoiseNormalVar"] = PassTypeInfo(EX_TYPE_DENOISE_NORMAL_VAR, 3, "XYZ");
- passes["DenoiseAlbedo"] = PassTypeInfo(EX_TYPE_DENOISE_ALBEDO, 3, "RGB");
- passes["DenoiseAlbedoVar"] = PassTypeInfo(EX_TYPE_DENOISE_ALBEDO_VAR, 3, "RGB");
- passes["DenoiseDepth"] = PassTypeInfo(EX_TYPE_DENOISE_DEPTH, 1, "Z");
- passes["DenoiseDepthVar"] = PassTypeInfo(EX_TYPE_DENOISE_DEPTH_VAR, 1, "Z");
- passes["DenoiseShadowA"] = PassTypeInfo(EX_TYPE_DENOISE_SHADOW_A, 3, "RGB");
- passes["DenoiseShadowB"] = PassTypeInfo(EX_TYPE_DENOISE_SHADOW_B, 3, "RGB");
- passes["DenoiseNoisy"] = PassTypeInfo(EX_TYPE_DENOISE_NOISY, 3, "RGB");
- passes["DenoiseNoisyVar"] = PassTypeInfo(EX_TYPE_DENOISE_NOISY_VAR, 3, "RGB");
- passes["DenoiseClean"] = PassTypeInfo(EX_TYPE_DENOISE_CLEAN, 3, "RGB");
-
- return passes;
-}
-
-static map<string, PassTypeInfo> denoise_passes_map = denoise_passes_init();
-
-static bool split_channel(string full_channel, string &layer, string &pass, string &channel)
-{
- /* Splits channel name into <layer>.<pass>.<channel> */
- if(std::count(full_channel.begin(), full_channel.end(), '.') != 2) {
- return false;
- }
-
- int first_dot = full_channel.find(".");
- int second_dot = full_channel.rfind(".");
- layer = full_channel.substr(0, first_dot);
- pass = full_channel.substr(first_dot + 1, second_dot - first_dot - 1);
- channel = full_channel.substr(second_dot + 1);
-
- return true;
-}
-
-static int find_channel(string channels, string channel)
-{
- if(channel.length() != 1) return -1;
- size_t pos = channels.find(channel);
- if(pos == string::npos) return -1;
- return pos;
-}
-
-static RenderBuffers* load_frame(string file, Device *device, RenderBuffers *buffers, int framenum)
-{
- ImageInput *frame = ImageInput::open(file);
- if(!frame) {
- printf("ERROR: Frame %s: Couldn't open file!\n", file.c_str());
- delete buffers;
- return NULL;
- }
-
- const ImageSpec &spec = frame->spec();
-
- if(buffers) {
- if(spec.width != buffers->params.width || spec.height != buffers->params.height) {
- printf("ERROR: Frame %s: Has different size!\n", file.c_str());
- delete buffers;
- return NULL;
- }
- }
-
- /* Find a single RenderLayer to load. */
- string renderlayer = "";
- string layer, pass, channel;
- for(int i = 0; i < spec.nchannels; i++) {
- if(!split_channel(spec.channelnames[i], layer, pass, channel)) continue;
- if(pass == "DenoiseNoisy") {
- renderlayer = layer;
- break;
- }
- }
-
- if(renderlayer != "") {
- /* Find all passes that the frame contains. */
- int passes = EX_TYPE_NONE;
- map<DenoiseExtendedTypes, int> num_channels;
- map<PassTypeInfo, int3> channel_ids;
- for(int i = 0; i < spec.nchannels; i++) {
- if(!split_channel(spec.channelnames[i], layer, pass, channel)) continue;
- if(layer != renderlayer) {
- /* The channel belongs to another RenderLayer. */
- continue;
- }
- if(denoise_passes_map.count(pass)) {
- PassTypeInfo type = denoise_passes_map[pass];
- assert(type.num_channels <= 3);
- /* Pass was found, count the channels. */
- size_t channel_id = find_channel(type.channels, channel);
- if(channel_id != -1) {
- /* This channel is part of the pass, so count it. */
- num_channels[type.type]++;
- /* Remember which OIIO channel belongs to which pass. */
- channel_ids[type][channel_id] = i;
- if(num_channels[type.type] == type.num_channels) {
- /* We found all the channels of the pass! */
- passes |= type.type;
- }
- }
- }
- }
-
- /* The frame always needs to include all the required denoising passes.
- * If the primary frame also included a clean pass, all the secondary frames need to do so as well. */
- if((~passes & EX_TYPE_DENOISE_REQUIRED) == 0 && !(buffers && buffers->params.selective_denoising && !(passes & EX_TYPE_DENOISE_CLEAN))) {
- printf("Frame %s: Found all needed passes!\n", file.c_str());
-
- if(buffers == NULL) {
- BufferParams params;
- params.width = params.full_width = params.final_width = spec.width;
- params.height = params.full_height = params.final_height = spec.height;
- params.full_x = params.full_y = 0;
- params.denoising_passes = true;
- params.selective_denoising = (passes & EX_TYPE_DENOISE_CLEAN);
- params.frames = options.filepaths.size();
-
- buffers = new RenderBuffers(device);
- buffers->reset(device, params);
- }
-
- int4 rect = make_int4(0, 0, buffers->params.width, buffers->params.height);
- float *pass_data = new float[4*buffers->params.width*buffers->params.height];
-
- /* Read all the passes from the file. */
- for(map<PassTypeInfo, int3>::iterator i = channel_ids.begin(); i != channel_ids.end(); i++)
- {
- for(int c = 0; c < i->first.num_channels; c++) {
- int xstride = i->first.num_channels*sizeof(float);
- int ystride = spec.width * xstride;
- printf("Reading pass %s! \r", spec.channelnames[i->second[c]].c_str());
- fflush(stdout);
- frame->read_image(i->second[c], i->second[c]+1, TypeDesc::FLOAT, pass_data + c, xstride, ystride);
- }
- buffers->get_denoising_rect(i->first.type, 1.0f, options.session_params.samples, i->first.num_channels, rect, pass_data, true, framenum);
- }
-
- /* Read combined pass. */
- int read_combined = 0;
- for(int i = 0; i < spec.nchannels; i++) {
- if(!split_channel(spec.channelnames[i], layer, pass, channel)) continue;
- if(layer != renderlayer || pass != "Combined") continue;
-
- size_t channel_id = find_channel("RGBA", channel);
- if(channel_id != -1) {
- int xstride = 4*sizeof(float);
- int ystride = spec.width * xstride;
- printf("Reading pass %s! \n", spec.channelnames[i].c_str());
- fflush(stdout);
- frame->read_image(i, i+1, TypeDesc::FLOAT, pass_data + channel_id, xstride, ystride);
- read_combined++;
- }
- }
- if(read_combined < 4) {
- printf("ERROR: Frame %s: Missing combined pass!\n", file.c_str());
- delete buffers;
- delete[] pass_data;
- return NULL;
- }
-
- buffers->get_pass_rect(PASS_COMBINED, 1.0f, options.session_params.samples, 4, rect, pass_data, true, framenum);
-
- delete[] pass_data;
- }
- else {
- printf("ERR
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list