Author: post
Date: 2010-01-24 15:31:18 +0100 (Sun, 24 Jan 2010)
New Revision: 3072

Added:
   
branches/rawstudio-ng-color/plugins/colorspace-transform/colorspace_transform.h
Modified:
   branches/rawstudio-ng-color/plugins/colorspace-transform/Makefile.am
   
branches/rawstudio-ng-color/plugins/colorspace-transform/colorspace_transform.c
   
branches/rawstudio-ng-color/plugins/colorspace-transform/colorspace_transform_sse2.c
Log:
CS Transform: Moved shared header into separate header file.

Modified: branches/rawstudio-ng-color/plugins/colorspace-transform/Makefile.am
===================================================================
--- branches/rawstudio-ng-color/plugins/colorspace-transform/Makefile.am        
2010-01-24 11:12:25 UTC (rev 3071)
+++ branches/rawstudio-ng-color/plugins/colorspace-transform/Makefile.am        
2010-01-24 14:31:18 UTC (rev 3072)
@@ -19,15 +19,15 @@
 
 colorspace_transform_la_LIBADD = @PACKAGE_LIBS@ colorspace_transform_sse2.lo 
rs-cmm.lo
 colorspace_transform_la_LDFLAGS = -module -avoid-version
-EXTRA_DIST = rs-cmm.c rs-cmm.h colorspace_transform_sse2.c
+EXTRA_DIST = rs-cmm.c rs-cmm.h colorspace_transform_sse2.c 
colorspace_transform.h
 
-colorspace_transform.lo: colorspace_transform.c
+colorspace_transform.lo: colorspace_transform.c colorspace_transform.h
        $(LTCOMPILE) -DEXIT_CODE=0 -c 
$(top_srcdir)/plugins/colorspace-transform/colorspace_transform.c
 
 rs-cmm.lo: rs-cmm.c rs-cmm.h
        $(LTCOMPILE) -DEXIT_CODE=2 -c 
$(top_srcdir)/plugins/colorspace-transform/rs-cmm.c
 
-colorspace_transform_sse2.lo: colorspace_transform_sse2.c
+colorspace_transform_sse2.lo: colorspace_transform_sse2.c 
colorspace_transform.h
 if CAN_COMPILE_SSE2
 SSE_FLAG=-msse2
 else

Modified: 
branches/rawstudio-ng-color/plugins/colorspace-transform/colorspace_transform.c
===================================================================
--- 
branches/rawstudio-ng-color/plugins/colorspace-transform/colorspace_transform.c 
    2010-01-24 11:12:25 UTC (rev 3071)
+++ 
branches/rawstudio-ng-color/plugins/colorspace-transform/colorspace_transform.c 
    2010-01-24 14:31:18 UTC (rev 3072)
@@ -22,32 +22,9 @@
 #include <rawstudio.h>
 #include <lcms.h>
 #include "rs-cmm.h"
+#include "colorspace_transform.h"
 
-#define RS_TYPE_COLORSPACE_TRANSFORM (rs_colorspace_transform_type)
-#define RS_COLORSPACE_TRANSFORM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
RS_TYPE_COLORSPACE_TRANSFORM, RSColorspaceTransform))
-#define RS_COLORSPACE_TRANSFORM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST 
((klass), RS_TYPE_COLORSPACE_TRANSFORM, RSColorspaceTransformClass))
-#define RS_IS_COLORSPACE_TRANSFORM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
RS_TYPE_COLORSPACE_TRANSFORM))
 
