Author: post
Date: 2010-04-01 11:19:34 +0200 (Thu, 01 Apr 2010)
New Revision: 3284

Modified:
   trunk/plugins/denoise/complexblock.cpp
   trunk/plugins/denoise/complexblock.h
   trunk/plugins/denoise/complexfilter-x86.cpp
   trunk/plugins/denoise/complexfilter.cpp
   trunk/plugins/denoise/complexfilter.h
   trunk/plugins/denoise/denoiseinterface.h
   trunk/plugins/denoise/denoisethread.cpp
   trunk/plugins/denoise/denoisethread.h
   trunk/plugins/denoise/fftdenoiser.cpp
   trunk/plugins/denoise/fftdenoiser.h
   trunk/plugins/denoise/fftdenoiseryuv.cpp
   trunk/plugins/denoise/fftdenoiseryuv.h
   trunk/plugins/denoise/fftwindow.cpp
   trunk/plugins/denoise/fftwindow.h
   trunk/plugins/denoise/floatimageplane.cpp
   trunk/plugins/denoise/floatimageplane.h
   trunk/plugins/denoise/floatplanarimage-x86.cpp
   trunk/plugins/denoise/floatplanarimage.cpp
   trunk/plugins/denoise/floatplanarimage.h
   trunk/plugins/denoise/jobqueue.cpp
   trunk/plugins/denoise/jobqueue.h
   trunk/plugins/denoise/planarimageslice.cpp
   trunk/plugins/denoise/planarimageslice.h
Log:
Put Denoiser into Rawstudio::FFTFilter namespace for cleaner separation.

Modified: trunk/plugins/denoise/complexblock.cpp
===================================================================
--- trunk/plugins/denoise/complexblock.cpp      2010-04-01 09:11:45 UTC (rev 
3283)
+++ trunk/plugins/denoise/complexblock.cpp      2010-04-01 09:19:34 UTC (rev 
3284)
@@ -21,6 +21,8 @@
 #include <math.h>
 #include "floatimageplane.h"
 
+namespace RawStudio {
+namespace FFTFilter {
 
 ComplexBlock::ComplexBlock(int _w, int _h): w(_w), h(_h)
 {
@@ -38,3 +40,4 @@
   delete temp;
 }
 
+}}// namespace RawStudio::FFTFilter

Modified: trunk/plugins/denoise/complexblock.h
===================================================================
--- trunk/plugins/denoise/complexblock.h        2010-04-01 09:11:45 UTC (rev 
3283)
+++ trunk/plugins/denoise/complexblock.h        2010-04-01 09:19:34 UTC (rev 
3284)
@@ -22,6 +22,9 @@
 #include "fftw3.h"
 #include <rawstudio.h>
 
+namespace RawStudio {
+namespace FFTFilter {
+
 class FloatImagePlane;
 
 class ComplexBlock
@@ -36,4 +39,7 @@
 private:
   int pitch;
 };
+
+}} // namespace RawStudio::FFTFilter
+
 #endif // complexblock_h__

Modified: trunk/plugins/denoise/complexfilter-x86.cpp
===================================================================
--- trunk/plugins/denoise/complexfilter-x86.cpp 2010-04-01 09:11:45 UTC (rev 
3283)
+++ trunk/plugins/denoise/complexfilter-x86.cpp 2010-04-01 09:19:34 UTC (rev 
3284)
@@ -21,6 +21,8 @@
 #include <math.h>
 #include "fftwindow.h"
 
+namespace RawStudio {
+namespace FFTFilter {
 
 #if defined (__i386__) || defined (__x86_64__)
 
@@ -948,3 +950,4 @@
 
 #endif // defined (__i386__) || defined (__x86_64__)
 
+}}// namespace RawStudio::FFTFilter

Modified: trunk/plugins/denoise/complexfilter.cpp
===================================================================
--- trunk/plugins/denoise/complexfilter.cpp     2010-04-01 09:11:45 UTC (rev 
3283)
+++ trunk/plugins/denoise/complexfilter.cpp     2010-04-01 09:19:34 UTC (rev 
3284)
@@ -35,6 +35,10 @@
 #define MAX(x,y) ((x) > (y) ? (x) : (y))
 #endif
 
+namespace RawStudio {
+namespace FFTFilter {
+
+
  /**** BASE CLASS *****/
 
 ComplexFilter::ComplexFilter( int block_width, int block_height ) : 
@@ -473,3 +477,5 @@
     gridsample += bw;
   }
 }
