View Issue Details

IDProjectCategoryView StatusLast Update
0001582ardourbugspublic2008-11-21 00:31
Reportermtaht Assigned Topaul  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Summary0001582: multi2d_panner 4x speedup by using sse
DescriptionI cut my cpu usage for the attached test case from 41% to 11% by applying the attached patch, which merely turns on SSE for multi2d_panner.

Additional InformationAs I don't really understand what the heck the first half of this routine is doing , perhaps there are situations where dropping to SSE is a lose?

TagsNo tags attached.

Activities

2007-03-27 04:08

 

ssepanner.patch (832 bytes)   
Index: panner.cc
===================================================================
--- panner.cc	(revision 1634)
+++ panner.cc	(working copy)
@@ -653,11 +653,8 @@
 			}
 			
 			pan = left * gain_coeff;
+			Session::mix_buffers_with_gain(dst+n,src+n,nframes-n,pan);
 			
-			for (; n < nframes; ++n) {
-				dst[n] += src[n] * pan;
-			}
-			
 		} else {
 
 #else			
@@ -666,20 +663,10 @@
 			if ((pan *= gain_coeff) != 1.0f) {
 				
 				if (pan != 0.0f) {
-					
-					for (nframes_t n = 0; n < nframes; ++n) {
-						dst[n] += src[n] * pan;
-					}      
-					
+					Session::mix_buffers_with_gain(dst,src,nframes,pan);
 				} 
-
-				
 			} else {
-				
-				for (nframes_t n = 0; n < nframes; ++n) {
-					dst[n] += src[n];
-				}      
-
+					Session::mix_buffers_no_gain(dst,src,nframes);
 			}
 #endif
 #ifdef CAN_INTERP
ssepanner.patch (832 bytes)   

2007-03-27 04:11

 

4personband.tgz (812,625 bytes)

mtaht

2007-03-27 04:12

developer   ~0003670

48khz, 1024 samples/period.

paul

2007-04-07 03:15

administrator   ~0003743

patch applied. massive speedups for sessions using lots of 2d panners. thanks to mike and sampo for the fix.

Issue History

Date Modified Username Field Change
2007-03-27 04:08 mtaht New Issue
2007-03-27 04:08 mtaht File Added: ssepanner.patch
2007-03-27 04:11 mtaht File Added: 4personband.tgz
2007-03-27 04:12 mtaht Note Added: 0003670
2007-03-29 00:20 timbyr Relationship added related to 0001483
2007-04-07 03:15 paul Status new => resolved
2007-04-07 03:15 paul Resolution open => fixed
2007-04-07 03:15 paul Assigned To => paul
2007-04-07 03:15 paul Note Added: 0003743
2007-05-11 03:00 timbyr Relationship deleted related to 0001483
2008-11-21 00:31 seablade Status resolved => closed