kopia lustrzana https://github.com/f4exb/sdrangel
				
				
				
			DATV demod: leandvb: fixed possible int to float conversion issues in computation
							rodzic
							
								
									f2e236d401
								
							
						
					
					
						commit
						c27da569d5
					
				| 
						 | 
				
			
			@ -327,7 +327,7 @@ struct fir_filter : runnable
 | 
			
		|||
    {
 | 
			
		||||
        for (int i = 0; i < ncoeffs; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            float a = 2 * M_PI * f * (i - ncoeffs / 2);
 | 
			
		||||
            float a = 2 * M_PI * f * (i - ncoeffs / 2.0);
 | 
			
		||||
            float c = cosf(a), s = sinf(a);
 | 
			
		||||
            // TBD Support T=complex
 | 
			
		||||
            shifted_coeffs[i].re = coeffs[i] * c;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -743,7 +743,7 @@ struct cstln_lut : cstln_base
 | 
			
		|||
 | 
			
		||||
        { // Average power in first quadrant with unit grid
 | 
			
		||||
            int q = m / 2;
 | 
			
		||||
            float avgpower = 2 * (q * 0.25 + (q - 1) * q / 2 + (q - 1) * q * (2 * q - 1) / 6) / q;
 | 
			
		||||
            float avgpower = 2 * (q * 0.25 + (q - 1) * q / 2.0 + (q - 1) * q * (2 * q - 1) / 6.0) / q;
 | 
			
		||||
            scale = 1.0 / sqrtf(avgpower);
 | 
			
		||||
        }
 | 
			
		||||
        // Arbitrary mapping
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Ładowanie…
	
		Reference in New Issue