+
+}}// namespace RawStudio::FFTFilter

Modified: trunk/plugins/denoise/complexfilter.h
===================================================================
--- trunk/plugins/denoise/complexfilter.h       2010-04-01 09:11:45 UTC (rev 
3283)
+++ trunk/plugins/denoise/complexfilter.h       2010-04-01 09:19:34 UTC (rev 
3284)
@@ -22,6 +22,9 @@
 #include "complexblock.h"
 #include "floatimageplane.h"
 
+namespace RawStudio {
+namespace FFTFilter {
+
 class FFTWindow;
 
 class ComplexFilter
@@ -120,4 +123,6 @@
   FloatImagePlane *pattern;
 };
 
+}} // namespace RawStudio::FFTFilter
+
 #endif // complexfilter_h__

Modified: trunk/plugins/denoise/denoiseinterface.h
===================================================================
--- trunk/plugins/denoise/denoiseinterface.h    2010-04-01 09:11:45 UTC (rev 
3283)
+++ trunk/plugins/denoise/denoiseinterface.h    2010-04-01 09:19:34 UTC (rev 
3284)
@@ -21,6 +21,7 @@
 #define denoiseinterface_h__
 #include <rawstudio.h>
 
+
 #ifdef _unix_
 G_BEGIN_DECLS
 #endif
@@ -68,4 +69,7 @@
 #ifdef __cplusplus /* If this is a C++ compiler, end C linkage */
 }
 #endif
+
+
+
 #endif // denoiseinterface_h__

Modified: trunk/plugins/denoise/denoisethread.cpp
===================================================================
--- trunk/plugins/denoise/denoisethread.cpp     2010-04-01 09:11:45 UTC (rev 
3283)
+++ trunk/plugins/denoise/denoisethread.cpp     2010-04-01 09:19:34 UTC (rev 
3284)
@@ -23,6 +23,9 @@
 #include "fftwindow.h"
 #include "floatplanarimage.h"
 
+namespace RawStudio {
+namespace FFTFilter {
+
 void *StartDenoiseThread(void *_this) {
   DenoiseThread *d = (DenoiseThread*)_this;
   d->threadExited = false;
@@ -154,4 +157,6 @@
   j->outPlane->applySlice(j->p);
 
 }
+
+}}// namespace RawStudio::FFTFilter
  
\ No newline at end of file

Modified: trunk/plugins/denoise/denoisethread.h
===================================================================
--- trunk/plugins/denoise/denoisethread.h       2010-04-01 09:11:45 UTC (rev 
3283)
+++ trunk/plugins/denoise/denoisethread.h       2010-04-01 09:19:34 UTC (rev 
3284)
@@ -26,6 +26,9 @@
 #include "complexblock.h"
 #include "floatimageplane.h"
 
+namespace RawStudio {
+namespace FFTFilter {
+
 class DenoiseThread
 {
 public:
@@ -49,4 +52,7 @@
   void procesFFT(FFTJob* job);
 
 };
+
+}} // namespace RawStudio::FFTFilter
+
 #endif // denoisethread_h__

Modified: trunk/plugins/denoise/fftdenoiser.cpp
===================================================================
--- trunk/plugins/denoise/fftdenoiser.cpp       2010-04-01 09:11:45 UTC (rev 
3283)
+++ trunk/plugins/denoise/fftdenoiser.cpp       2010-04-01 09:19:34 UTC (rev 
3284)
@@ -25,6 +25,10 @@
 int rs_get_number_of_processor_cores(){return 4;}
 #endif
 
+namespace RawStudio {
+namespace FFTFilter {
+
+
 FFTDenoiser::FFTDenoiser(void)
 {
   nThreads = rs_get_number_of_processor_cores();
@@ -177,20 +181,20 @@
   sharpenMaxSigma = info->sharpenMaxSigmaLuma*SIGMA_FACTOR;
 }
 
+}}// namespace RawStudio::FFTFilter
 
