[Rawstudio-commit] r2762 - trunk/plugins/resample

Klaus Post klauspost at gmail.com
Sun Nov 29 15:32:21 CET 2009


Author: post
Date: 2009-11-29 15:32:21 +0100 (Sun, 29 Nov 2009)
New Revision: 2762

Modified:
   trunk/plugins/resample/resample.c
Log:
Reasmpler: Fix SSE2 crash where pixelsize != 4. Removed unused timer.

Modified: trunk/plugins/resample/resample.c
===================================================================
--- trunk/plugins/resample/resample.c	2009-11-25 18:25:11 UTC (rev 2761)
+++ trunk/plugins/resample/resample.c	2009-11-29 14:32:21 UTC (rev 2762)
@@ -335,11 +335,11 @@
 	afterVertical = rs_image16_new(input_width, resample->new_height, input->channels, input->pixelsize);
 
 	// Only even count
-	guint output_x_per_thread = ((input_width + threads * 2 - 1 ) / threads ) & 0xfffe;
+	guint output_x_per_thread = ((input_width + threads - 1 ) / threads );
+	while ((output_x_per_thread * input->pixelsize) % 16 != 0)
+		output_x_per_thread++;
 	guint output_x_offset = 0;
 
-	GTimer *gt = g_timer_new();
-
 	guint i;
 	for (i = 0; i < threads; i++)
 	{
@@ -374,8 +374,6 @@
 	guint input_y_offset = 0;
 	guint input_y_per_thread = (resample->new_height+threads-1) / threads;
 
-	gt = g_timer_new();
-
 	for (i = 0; i < threads; i++)
 	{
 		/* Set info for Horizontal resampler */




More information about the Rawstudio-commit mailing list