-typedef struct _RSColorspaceTransform RSColorspaceTransform;
-typedef struct _RSColorspaceTransformClass RSColorspaceTransformClass;
-
-typedef struct {
-       RSColorspaceTransform *cst;
-       GThread *threadid;
-       gint start_x;
-       gint start_y;
-       gint end_x;
-       gint end_y;
-       RS_IMAGE16 *input;
-       void *output;
-       RSColorSpace *input_space;
-       RSColorSpace *output_space;
-       RS_MATRIX3 *matrix;
-       gboolean gamma_correct;
-       guchar* table8;
-       gfloat output_gamma;
-} ThreadInfo;
-
 struct _RSColorspaceTransform {
        RSFilter parent;
 

Added: 
branches/rawstudio-ng-color/plugins/colorspace-transform/colorspace_transform.h
===================================================================
--- 
branches/rawstudio-ng-color/plugins/colorspace-transform/colorspace_transform.h 
                            (rev 0)
+++ 
branches/rawstudio-ng-color/plugins/colorspace-transform/colorspace_transform.h 
    2010-01-24 14:31:18 UTC (rev 3072)
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2006-2009 Anders Brander <[email protected]> and 
+ * Anders Kvist <[email protected]>
+ *
+ * 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.
+ */
+
+/* Plugin tmpl version 5 */
+
+#include <rawstudio.h>
+#include <lcms.h>
+#include "rs-cmm.h"
+
+#define RS_TYPE_COLORSPACE_TRANSFORM (rs_colorspace_transform_type)
+#define RS_COLORSPACE_TRANSFORM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
RS_TYPE_COLORSPACE_TRANSFORM, RSColorspaceTransform))
+#define RS_COLORSPACE_TRANSFORM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST 
((klass), RS_TYPE_COLORSPACE_TRANSFORM, RSColorspaceTransformClass))
+#define RS_IS_COLORSPACE_TRANSFORM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
RS_TYPE_COLORSPACE_TRANSFORM))
+
+typedef struct _RSColorspaceTransform RSColorspaceTransform;
+typedef struct _RSColorspaceTransformClass RSColorspaceTransformClass;
+
+typedef struct {
+       RSColorspaceTransform *cst;
+       GThread *threadid;
+       gint start_x;
+       gint start_y;
+       gint end_x;
+       gint end_y;
+       RS_IMAGE16 *input;
+       void *output;
+       RSColorSpace *input_space;
+       RSColorSpace *output_space;
+       RS_MATRIX3 *matrix;
+       gboolean gamma_correct;
+       guchar* table8;
+       gfloat output_gamma;
+       GCond* run_transform;
+       GMutex* run_transform_mutex;
+       GCond* transform_finished;
+       GMutex* transform_finished_mutex;
+       gboolean do_run_transform;
+} ThreadInfo;
+
+/* SSE2 optimized functions */
+void transform8_srgb_sse2(ThreadInfo* t);
+void transform8_otherrgb_sse2(ThreadInfo* t);
+gboolean cst_has_sse2();

Modified: 
branches/rawstudio-ng-color/plugins/colorspace-transform/colorspace_transform_sse2.c
===================================================================
--- 
branches/rawstudio-ng-color/plugins/colorspace-transform/colorspace_transform_sse2.c
        2010-01-24 11:12:25 UTC (rev 3071)
+++ 
branches/rawstudio-ng-color/plugins/colorspace-transform/colorspace_transform_sse2.c
        2010-01-24 14:31:18 UTC (rev 3072)
@@ -22,27 +22,8 @@
 #include <rawstudio.h>
 #include <lcms.h>
 #include "rs-cmm.h"
+#include "colorspace_transform.h"
 
-typedef struct _RSColorspaceTransform RSColorspaceTransform;
-typedef struct _RSColorspaceTransformClass RSColorspaceTransformClass;
-
-typedef struct {
-       RSColorspaceTransform *cst;
-       GThread *threadid;
-       gint start_x;
-       gint start_y;
-       gint end_x;
-       gint end_y;
-       RS_IMAGE16 *input;
-       void *output;
-       RSColorSpace *input_space;
-       RSColorSpace *output_space;
-       RS_MATRIX3 *matrix;
-       gboolean gamma_correct;
-       guchar* table8;
-       gfloat output_gamma;
-} ThreadInfo;
-
 #if defined(__SSE2__)
 
 #include <emmintrin.h>


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

Reply via email to