-
 extern "C" {
 
   /** INTERFACE **/
 
   void initDenoiser(FFTDenoiseInfo* info) {
-    FFTDenoiser *t;
+    RawStudio::FFTFilter::FFTDenoiser *t;
     switch (info->processMode) {
     case PROCESS_RGB:
-      t = new FFTDenoiser();
+      t = new RawStudio::FFTFilter::FFTDenoiser();
       break;
     case PROCESS_YUV:
-      t = new FFTDenoiserYUV();
+      t = new RawStudio::FFTFilter::FFTDenoiserYUV();
       break;
     default:
       g_assert(false);
@@ -214,20 +218,21 @@
   }
 
   void denoiseImage(FFTDenoiseInfo* info) {
-    FFTDenoiser *t = (FFTDenoiser*)info->_this;  
+    RawStudio::FFTFilter::FFTDenoiser *t = 
(RawStudio::FFTFilter::FFTDenoiser*)info->_this;  
     t->abort = false;
     t->setParameters(info);
     t->denoiseImage(info->image);
   }
 
   void destroyDenoiser(FFTDenoiseInfo* info) {
-    FFTDenoiser *t = (FFTDenoiser*)info->_this;  
+    RawStudio::FFTFilter::FFTDenoiser *t = 
(RawStudio::FFTFilter::FFTDenoiser*)info->_this;  
     delete t;
   }
 
   void abortDenoiser(FFTDenoiseInfo* info) {
-    FFTDenoiser *t = (FFTDenoiser*)info->_this;
+    RawStudio::FFTFilter::FFTDenoiser *t = 
(RawStudio::FFTFilter::FFTDenoiser*)info->_this;
     t->abort = true;
   }
 
 } // extern "C"
+

Modified: trunk/plugins/denoise/fftdenoiser.h
===================================================================
--- trunk/plugins/denoise/fftdenoiser.h 2010-04-01 09:11:45 UTC (rev 3283)
+++ trunk/plugins/denoise/fftdenoiser.h 2010-04-01 09:19:34 UTC (rev 3284)
@@ -24,9 +24,13 @@
 #include "denoisethread.h"
 #include "denoiseinterface.h"
 
+namespace RawStudio {
+namespace FFTFilter {
+
 #define FFT_BLOCK_SIZE 128       // Preferable able to be factorized into 
primes, must be divideable by 4.
 #define FFT_BLOCK_OVERLAP 24    // Must be dividable by 4 (OVERLAP * 2 must be 
< SIZE)
 #define SIGMA_FACTOR 0.25f;    // Amount to multiply sigma by to give 
reasonable amount
+
 class FFTDenoiser
 {
 public:
@@ -50,4 +54,7 @@
   float sharpenMinSigma;  
   float sharpenMaxSigma;
 };
+
+}} // namespace RawStudio::FFTFilter
+
 #endif // fftdenoiser_h__

Modified: trunk/plugins/denoise/fftdenoiseryuv.cpp
===================================================================
--- trunk/plugins/denoise/fftdenoiseryuv.cpp    2010-04-01 09:11:45 UTC (rev 
3283)
+++ trunk/plugins/denoise/fftdenoiseryuv.cpp    2010-04-01 09:19:34 UTC (rev 
3284)
@@ -20,6 +20,9 @@
 #include "fftdenoiseryuv.h"
 #include <math.h>
 
+namespace RawStudio {
+namespace FFTFilter {
+
 FFTDenoiserYUV::FFTDenoiserYUV(void)
 {
 }
@@ -93,5 +96,6 @@
   sharpenMaxSigmaChroma = info->sharpenMaxSigmaChroma*SIGMA_FACTOR;
   redCorrection = info->redCorrection;
   blueCorrection = info->blueCorrection;
+}
 
-}
\ No newline at end of file
+}}// namespace RawStudio::FFTFilter

Modified: trunk/plugins/denoise/fftdenoiseryuv.h
===================================================================
--- trunk/plugins/denoise/fftdenoiseryuv.h      2010-04-01 09:11:45 UTC (rev 
3283)
+++ trunk/plugins/denoise/fftdenoiseryuv.h      2010-04-01 09:19:34 UTC (rev 
3284)
@@ -22,6 +22,9 @@
 
 #include "fftdenoiser.h"
 
+namespace RawStudio {
+namespace FFTFilter {
+
 class FFTDenoiserYUV :
   public FFTDenoiser
 {
@@ -40,4 +43,7 @@
   float redCorrection;
   float blueCorrection;
 };
+
+}} // namespace RawStudio::FFTFilter
+
 #endif // fftdenoiseryuv_h__

Modified: trunk/plugins/denoise/fftwindow.cpp
===================================================================
--- trunk/plugins/denoise/fftwindow.cpp 2010-04-01 09:11:45 UTC (rev 3283)
+++ trunk/plugins/denoise/fftwindow.cpp 2010-04-01 09:19:34 UTC (rev 3284)
@@ -25,7 +25,10 @@
 
 #define PI_F 3.14159265358979323846f
 
+namespace RawStudio {
+namespace FFTFilter {
 
+
 FFTWindow::FFTWindow( int _w, int _h ) : 
 analysis(FloatImagePlane(_w, _h)), 
 synthesis(FloatImagePlane(_w,_h))
@@ -246,4 +249,6 @@
       srcp1[x] *= srcp2[x];
     }
   }
-}
\ No newline at end of file
+}
+
+}}// namespace RawStudio::FFTFilter

Modified: trunk/plugins/denoise/fftwindow.h
===================================================================
--- trunk/plugins/denoise/fftwindow.h   2010-04-01 09:11:45 UTC (rev 3283)
+++ trunk/plugins/denoise/fftwindow.h   2010-04-01 09:19:34 UTC (rev 3284)
@@ -21,6 +21,8 @@
 #define fftwindow_h__
 #include "floatimageplane.h"
 
+namespace RawStudio {
+namespace FFTFilter {
 
 class FFTWindow
 {
@@ -42,4 +44,6 @@
   bool SSEAvailable;
 };
 
+}} // namespace RawStudio::FFTFilter
+
 #endif // fftwindow_h__

Modified: trunk/plugins/denoise/floatimageplane.cpp
===================================================================
--- trunk/plugins/denoise/floatimageplane.cpp   2010-04-01 09:11:45 UTC (rev 
3283)
+++ trunk/plugins/denoise/floatimageplane.cpp   2010-04-01 09:19:34 UTC (rev 
3284)
@@ -21,6 +21,9 @@
 #include "fftw3.h"
 #include <string.h>
 
+namespace RawStudio {
+namespace FFTFilter {
+
 FloatImagePlane::FloatImagePlane( int _w, int _h, int _plane_id ) :
 w(_w), h(_h), data(0), plane_id(_plane_id), filter(0), window(0), pitch(0), 
allocated(0)
 {
@@ -194,3 +197,4 @@
   }
 }
 
+}}// namespace RawStudio::FFTFilter

Modified: trunk/plugins/denoise/floatimageplane.h
===================================================================
--- trunk/plugins/denoise/floatimageplane.h     2010-04-01 09:11:45 UTC (rev 
3283)
+++ trunk/plugins/denoise/floatimageplane.h     2010-04-01 09:19:34 UTC (rev 
3284)
@@ -24,7 +24,10 @@
 #include <vector>
 #include "complexfilter.h"
 
+namespace RawStudio {
+namespace FFTFilter {
 
+
 using namespace std;
 class FFTWindow;
 
@@ -56,4 +59,6 @@
 
 void FBitBlt(guchar* dstp, int dst_pitch, const guchar* srcp, int src_pitch, 
int row_size, int height);
 
+}} // namespace RawStudio::FFTFilter
+
 #endif // imageplane_h__

Modified: trunk/plugins/denoise/floatplanarimage-x86.cpp
===================================================================
--- trunk/plugins/denoise/floatplanarimage-x86.cpp      2010-04-01 09:11:45 UTC 
(rev 3283)
+++ trunk/plugins/denoise/floatplanarimage-x86.cpp      2010-04-01 09:19:34 UTC 
(rev 3284)
@@ -19,6 +19,9 @@
 
 #include "floatplanarimage.h"
 
+namespace RawStudio {
+namespace FFTFilter {
+
 #if defined (__i386__) || defined (__x86_64__)
 
 #if defined (__x86_64__)
@@ -418,3 +421,5 @@
 #endif
 
 #endif // defined (__i386__) || defined (__x86_64__)
+
+}}// namespace RawStudio::FFTFilter

Modified: trunk/plugins/denoise/floatplanarimage.cpp
===================================================================
--- trunk/plugins/denoise/floatplanarimage.cpp  2010-04-01 09:11:45 UTC (rev 
3283)
+++ trunk/plugins/denoise/floatplanarimage.cpp  2010-04-01 09:19:34 UTC (rev 
3284)
@@ -21,6 +21,9 @@
 #include "complexfilter.h"
 #include <math.h>
 
+namespace RawStudio {
+namespace FFTFilter {
+
 float FloatPlanarImage::shortToFloat[65536*4] = {0};
 
 FloatPlanarImage::FloatPlanarImage(void) {
@@ -279,4 +282,5 @@
   }
 }
 
+}}// namespace RawStudio::FFTFilter
 

Modified: trunk/plugins/denoise/floatplanarimage.h
===================================================================
--- trunk/plugins/denoise/floatplanarimage.h    2010-04-01 09:11:45 UTC (rev 
3283)
+++ trunk/plugins/denoise/floatplanarimage.h    2010-04-01 09:19:34 UTC (rev 
3284)
@@ -23,6 +23,9 @@
 #include "jobqueue.h"
 #include "fftwindow.h"
 
+namespace RawStudio {
+namespace FFTFilter {
+
 // A container and utility class
 
 #define WB_R_CORR 2.4150f
@@ -68,6 +71,9 @@
   static void initConvTable();
   static float shortToFloat[65536*4];
 };
+
+}} // namespace RawStudio::FFTFilter
+
 #endif // floatplanarimage_h__
 
 inline guint clampbits(gint x, guint n) { guint32 _y_temp; if( (_y_temp=x>>n) 
) x = ~_y_temp >> (32-n); return x;}

Modified: trunk/plugins/denoise/jobqueue.cpp
===================================================================
--- trunk/plugins/denoise/jobqueue.cpp  2010-04-01 09:11:45 UTC (rev 3283)
+++ trunk/plugins/denoise/jobqueue.cpp  2010-04-01 09:19:34 UTC (rev 3284)
@@ -20,6 +20,9 @@
 #include "jobqueue.h"
 #include "floatplanarimage.h"
 
+namespace RawStudio {
+namespace FFTFilter {
+
 FFTJob::FFTJob( PlanarImageSlice *s ) : Job(JOB_FFT), p(s) {
 }
 
@@ -128,4 +131,5 @@
   return n;
 }
 
+}}// namespace RawStudio::FFTFilter
 

Modified: trunk/plugins/denoise/jobqueue.h
===================================================================
--- trunk/plugins/denoise/jobqueue.h    2010-04-01 09:11:45 UTC (rev 3283)
+++ trunk/plugins/denoise/jobqueue.h    2010-04-01 09:19:34 UTC (rev 3284)
@@ -24,6 +24,9 @@
 #include "planarimageslice.h"
 #include "pthread.h"
 
+namespace RawStudio {
+namespace FFTFilter {
+
 class FloatPlanarImage;
 using namespace std;
 typedef enum {
@@ -77,4 +80,7 @@
   pthread_mutex_t job_mutex;
   pthread_cond_t job_added_notify;
 };
+
+}} // namespace RawStudio::FFTFilter
+
 #endif // jobqueue_h__

Modified: trunk/plugins/denoise/planarimageslice.cpp
===================================================================
--- trunk/plugins/denoise/planarimageslice.cpp  2010-04-01 09:11:45 UTC (rev 
3283)
+++ trunk/plugins/denoise/planarimageslice.cpp  2010-04-01 09:19:34 UTC (rev 
3284)
@@ -20,6 +20,9 @@
 #include "planarimageslice.h"
 #include "floatimageplane.h"
 
+namespace RawStudio {
+namespace FFTFilter {
+
 PlanarImageSlice::PlanarImageSlice(void)
 {
   filter = 0;
@@ -52,3 +55,5 @@
   blockSkipped = false;
   ownAlloc = true;
 }
+
+}}// namespace RawStudio::FFTFilter

Modified: trunk/plugins/denoise/planarimageslice.h
===================================================================
--- trunk/plugins/denoise/planarimageslice.h    2010-04-01 09:11:45 UTC (rev 
3283)
+++ trunk/plugins/denoise/planarimageslice.h    2010-04-01 09:19:34 UTC (rev 
3284)
@@ -21,7 +21,10 @@
 #define planarimageslice_h__
 #include <rawstudio.h>
 
+namespace RawStudio {
+namespace FFTFilter {
 
+
 class FloatImagePlane;
 class ComplexFilter;
 class FFTWindow;
@@ -45,4 +48,6 @@
   FFTWindow *window;
 };
 
+}} // namespace RawStudio::FFTFilter
+
 #endif // planarimageslice_h__


_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit

Reply via email to