]> git.sesse.net Git - vlc/commitdiff
linear resampler: use fixed-point as appropriate
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 19 Oct 2009 19:06:17 +0000 (22:06 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 19 Oct 2009 19:15:36 +0000 (22:15 +0300)
modules/audio_filter/resampler/linear.c

index 8262ce8025dcf8dd0d7b4f52d8e6d5bb3c59dbfe..130b357d36f5f8c3f34d82bba70243b9215a2ede 100644 (file)
@@ -44,7 +44,7 @@ static int  OpenFilter ( vlc_object_t * );
 static void CloseFilter( vlc_object_t * );
 static block_t *Resample( filter_t *, block_t * );
 
-#if 1
+#if HAVE_FPU
 typedef float sample_t;
 # define VLC_CODEC_NATIVE VLC_CODEC_FL32
 #else
@@ -137,7 +137,7 @@ static block_t *Resample( filter_t *p_filter, block_t *p_in_buf )
             for( unsigned i = 0; i < i_nb_channels ; i++ )
             {
                 p_out[i] = p_prev_sample[i];
-#if CPU_CAPABILITY_FPU
+#if HAVE_FPU
                 p_out[i] += (p_in[i] - p_prev_sample[i])
 #else
                 p_out[i] += (int64_t)(p_in[i] - p_prev_sample[i])
@@ -160,7 +160,7 @@ static block_t *Resample( filter_t *p_filter, block_t *p_in_buf )
             for( unsigned i = 0; i < i_nb_channels ; i++ )
             {
                 p_out[i] = p_in[i];
-#if CPU_CAPABILITY_FPU
+#if HAVE_FPU
                 p_out[i] += (p_in[i + i_nb_channels] - p_in[i])
 #else
                 p_out[i] += (int64_t)(p_in[i + i_nb_channels] - p_in[i])