Commit 060298d2 authored by Rafaël Carré's avatar Rafaël Carré

audio_filter/: fix warnings

remove unused parameters from:
        EqzFilter() (equalizer.c)
        stereo_to_mono(), mono(), stereo2mono_downmix() (channel_mixer/mono.c)
parent ac175b34
......@@ -172,6 +172,7 @@ static void Destroy( vlc_object_t *p_this )
static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
VLC_UNUSED(p_aout);
float * p_in = (float*) p_in_buf->p_buffer;
float * p_out = (float*) p_out_buf->p_buffer;
size_t i_nb_samples = p_in_buf->i_nb_samples;
......
......@@ -461,6 +461,7 @@ static void Destroy( vlc_object_t *p_this )
static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
VLC_UNUSED(p_aout);
int i_input_nb = aout_FormatNbChannels( &p_filter->input );
int i_output_nb = aout_FormatNbChannels( &p_filter->output );
......
......@@ -54,12 +54,11 @@ static void CloseFilter ( vlc_object_t * );
static block_t *Convert( filter_t *p_filter, block_t *p_block );
static unsigned int stereo_to_mono( aout_instance_t *, aout_filter_t *,
aout_buffer_t *, aout_buffer_t * );
static unsigned int mono( aout_instance_t *, aout_filter_t *,
aout_buffer_t *, aout_buffer_t * );
static void stereo2mono_downmix( aout_instance_t *, aout_filter_t *,
aout_buffer_t *, aout_buffer_t * );
static unsigned int stereo_to_mono( aout_filter_t *, aout_buffer_t *,
aout_buffer_t * );
static unsigned int mono( aout_filter_t *, aout_buffer_t *, aout_buffer_t * );
static void stereo2mono_downmix( aout_filter_t *, aout_buffer_t *,
aout_buffer_t * );
/*****************************************************************************
* Local structures
......@@ -527,15 +526,12 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
memset( p_out->p_buffer, 0, i_out_size );
if( p_filter->p_sys->b_downmix )
{
stereo2mono_downmix( (aout_instance_t *)p_filter, &aout_filter,
&in_buf, &out_buf );
i_samples = mono( (aout_instance_t *)p_filter, &aout_filter,
&out_buf, &in_buf );
stereo2mono_downmix( &aout_filter, &in_buf, &out_buf );
i_samples = mono( &aout_filter, &out_buf, &in_buf );
}
else
{
i_samples = stereo_to_mono( (aout_instance_t *)p_filter, &aout_filter,
&out_buf, &in_buf );
i_samples = stereo_to_mono( &aout_filter, &out_buf, &in_buf );
}
p_out->i_buffer = out_buf.i_nb_bytes;
......@@ -550,7 +546,7 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
* converted from float into int16_t based downmix
* Written by Boris Dorès <babal@via.ecp.fr>
*/
static void stereo2mono_downmix( aout_instance_t * p_aout, aout_filter_t * p_filter,
static void stereo2mono_downmix( aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
filter_sys_t *p_sys = (filter_sys_t *)p_filter->p_sys;
......@@ -660,7 +656,7 @@ static void stereo2mono_downmix( aout_instance_t * p_aout, aout_filter_t * p_fil
}
/* Simple stereo to mono mixing. */
static unsigned int mono( aout_instance_t * p_aout, aout_filter_t *p_filter,
static unsigned int mono( aout_filter_t *p_filter,
aout_buffer_t *p_output, aout_buffer_t *p_input )
{
filter_sys_t *p_sys = (filter_sys_t *)p_filter->p_sys;
......@@ -680,7 +676,7 @@ static unsigned int mono( aout_instance_t * p_aout, aout_filter_t *p_filter,
}
/* Simple stereo to mono mixing. */
static unsigned int stereo_to_mono( aout_instance_t * p_aout, aout_filter_t *p_filter,
static unsigned int stereo_to_mono( aout_filter_t *p_filter,
aout_buffer_t *p_output, aout_buffer_t *p_input )
{
filter_sys_t *p_sys = (filter_sys_t *)p_filter->p_sys;
......
......@@ -115,6 +115,7 @@ static int Create( vlc_object_t *p_this )
static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
VLC_UNUSED(p_aout);
int i_input_nb = aout_FormatNbChannels( &p_filter->input );
int i_output_nb = aout_FormatNbChannels( &p_filter->output );
float *p_dest = (float *)p_out_buf->p_buffer;
......
......@@ -111,6 +111,7 @@ static void SparseCopy( int32_t * p_dest, const int32_t * p_src, size_t i_len,
static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
VLC_UNUSED(p_aout);
int i_input_nb = aout_FormatNbChannels( &p_filter->input );
int i_output_nb = aout_FormatNbChannels( &p_filter->output );
int32_t * p_dest = (int32_t *)p_out_buf->p_buffer;
......
......@@ -82,6 +82,7 @@ static int Create( vlc_object_t *p_this )
static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
VLC_UNUSED(p_aout);
/* AC3 is natively big endian. Most SPDIF devices have the native
* endianness of the computer system.
* On Mac OS X however, little endian devices are also common.
......
......@@ -133,6 +133,7 @@ static inline int16_t s24_to_s16_pcm(vlc_fixed_t sample)
static void Do_F32ToS16( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
VLC_UNUSED(p_aout);
int i;
vlc_fixed_t * p_in = (vlc_fixed_t *)p_in_buf->p_buffer;
int16_t * p_out = (int16_t *)p_out_buf->p_buffer;
......@@ -175,6 +176,7 @@ static int Create_S16ToF32( vlc_object_t *p_this )
static void Do_S16ToF32( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
VLC_UNUSED(p_aout);
int i = p_in_buf->i_nb_samples * aout_FormatNbChannels( &p_filter->input );
/* We start from the end because b_in_place is true */
......@@ -220,6 +222,7 @@ static int Create_U8ToF32( vlc_object_t *p_this )
static void Do_U8ToF32( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
VLC_UNUSED(p_aout);
int i = p_in_buf->i_nb_samples * aout_FormatNbChannels( &p_filter->input );
/* We start from the end because b_in_place is true */
......
......@@ -161,6 +161,7 @@ static int Create_F32ToFL32( vlc_object_t *p_this )
static void Do_F32ToFL32( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
VLC_UNUSED(p_aout);
int i;
vlc_fixed_t * p_in = (vlc_fixed_t *)p_in_buf->p_buffer;
float * p_out = (float *)p_out_buf->p_buffer;
......@@ -178,6 +179,7 @@ static void Do_F32ToFL32( aout_instance_t * p_aout, aout_filter_t * p_filter,
static void Do_FL32ToF32( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
VLC_UNUSED(p_aout);
int i;
float * p_in = (float *)p_in_buf->p_buffer;
vlc_fixed_t * p_out = (vlc_fixed_t *)p_out_buf->p_buffer;
......@@ -219,6 +221,7 @@ static int Create_FL32ToS16( vlc_object_t *p_this )
static void Do_FL32ToS16( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
VLC_UNUSED(p_aout);
int i;
float * p_in = (float *)p_in_buf->p_buffer;
int16_t * p_out = (int16_t *)p_out_buf->p_buffer;
......@@ -273,6 +276,7 @@ static int Create_FL32ToS8( vlc_object_t *p_this )
static void Do_FL32ToS8( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
VLC_UNUSED(p_aout);
int i;
float * p_in = (float *)p_in_buf->p_buffer;
int8_t * p_out = (int8_t *)p_out_buf->p_buffer;
......@@ -317,6 +321,7 @@ static int Create_FL32ToU16( vlc_object_t *p_this )
static void Do_FL32ToU16( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
VLC_UNUSED(p_aout);
int i;
float * p_in = (float *)p_in_buf->p_buffer;
uint16_t * p_out = (uint16_t *)p_out_buf->p_buffer;
......@@ -361,6 +366,7 @@ static int Create_FL32ToU8( vlc_object_t *p_this )
static void Do_FL32ToU8( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
VLC_UNUSED(p_aout);
int i;
float * p_in = (float *)p_in_buf->p_buffer;
uint8_t * p_out = (uint8_t *)p_out_buf->p_buffer;
......@@ -410,6 +416,7 @@ static int Create_S16ToFL32( vlc_object_t *p_this )
static void Do_S16ToFL32( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
VLC_UNUSED(p_aout);
int i = p_in_buf->i_nb_samples * aout_FormatNbChannels( &p_filter->input );
/* We start from the end because b_in_place is true */
......@@ -440,6 +447,7 @@ static void Do_S16ToFL32( aout_instance_t * p_aout, aout_filter_t * p_filter,
static void Do_S16ToFL24( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
VLC_UNUSED(p_aout);
int i = p_in_buf->i_nb_samples * aout_FormatNbChannels( &p_filter->input );
/* We start from the end because b_in_place is true */
......@@ -501,6 +509,7 @@ static int Create_S16ToFL32_SW( vlc_object_t *p_this )
static void Do_S16ToFL32_SW( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
VLC_UNUSED(p_aout);
int i = p_in_buf->i_nb_samples * aout_FormatNbChannels( &p_filter->input );
/* We start from the end because b_in_place is true */
......@@ -547,6 +556,7 @@ static void Do_S16ToFL32_SW( aout_instance_t * p_aout, aout_filter_t * p_filter,
static void Do_S16ToFL24_SW( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
VLC_UNUSED(p_aout);
int i = p_in_buf->i_nb_samples * aout_FormatNbChannels( &p_filter->input );
/* We start from the end because b_in_place is true */
......@@ -602,6 +612,7 @@ static int Create_S8ToFL32( vlc_object_t *p_this )
static void Do_S8ToFL32( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
VLC_UNUSED(p_aout);
int i = p_in_buf->i_nb_samples * aout_FormatNbChannels( &p_filter->input );
/* We start from the end because b_in_place is true */
......@@ -645,6 +656,7 @@ static int Create_U8ToFL32( vlc_object_t *p_this )
static void Do_U8ToFL32( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
VLC_UNUSED(p_aout);
int i = p_in_buf->i_nb_samples * aout_FormatNbChannels( &p_filter->input );
/* We start from the end because b_in_place is true */
......
......@@ -122,7 +122,7 @@ static void DoWork( aout_instance_t *, aout_filter_t *,
#define EQZ_IN_FACTOR (0.25)
static int EqzInit( aout_filter_t *, int );
static void EqzFilter( aout_instance_t *,aout_filter_t *, float *, float *,
static void EqzFilter( aout_filter_t *, float *, float *,
int, int );
static void EqzClean( aout_filter_t * );
......@@ -197,10 +197,11 @@ static void Close( vlc_object_t *p_this )
static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
VLC_UNUSED(p_aout);
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes;
EqzFilter( p_aout, p_filter, (float*)p_out_buf->p_buffer,
EqzFilter( p_filter, (float*)p_out_buf->p_buffer,
(float*)p_in_buf->p_buffer, p_in_buf->i_nb_samples,
aout_FormatNbChannels( &p_filter->input ) );
}
......@@ -385,8 +386,7 @@ static int EqzInit( aout_filter_t *p_filter, int i_rate )
return VLC_SUCCESS;
}
static void EqzFilter( aout_instance_t *p_aout,
aout_filter_t *p_filter, float *out, float *in,
static void EqzFilter( aout_filter_t *p_filter, float *out, float *in,
int i_samples, int i_channels )
{
aout_filter_sys_t *p_sys = p_filter->p_sys;
......@@ -469,6 +469,7 @@ static void EqzClean( aout_filter_t *p_filter )
static int PresetCallback( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval);
aout_filter_sys_t *p_sys = (aout_filter_sys_t *)p_data;
aout_instance_t *p_aout = (aout_instance_t *)p_this;
......@@ -525,6 +526,7 @@ static int PresetCallback( vlc_object_t *p_this, char const *psz_cmd,
static int PreampCallback( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
VLC_UNUSED(p_this); VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval);
aout_filter_sys_t *p_sys = (aout_filter_sys_t *)p_data;
if( newval.f_float < -20.0 )
......@@ -539,6 +541,7 @@ static int PreampCallback( vlc_object_t *p_this, char const *psz_cmd,
static int BandsCallback( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
VLC_UNUSED(p_this); VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval);
aout_filter_sys_t *p_sys = (aout_filter_sys_t *)p_data;
char *psz_bands = newval.psz_string;
......
......@@ -242,6 +242,7 @@ static int Open( vlc_object_t *p_this )
*****************************************************************************/
static block_t *Float32toS24( filter_t *p_filter, block_t *p_block )
{
VLC_UNUSED(p_filter);
int i;
float *p_in = (float *)p_block->p_buffer;
uint8_t *p_out = (uint8_t *)p_in;
......@@ -270,6 +271,7 @@ static block_t *Float32toS24( filter_t *p_filter, block_t *p_block )
static block_t *Float32toS16( filter_t *p_filter, block_t *p_block )
{
VLC_UNUSED(p_filter);
int i;
float *p_in = (float *)p_block->p_buffer;
int16_t *p_out = (int16_t *)p_in;
......@@ -298,6 +300,7 @@ static block_t *Float32toS16( filter_t *p_filter, block_t *p_block )
static block_t *Float32toU16( filter_t *p_filter, block_t *p_block )
{
VLC_UNUSED(p_filter);
int i;
float *p_in = (float *)p_block->p_buffer;
uint16_t *p_out = (uint16_t *)p_in;
......@@ -357,6 +360,7 @@ static block_t *S24toFloat32( filter_t *p_filter, block_t *p_block )
static block_t *S24toS16( filter_t *p_filter, block_t *p_block )
{
VLC_UNUSED(p_filter);
int i;
uint8_t *p_in = (uint8_t *)p_block->p_buffer;
uint8_t *p_out = (uint8_t *)p_in;
......@@ -498,6 +502,7 @@ static block_t *S16toS24( filter_t *p_filter, block_t *p_block )
static block_t *S16toS8( filter_t *p_filter, block_t *p_block )
{
VLC_UNUSED(p_filter);
int i;
int16_t *p_in = (int16_t *)p_block->p_buffer;
int8_t *p_out = (int8_t *)p_in;
......@@ -510,6 +515,7 @@ static block_t *S16toS8( filter_t *p_filter, block_t *p_block )
}
static block_t *S16toU8( filter_t *p_filter, block_t *p_block )
{
VLC_UNUSED(p_filter);
int i;
int16_t *p_in = (int16_t *)p_block->p_buffer;
uint8_t *p_out = (uint8_t *)p_in;
......@@ -522,6 +528,7 @@ static block_t *S16toU8( filter_t *p_filter, block_t *p_block )
}
static block_t *S16toU16( filter_t *p_filter, block_t *p_block )
{
VLC_UNUSED(p_filter);
int i;
int16_t *p_in = (int16_t *)p_block->p_buffer;
uint16_t *p_out = (uint16_t *)p_in;
......@@ -534,6 +541,7 @@ static block_t *S16toU16( filter_t *p_filter, block_t *p_block )
static block_t *U16toS8( filter_t *p_filter, block_t *p_block )
{
VLC_UNUSED(p_filter);
int i;
uint16_t *p_in = (uint16_t *)p_block->p_buffer;
int8_t *p_out = (int8_t *)p_in;
......@@ -546,6 +554,7 @@ static block_t *U16toS8( filter_t *p_filter, block_t *p_block )
}
static block_t *U16toU8( filter_t *p_filter, block_t *p_block )
{
VLC_UNUSED(p_filter);
int i;
uint16_t *p_in = (uint16_t *)p_block->p_buffer;
uint8_t *p_out = (uint8_t *)p_in;
......@@ -558,6 +567,7 @@ static block_t *U16toU8( filter_t *p_filter, block_t *p_block )
}
static block_t *U16toS16( filter_t *p_filter, block_t *p_block )
{
VLC_UNUSED(p_filter);
int i;
uint16_t *p_in = (uint16_t *)p_block->p_buffer;
int16_t *p_out = (int16_t *)p_in;
......@@ -570,6 +580,7 @@ static block_t *U16toS16( filter_t *p_filter, block_t *p_block )
static block_t *S8toU8( filter_t *p_filter, block_t *p_block )
{
VLC_UNUSED(p_filter);
int i;
int8_t *p_in = (int8_t *)p_block->p_buffer;
uint8_t *p_out = (uint8_t *)p_in;
......@@ -581,6 +592,7 @@ static block_t *S8toU8( filter_t *p_filter, block_t *p_block )
}
static block_t *U8toS8( filter_t *p_filter, block_t *p_block )
{
VLC_UNUSED(p_filter);
int i;
uint8_t *p_in = (uint8_t *)p_block->p_buffer;
int8_t *p_out = (int8_t *)p_in;
......@@ -722,6 +734,7 @@ static block_t *U8toU16( filter_t *p_filter, block_t *p_block )
*****************************************************************************/
static block_t *Swap16( filter_t *p_filter, block_t *p_block )
{
VLC_UNUSED(p_filter);
int i;
uint8_t *p_in = (uint8_t *)p_block->p_buffer;
uint8_t tmp;
......@@ -739,6 +752,7 @@ static block_t *Swap16( filter_t *p_filter, block_t *p_block )
static block_t *Swap24( filter_t *p_filter, block_t *p_block )
{
VLC_UNUSED(p_filter);
int i;
uint8_t *p_in = (uint8_t *)p_block->p_buffer;
uint8_t tmp;
......
......@@ -185,6 +185,7 @@ static void Close( vlc_object_t *p_this )
static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
VLC_UNUSED(p_aout);
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment