From 2ada3512a27eb66d05da669268dc3bb2cd0a1e16 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 27 Mar 2015 15:49:07 +0500 Subject: Compositor: Code cleanup, prepare for strict C++ flags --- source/blender/compositor/intern/COM_SocketReader.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'source/blender/compositor/intern/COM_SocketReader.h') diff --git a/source/blender/compositor/intern/COM_SocketReader.h b/source/blender/compositor/intern/COM_SocketReader.h index c996ef5bbeb..7ba208ebbf6 100644 --- a/source/blender/compositor/intern/COM_SocketReader.h +++ b/source/blender/compositor/intern/COM_SocketReader.h @@ -63,7 +63,10 @@ protected: * @param y the y-coordinate of the pixel to calculate in image space * @param inputBuffers chunks that can be read by their ReadBufferOperation. */ - virtual void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) {} + virtual void executePixelSampled(float /*output*/[4], + float /*x*/, + float /*y*/, + PixelSampler /*sampler*/) { } /** * @brief calculate a single pixel @@ -74,7 +77,7 @@ protected: * @param inputBuffers chunks that can be read by their ReadBufferOperation. * @param chunkData chunk specific data a during execution time. */ - virtual void executePixel(float output[4], int x, int y, void *chunkData) { + virtual void executePixel(float output[4], int x, int y, void * /*chunkData*/) { executePixelSampled(output, x, y, COM_PS_NEAREST); } @@ -88,7 +91,10 @@ protected: * @param dy * @param inputBuffers chunks that can be read by their ReadBufferOperation. */ - virtual void executePixelFiltered(float output[4], float x, float y, float dx[2], float dy[2], PixelSampler sampler) {} + virtual void executePixelFiltered(float /*output*/[4], + float /*x*/, float /*y*/, + float /*dx*/[2], float /*dy*/[2], + PixelSampler /*sampler*/) {} public: inline void readSampled(float result[4], float x, float y, PixelSampler sampler) { @@ -101,12 +107,12 @@ public: executePixelFiltered(result, x, y, dx, dy, sampler); } - virtual void *initializeTileData(rcti *rect) { return 0; } - virtual void deinitializeTileData(rcti *rect, void *data) {} + virtual void *initializeTileData(rcti * /*rect*/) { return 0; } + virtual void deinitializeTileData(rcti * /*rect*/, void * /*data*/) {} virtual ~SocketReader() {} - virtual MemoryBuffer *getInputMemoryBuffer(MemoryBuffer **memoryBuffers) { return 0; } + virtual MemoryBuffer *getInputMemoryBuffer(MemoryBuffer ** /*memoryBuffers*/) { return 0; } inline const unsigned int getWidth() const { return this->m_width; } inline const unsigned int getHeight() const { return this->m_height; } -- cgit v1.2.3 From 3ec81b814c995b585f19c97cf87fee5b7195382b Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 27 Aug 2015 18:50:40 +0200 Subject: Fix T45617: Map UV node produces image artifacts Basically filtering was happening twice, first time by applying weights of EWA filter itself and then by applying subpixel offset while reading pixel values. --- source/blender/compositor/intern/COM_SocketReader.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source/blender/compositor/intern/COM_SocketReader.h') diff --git a/source/blender/compositor/intern/COM_SocketReader.h b/source/blender/compositor/intern/COM_SocketReader.h index 7ba208ebbf6..ab8a3c06ef5 100644 --- a/source/blender/compositor/intern/COM_SocketReader.h +++ b/source/blender/compositor/intern/COM_SocketReader.h @@ -93,8 +93,7 @@ protected: */ virtual void executePixelFiltered(float /*output*/[4], float /*x*/, float /*y*/, - float /*dx*/[2], float /*dy*/[2], - PixelSampler /*sampler*/) {} + float /*dx*/[2], float /*dy*/[2]) {} public: inline void readSampled(float result[4], float x, float y, PixelSampler sampler) { @@ -103,8 +102,8 @@ public: inline void read(float result[4], int x, int y, void *chunkData) { executePixel(result, x, y, chunkData); } - inline void readFiltered(float result[4], float x, float y, float dx[2], float dy[2], PixelSampler sampler) { - executePixelFiltered(result, x, y, dx, dy, sampler); + inline void readFiltered(float result[4], float x, float y, float dx[2], float dy[2]) { + executePixelFiltered(result, x, y, dx, dy); } virtual void *initializeTileData(rcti * /*rect*/) { return 0; } -- cgit v1.2.3