Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
6c9479be
Commit
6c9479be
authored
Sep 23, 2009
by
Rémi Denis-Courmont
Browse files
i_nb_bytes -> i_buffer
(Yeah, some automatic variables were renamed too)
parent
38c08789
Changes
52
Hide whitespace changes
Inline
Side-by-side
include/vlc_aout.h
View file @
6c9479be
...
...
@@ -131,7 +131,7 @@ struct aout_buffer_t
uint8_t
*
p_buffer
;
/* i_size is the real size of the buffer (used for debug ONLY), i_nb_bytes
* is the number of significative bytes in it. */
size_t
i_size
,
i_
nb_bytes
;
size_t
i_size
,
i_
buffer
;
unsigned
int
i_nb_samples
;
uint32_t
i_flags
;
mtime_t
i_pts
,
i_length
;
...
...
modules/audio_filter/channel_mixer/dolby.c
View file @
6c9479be
...
...
@@ -176,9 +176,9 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
size_t
i
;
p_out_buf
->
i_nb_samples
=
i_nb_samples
;
p_out_buf
->
i_
nb_bytes
=
sizeof
(
float
)
*
i_nb_samples
p_out_buf
->
i_
buffer
=
sizeof
(
float
)
*
i_nb_samples
*
aout_FormatNbChannels
(
&
p_filter
->
output
);
memset
(
p_out
,
0
,
p_out_buf
->
i_
nb_bytes
);
memset
(
p_out
,
0
,
p_out_buf
->
i_
buffer
);
if
(
p_sys
->
i_rear_left
>=
0
)
...
...
modules/audio_filter/channel_mixer/headphone.c
View file @
6c9479be
...
...
@@ -466,9 +466,9 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
/* out buffer characterisitcs */
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
;
p_out_buf
->
i_
nb_bytes
=
p_in_buf
->
i_
nb_bytes
*
i_output_nb
/
i_input_nb
;
p_out_buf
->
i_
buffer
=
p_in_buf
->
i_
buffer
*
i_output_nb
/
i_input_nb
;
p_out
=
p_out_buf
->
p_buffer
;
i_out_size
=
p_out_buf
->
i_
nb_bytes
;
i_out_size
=
p_out_buf
->
i_
buffer
;
/* Slide the overflow buffer */
p_overflow
=
p_sys
->
p_overflow_buffer
;
...
...
@@ -675,15 +675,15 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
aout_filter
.
b_in_place
=
0
;
in_buf
.
p_buffer
=
p_block
->
p_buffer
;
in_buf
.
i_
nb_bytes
=
p_block
->
i_buffer
;
in_buf
.
i_
buffer
=
p_block
->
i_buffer
;
in_buf
.
i_nb_samples
=
p_block
->
i_nb_samples
;
out_buf
.
p_buffer
=
p_out
->
p_buffer
;
out_buf
.
i_
nb_bytes
=
p_out
->
i_buffer
;
out_buf
.
i_
buffer
=
p_out
->
i_buffer
;
out_buf
.
i_nb_samples
=
p_out
->
i_nb_samples
;
DoWork
(
(
aout_instance_t
*
)
p_filter
,
&
aout_filter
,
&
in_buf
,
&
out_buf
);
p_out
->
i_buffer
=
out_buf
.
i_
nb_bytes
;
p_out
->
i_buffer
=
out_buf
.
i_
buffer
;
p_out
->
i_nb_samples
=
out_buf
.
i_nb_samples
;
block_Release
(
p_block
);
...
...
modules/audio_filter/channel_mixer/mono.c
View file @
6c9479be
...
...
@@ -490,13 +490,13 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
aout_filter
.
output
.
i_format
=
p_filter
->
fmt_out
.
i_codec
;
in_buf
.
p_buffer
=
p_block
->
p_buffer
;
in_buf
.
i_
nb_bytes
=
p_block
->
i_buffer
;
in_buf
.
i_
buffer
=
p_block
->
i_buffer
;
in_buf
.
i_nb_samples
=
p_block
->
i_nb_samples
;
#if 0
unsigned int i_in_size = in_buf.i_nb_samples * (p_filter->p_sys->i_bitspersample/8) *
aout_FormatNbChannels( &(p_filter->fmt_in.audio) );
if( (in_buf.i_
nb_bytes
!= i_in_size) && ((i_in_size % 32) != 0) ) /* is it word aligned?? */
if( (in_buf.i_
buffer
!= i_in_size) && ((i_in_size % 32) != 0) ) /* is it word aligned?? */
{
msg_Err( p_filter, "input buffer is not word aligned" );
/* Fix output buffer to be word aligned */
...
...
@@ -504,7 +504,7 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
#endif
out_buf
.
p_buffer
=
p_out
->
p_buffer
;
out_buf
.
i_
nb_bytes
=
p_out
->
i_buffer
;
out_buf
.
i_
buffer
=
p_out
->
i_buffer
;
out_buf
.
i_nb_samples
=
p_out
->
i_nb_samples
;
memset
(
p_out
->
p_buffer
,
0
,
i_out_size
);
...
...
@@ -518,7 +518,7 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
i_samples
=
stereo_to_mono
(
&
aout_filter
,
&
out_buf
,
&
in_buf
);
}
p_out
->
i_buffer
=
out_buf
.
i_
nb_bytes
;
p_out
->
i_buffer
=
out_buf
.
i_
buffer
;
p_out
->
i_nb_samples
=
out_buf
.
i_nb_samples
;
block_Release
(
p_block
);
...
...
@@ -555,9 +555,9 @@ static void stereo2mono_downmix( aout_filter_t * p_filter,
/* out buffer characterisitcs */
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
;
p_out_buf
->
i_
nb_bytes
=
p_in_buf
->
i_
nb_bytes
*
i_output_nb
/
i_input_nb
;
p_out_buf
->
i_
buffer
=
p_in_buf
->
i_
buffer
*
i_output_nb
/
i_input_nb
;
p_out
=
p_out_buf
->
p_buffer
;
i_out_size
=
p_out_buf
->
i_
nb_bytes
;
i_out_size
=
p_out_buf
->
i_
buffer
;
/* Slide the overflow buffer */
p_overflow
=
p_sys
->
p_overflow_buffer
;
...
...
modules/audio_filter/channel_mixer/simple.c
View file @
6c9479be
...
...
@@ -119,7 +119,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
int
i
;
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
;
p_out_buf
->
i_
nb_bytes
=
p_in_buf
->
i_
nb_bytes
*
i_output_nb
/
i_input_nb
;
p_out_buf
->
i_
buffer
=
p_in_buf
->
i_
buffer
*
i_output_nb
/
i_input_nb
;
if
(
p_filter
->
output
.
i_physical_channels
==
AOUT_CHANS_2_0
)
{
...
...
@@ -312,17 +312,17 @@ static block_t *Filter( filter_t *p_filter, block_t *p_block )
aout_filter
.
output
.
i_format
=
p_filter
->
fmt_out
.
i_codec
;
in_buf
.
p_buffer
=
p_block
->
p_buffer
;
in_buf
.
i_
nb_bytes
=
p_block
->
i_buffer
;
in_buf
.
i_
buffer
=
p_block
->
i_buffer
;
in_buf
.
i_nb_samples
=
p_block
->
i_nb_samples
;
out_buf
.
p_buffer
=
p_out
->
p_buffer
;
out_buf
.
i_
nb_bytes
=
p_out
->
i_buffer
;
out_buf
.
i_
buffer
=
p_out
->
i_buffer
;
out_buf
.
i_nb_samples
=
p_out
->
i_nb_samples
;
DoWork
(
(
aout_instance_t
*
)
p_filter
,
&
aout_filter
,
&
in_buf
,
&
out_buf
);
block_Release
(
p_block
);
p_out
->
i_buffer
=
out_buf
.
i_
nb_bytes
;
p_out
->
i_buffer
=
out_buf
.
i_
buffer
;
p_out
->
i_nb_samples
=
out_buf
.
i_nb_samples
;
return
p_out
;
...
...
modules/audio_filter/channel_mixer/trivial.c
View file @
6c9479be
...
...
@@ -119,7 +119,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
int32_t
*
p_src
=
(
int32_t
*
)
p_in_buf
->
p_buffer
;
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
;
p_out_buf
->
i_
nb_bytes
=
p_in_buf
->
i_
nb_bytes
*
i_output_nb
/
i_input_nb
;
p_out_buf
->
i_
buffer
=
p_in_buf
->
i_
buffer
*
i_output_nb
/
i_input_nb
;
if
(
(
p_filter
->
output
.
i_original_channels
&
AOUT_CHAN_PHYSMASK
)
!=
(
p_filter
->
input
.
i_original_channels
&
AOUT_CHAN_PHYSMASK
)
...
...
modules/audio_filter/chorus_flanger.c
View file @
6c9479be
...
...
@@ -246,7 +246,7 @@ static void DoWork( aout_instance_t *p_aout, aout_filter_t *p_filter,
float
*
pf_ptr
,
f_diff
=
0
,
f_frac
=
0
,
f_temp
=
0
;
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
;
p_out_buf
->
i_
nb_bytes
=
p_in_buf
->
i_
nb_bytes
;
p_out_buf
->
i_
buffer
=
p_in_buf
->
i_
buffer
;
/* Process each sample */
for
(
int
i
=
0
;
i
<
i_samples
;
i
++
)
...
...
modules/audio_filter/converter/a52tofloat32.c
View file @
6c9479be
...
...
@@ -392,7 +392,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
;
p_out_buf
->
i_
nb_bytes
=
i_bytes_per_block
*
6
;
p_out_buf
->
i_
buffer
=
i_bytes_per_block
*
6
;
}
/*****************************************************************************
...
...
@@ -494,15 +494,15 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
aout_filter
.
output
.
i_format
=
p_filter
->
fmt_out
.
i_codec
;
in_buf
.
p_buffer
=
p_block
->
p_buffer
;
in_buf
.
i_
nb_bytes
=
p_block
->
i_buffer
;
in_buf
.
i_
buffer
=
p_block
->
i_buffer
;
in_buf
.
i_nb_samples
=
p_block
->
i_nb_samples
;
out_buf
.
p_buffer
=
p_out
->
p_buffer
;
out_buf
.
i_
nb_bytes
=
p_out
->
i_buffer
;
out_buf
.
i_
buffer
=
p_out
->
i_buffer
;
out_buf
.
i_nb_samples
=
p_out
->
i_nb_samples
;
DoWork
(
(
aout_instance_t
*
)
p_filter
,
&
aout_filter
,
&
in_buf
,
&
out_buf
);
p_out
->
i_buffer
=
out_buf
.
i_
nb_bytes
;
p_out
->
i_buffer
=
out_buf
.
i_
buffer
;
p_out
->
i_nb_samples
=
out_buf
.
i_nb_samples
;
block_Release
(
p_block
);
...
...
modules/audio_filter/converter/a52tospdif.c
View file @
6c9479be
...
...
@@ -90,7 +90,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
*/
static
const
uint8_t
p_sync_le
[
6
]
=
{
0x72
,
0xF8
,
0x1F
,
0x4E
,
0x01
,
0x00
};
static
const
uint8_t
p_sync_be
[
6
]
=
{
0xF8
,
0x72
,
0x4E
,
0x1F
,
0x00
,
0x01
};
uint16_t
i_frame_size
=
p_in_buf
->
i_
nb_bytes
/
2
;
uint16_t
i_frame_size
=
p_in_buf
->
i_
buffer
/
2
;
uint8_t
*
p_in
=
p_in_buf
->
p_buffer
;
uint8_t
*
p_out
=
p_out_buf
->
p_buffer
;
...
...
@@ -115,6 +115,6 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
AOUT_SPDIF_SIZE
-
i_frame_size
*
2
-
8
);
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
;
p_out_buf
->
i_
nb_bytes
=
AOUT_SPDIF_SIZE
;
p_out_buf
->
i_
buffer
=
AOUT_SPDIF_SIZE
;
}
modules/audio_filter/converter/dtstofloat32.c
View file @
6c9479be
...
...
@@ -303,7 +303,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
&
i_sample_rate
,
&
i_bit_rate
,
&
i_frame_length
)
)
{
msg_Warn
(
p_aout
,
"libdca couldn't sync on frame"
);
p_out_buf
->
i_nb_samples
=
p_out_buf
->
i_
nb_bytes
=
0
;
p_out_buf
->
i_nb_samples
=
p_out_buf
->
i_
buffer
=
0
;
return
;
}
...
...
@@ -361,7 +361,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
;
p_out_buf
->
i_
nb_bytes
=
i_bytes_per_block
*
i
;
p_out_buf
->
i_
buffer
=
i_bytes_per_block
*
i
;
}
/*****************************************************************************
...
...
@@ -459,15 +459,15 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
aout_filter
.
output
.
i_format
=
p_filter
->
fmt_out
.
i_codec
;
in_buf
.
p_buffer
=
p_block
->
p_buffer
;
in_buf
.
i_
nb_bytes
=
p_block
->
i_buffer
;
in_buf
.
i_
buffer
=
p_block
->
i_buffer
;
in_buf
.
i_nb_samples
=
p_block
->
i_nb_samples
;
out_buf
.
p_buffer
=
p_out
->
p_buffer
;
out_buf
.
i_
nb_bytes
=
p_out
->
i_buffer
;
out_buf
.
i_
buffer
=
p_out
->
i_buffer
;
out_buf
.
i_nb_samples
=
p_out
->
i_nb_samples
;
DoWork
(
(
aout_instance_t
*
)
p_filter
,
&
aout_filter
,
&
in_buf
,
&
out_buf
);
p_out
->
i_buffer
=
out_buf
.
i_
nb_bytes
;
p_out
->
i_buffer
=
out_buf
.
i_
buffer
;
p_out
->
i_nb_samples
=
out_buf
.
i_nb_samples
;
block_Release
(
p_block
);
...
...
modules/audio_filter/converter/dtstospdif.c
View file @
6c9479be
...
...
@@ -117,28 +117,28 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
{
uint32_t
i_ac5_spdif_type
=
0
;
uint16_t
i_fz
=
p_in_buf
->
i_nb_samples
*
4
;
uint16_t
i_frame
,
i_length
=
p_in_buf
->
i_
nb_bytes
;
uint16_t
i_frame
,
i_length
=
p_in_buf
->
i_
buffer
;
static
const
uint8_t
p_sync_le
[
6
]
=
{
0x72
,
0xF8
,
0x1F
,
0x4E
,
0x00
,
0x00
};
static
const
uint8_t
p_sync_be
[
6
]
=
{
0xF8
,
0x72
,
0x4E
,
0x1F
,
0x00
,
0x00
};
if
(
p_in_buf
->
i_
nb_bytes
!=
p_filter
->
p_sys
->
i_frame_size
)
if
(
p_in_buf
->
i_
buffer
!=
p_filter
->
p_sys
->
i_frame_size
)
{
/* Frame size changed, reset everything */
msg_Warn
(
p_aout
,
"Frame size changed from %u to %u, "
"resetting everything."
,
p_filter
->
p_sys
->
i_frame_size
,
(
unsigned
)
p_in_buf
->
i_
nb_bytes
);
(
unsigned
)
p_in_buf
->
i_
buffer
);
p_filter
->
p_sys
->
i_frame_size
=
p_in_buf
->
i_
nb_bytes
;
p_filter
->
p_sys
->
i_frame_size
=
p_in_buf
->
i_
buffer
;
p_filter
->
p_sys
->
p_buf
=
realloc
(
p_filter
->
p_sys
->
p_buf
,
p_in_buf
->
i_
nb_bytes
*
3
);
p_in_buf
->
i_
buffer
*
3
);
p_filter
->
p_sys
->
i_frames
=
0
;
}
/* Backup frame */
vlc_memcpy
(
p_filter
->
p_sys
->
p_buf
+
p_in_buf
->
i_
nb_bytes
*
vlc_memcpy
(
p_filter
->
p_sys
->
p_buf
+
p_in_buf
->
i_
buffer
*
p_filter
->
p_sys
->
i_frames
,
p_in_buf
->
p_buffer
,
p_in_buf
->
i_
nb_bytes
);
p_in_buf
->
p_buffer
,
p_in_buf
->
i_
buffer
);
p_filter
->
p_sys
->
i_frames
++
;
...
...
@@ -150,7 +150,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
/* Not enough data */
p_out_buf
->
i_nb_samples
=
0
;
p_out_buf
->
i_
nb_bytes
=
0
;
p_out_buf
->
i_
buffer
=
0
;
return
;
}
...
...
@@ -215,5 +215,5 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
p_out_buf
->
i_pts
=
p_filter
->
p_sys
->
start_date
;
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
*
3
;
p_out_buf
->
i_
nb_bytes
=
p_out_buf
->
i_nb_samples
*
4
;
p_out_buf
->
i_
buffer
=
p_out_buf
->
i_nb_samples
*
4
;
}
modules/audio_filter/converter/fixed.c
View file @
6c9479be
...
...
@@ -146,7 +146,7 @@ static void Do_F32ToS16( aout_instance_t * p_aout, aout_filter_t * p_filter,
*
p_out
++
=
s24_to_s16_pcm
(
*
p_in
++
);
}
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
;
p_out_buf
->
i_
nb_bytes
=
p_in_buf
->
i_
nb_bytes
/
2
;
p_out_buf
->
i_
buffer
=
p_in_buf
->
i_
buffer
/
2
;
}
...
...
@@ -191,7 +191,7 @@ static void Do_S16ToF32( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
;
p_out_buf
->
i_
nb_bytes
=
p_in_buf
->
i_
nb_bytes
p_out_buf
->
i_
buffer
=
p_in_buf
->
i_
buffer
*
sizeof
(
vlc_fixed_t
)
/
sizeof
(
int16_t
);
}
...
...
@@ -237,5 +237,5 @@ static void Do_U8ToF32( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
;
p_out_buf
->
i_
nb_bytes
=
p_in_buf
->
i_
nb_bytes
*
sizeof
(
vlc_fixed_t
);
p_out_buf
->
i_
buffer
=
p_in_buf
->
i_
buffer
*
sizeof
(
vlc_fixed_t
);
}
modules/audio_filter/converter/float.c
View file @
6c9479be
...
...
@@ -174,7 +174,7 @@ static void Do_F32ToFL32( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
;
p_out_buf
->
i_
nb_bytes
=
p_in_buf
->
i_
nb_bytes
;
p_out_buf
->
i_
buffer
=
p_in_buf
->
i_
buffer
;
}
static
void
Do_FL32ToF32
(
aout_instance_t
*
p_aout
,
aout_filter_t
*
p_filter
,
...
...
@@ -192,7 +192,7 @@ static void Do_FL32ToF32( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
;
p_out_buf
->
i_
nb_bytes
=
p_in_buf
->
i_
nb_bytes
;
p_out_buf
->
i_
buffer
=
p_in_buf
->
i_
buffer
;
}
/*****************************************************************************
...
...
@@ -247,7 +247,7 @@ static void Do_FL32ToS16( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
;
p_out_buf
->
i_
nb_bytes
=
p_in_buf
->
i_
nb_bytes
/
2
;
p_out_buf
->
i_
buffer
=
p_in_buf
->
i_
buffer
/
2
;
}
/*****************************************************************************
...
...
@@ -292,7 +292,7 @@ static void Do_FL32ToS8( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
;
p_out_buf
->
i_
nb_bytes
=
p_in_buf
->
i_
nb_bytes
/
4
;
p_out_buf
->
i_
buffer
=
p_in_buf
->
i_
buffer
/
4
;
}
/*****************************************************************************
...
...
@@ -337,7 +337,7 @@ static void Do_FL32ToU16( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
;
p_out_buf
->
i_
nb_bytes
=
p_in_buf
->
i_
nb_bytes
/
2
;
p_out_buf
->
i_
buffer
=
p_in_buf
->
i_
buffer
/
2
;
}
/*****************************************************************************
...
...
@@ -382,7 +382,7 @@ static void Do_FL32ToU8( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
;
p_out_buf
->
i_
nb_bytes
=
p_in_buf
->
i_
nb_bytes
/
4
;
p_out_buf
->
i_
buffer
=
p_in_buf
->
i_
buffer
/
4
;
}
/*****************************************************************************
...
...
@@ -445,7 +445,7 @@ static void Do_S16ToFL32( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
;
p_out_buf
->
i_
nb_bytes
=
p_in_buf
->
i_
nb_bytes
*
4
/
2
;
p_out_buf
->
i_
buffer
=
p_in_buf
->
i_
buffer
*
4
/
2
;
}
static
void
Do_S24ToFL32
(
aout_instance_t
*
p_aout
,
aout_filter_t
*
p_filter
,
...
...
@@ -471,7 +471,7 @@ static void Do_S24ToFL32( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
;
p_out_buf
->
i_
nb_bytes
=
p_in_buf
->
i_
nb_bytes
*
4
/
3
;
p_out_buf
->
i_
buffer
=
p_in_buf
->
i_
buffer
*
4
/
3
;
}
static
void
Do_S32ToFL32
(
aout_instance_t
*
p_aout
,
aout_filter_t
*
p_filter
,
...
...
@@ -490,7 +490,7 @@ static void Do_S32ToFL32( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
;
p_out_buf
->
i_
nb_bytes
=
p_in_buf
->
i_
nb_bytes
*
4
/
4
;
p_out_buf
->
i_
buffer
=
p_in_buf
->
i_
buffer
*
4
/
4
;
}
/*****************************************************************************
...
...
@@ -561,7 +561,7 @@ static void Do_S16ToFL32_SW( aout_instance_t * p_aout, aout_filter_t * p_filter,
*
p_out
--
=
(
float
)
*
p_in
--
/
32768
.
0
;
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
;
p_out_buf
->
i_
nb_bytes
=
p_in_buf
->
i_
nb_bytes
*
4
/
2
;
p_out_buf
->
i_
buffer
=
p_in_buf
->
i_
buffer
*
4
/
2
;
}
static
void
Do_S24ToFL32_SW
(
aout_instance_t
*
p_aout
,
aout_filter_t
*
p_filter
,
...
...
@@ -593,7 +593,7 @@ static void Do_S24ToFL32_SW( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
;
p_out_buf
->
i_
nb_bytes
=
p_in_buf
->
i_
nb_bytes
*
4
/
3
;
p_out_buf
->
i_
buffer
=
p_in_buf
->
i_
buffer
*
4
/
3
;
}
static
void
Do_S32ToFL32_SW
(
aout_instance_t
*
p_aout
,
aout_filter_t
*
p_filter
,
...
...
@@ -612,7 +612,7 @@ static void Do_S32ToFL32_SW( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
;
p_out_buf
->
i_
nb_bytes
=
p_in_buf
->
i_
nb_bytes
*
4
/
4
;
p_out_buf
->
i_
buffer
=
p_in_buf
->
i_
buffer
*
4
/
4
;
}
...
...
@@ -657,7 +657,7 @@ static void Do_S8ToFL32( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
;
p_out_buf
->
i_
nb_bytes
=
p_in_buf
->
i_
nb_bytes
*
sizeof
(
float
);
p_out_buf
->
i_
buffer
=
p_in_buf
->
i_
buffer
*
sizeof
(
float
);
}
/*****************************************************************************
...
...
@@ -701,5 +701,5 @@ static void Do_U8ToFL32( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
;
p_out_buf
->
i_
nb_bytes
=
p_in_buf
->
i_
nb_bytes
*
sizeof
(
float
);
p_out_buf
->
i_
buffer
=
p_in_buf
->
i_
buffer
*
sizeof
(
float
);
}
modules/audio_filter/converter/mpgatofixed32.c
View file @
6c9479be
...
...
@@ -129,12 +129,12 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
filter_sys_t
*
p_sys
=
(
filter_sys_t
*
)
p_filter
->
p_sys
;
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
;
p_out_buf
->
i_
nb_bytes
=
p_in_buf
->
i_nb_samples
*
sizeof
(
vlc_fixed_t
)
*
p_out_buf
->
i_
buffer
=
p_in_buf
->
i_nb_samples
*
sizeof
(
vlc_fixed_t
)
*
aout_FormatNbChannels
(
&
p_filter
->
output
);
/* Do the actual decoding now. */
mad_stream_buffer
(
&
p_sys
->
mad_stream
,
p_in_buf
->
p_buffer
,
p_in_buf
->
i_
nb_bytes
);
p_in_buf
->
i_
buffer
);
if
(
mad_frame_decode
(
&
p_sys
->
mad_frame
,
&
p_sys
->
mad_stream
)
==
-
1
)
{
msg_Dbg
(
p_aout
,
"libmad error: %s"
,
...
...
@@ -151,7 +151,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
if
(
p_filter
->
output
.
i_format
==
VLC_CODEC_FL32
)
{
int
i
;
int
i_size
=
p_out_buf
->
i_
nb_bytes
/
sizeof
(
float
);
int
i_size
=
p_out_buf
->
i_
buffer
/
sizeof
(
float
);
float
*
a
=
(
float
*
)
p_out_buf
->
p_buffer
;
for
(
i
=
0
;
i
<
i_size
;
i
++
)
...
...
@@ -159,7 +159,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
else
{
memset
(
p_out_buf
->
p_buffer
,
0
,
p_out_buf
->
i_
nb_bytes
);
memset
(
p_out_buf
->
p_buffer
,
0
,
p_out_buf
->
i_
buffer
);
}
p_sys
->
i_reject_count
--
;
return
;
...
...
@@ -396,17 +396,17 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
in_buf
.
p_buffer
=
p_block
->
p_buffer
;
in_buf
.
i_flags
=
0
;
in_buf
.
i_
nb_bytes
=
p_block
->
i_buffer
;
in_buf
.
i_
buffer
=
p_block
->
i_buffer
;
in_buf
.
i_nb_samples
=
p_block
->
i_nb_samples
;
out_buf
.
p_buffer
=
p_out
->
p_buffer
;
out_buf
.
i_
nb_bytes
=
p_out
->
i_buffer
;
out_buf
.
i_
buffer
=
p_out
->
i_buffer
;
out_buf
.
i_nb_samples
=
p_out
->
i_nb_samples
;
DoWork
(
(
aout_instance_t
*
)
p_filter
,
&
aout_filter
,
&
in_buf
,
&
out_buf
);
block_Release
(
p_block
);
p_out
->
i_buffer
=
out_buf
.
i_
nb_bytes
;
p_out
->
i_buffer
=
out_buf
.
i_
buffer
;
p_out
->
i_nb_samples
=
out_buf
.
i_nb_samples
;
return
p_out
;
...
...
modules/audio_filter/converter/neon.c
View file @
6c9479be
...
...
@@ -133,7 +133,7 @@ static void Do_F32_S32 (aout_instance_t *aout, aout_filter_t *filter,
:
"q0"
,
"q1"
,
"memory"
);
outbuf
->
i_nb_samples
=
inbuf
->
i_nb_samples
;
outbuf
->
i_
nb_bytes
=
inbuf
->
i_
nb_bytes
;
outbuf
->
i_
buffer
=
inbuf
->
i_
buffer
;
(
void
)
aout
;
}
...
...
@@ -196,6 +196,6 @@ static void Do_S32_S16 (aout_instance_t *aout, aout_filter_t *filter,
:
"q0"
,
"q1"
,
"q2"
,
"q3"
,
"memory"
);
outbuf
->
i_nb_samples
=
inbuf
->
i_nb_samples
;
outbuf
->
i_
nb_bytes
=
inbuf
->
i_
nb_bytes
/
2
;
outbuf
->
i_
buffer
=
inbuf
->
i_
buffer
/
2
;
(
void
)
aout
;
}
modules/audio_filter/equalizer.c
View file @
6c9479be
...
...
@@ -213,7 +213,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
{
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
;
p_out_buf
->
i_
buffer
=
p_in_buf
->
i_
buffer
;
EqzFilter
(
p_filter
,
(
float
*
)
p_out_buf
->
p_buffer
,
(
float
*
)
p_in_buf
->
p_buffer
,
p_in_buf
->
i_nb_samples
,
...
...
modules/audio_filter/normvol.c
View file @
6c9479be
...
...
@@ -179,7 +179,7 @@ static int Open( vlc_object_t *p_this )
}
p_out_buf
->
i_nb_samples
=
p_in_buf
->
i_nb_samples
;
p_out_buf
->
i_
nb_bytes
=
p_in_buf
->
i_
nb_bytes
;
p_out_buf
->
i_
buffer
=
p_in_buf
->
i_
buffer
;
/* Calculate the average power level on this buffer */
for
(
i
=
0
;
i
<
i_samples
;
i
++
)
...
...
modules/audio_filter/param_eq.c
View file @
6c9479be
...
...
@@ -189,7 +189,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
{
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
;
p_out_buf
->
i_
buffer
=
p_in_buf
->
i_
buffer
;
ProcessEQ
(
(
float
*
)
p_in_buf
->
p_buffer
,
(
float
*
)
p_out_buf
->
p_buffer
,
p_filter
->
p_sys
->
p_state
,
...
...
modules/audio_filter/resampler/bandlimited.c
View file @
6c9479be
...
...
@@ -204,13 +204,13 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
if
(
/*p_filter->b_continuity && /--* What difference does it make ? :) */
p_sys
->
i_old_wing
&&
p_in_buf
->
i_size
>=
p_in_buf
->
i_
nb_bytes
+
p_sys
->
i_old_wing
*
p_in_buf
->
i_
buffer
+
p_sys
->
i_old_wing
*
p_filter
->
input
.
i_bytes_per_frame
)
{
/* output the whole thing with the samples from last time */
memmove
(
((
float
*
)(
p_in_buf
->
p_buffer
))
+
i_nb_channels
*
p_sys
->
i_old_wing
,
p_in_buf
->
p_buffer
,
p_in_buf
->
i_
nb_bytes
);
p_in_buf
->
p_buffer
,
p_in_buf
->
i_
buffer
);
memcpy
(
p_in_buf
->
p_buffer
,
p_sys
->
p_buf
+
i_nb_channels
*
p_sys
->
i_old_wing
,
p_sys
->
i_old_wing
*
...
...
@@ -224,7 +224,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
date_Increment
(
&
p_sys
->
end_date
,
p_out_buf
->
i_nb_samples
)
-
p_out_buf
->
i_pts
;
p_out_buf
->
i_
nb_bytes
=
p_out_buf
->
i_nb_samples
*
p_out_buf
->
i_
buffer
=
p_out_buf
->
i_nb_samples
*
p_filter
->
input
.
i_bytes_per_frame
;
}
p_filter
->
b_continuity
=
false
;
...
...
@@ -458,7 +458,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
p_out_buf
->
i_length
=
date_Increment
(
&
p_sys
->
end_date
,
p_out_buf
->
i_nb_samples
)
-
p_out_buf
->
i_pts
;
p_out_buf
->
i_
nb_bytes
=
p_out_buf
->
i_nb_samples
*
p_out_buf
->
i_
buffer
=
p_out_buf
->
i_nb_samples
*
i_nb_channels
*
sizeof
(
int32_t
);
}
...
...
@@ -586,17 +586,17 @@ static block_t *Resample( filter_t *p_filter, block_t *p_block )
p_filter
->
p_sys
->
b_first
=
false
;
in_buf
.
p_buffer
=
p_block
->
p_buffer
;
in_buf
.
i_
nb_bytes
=
in_buf
.
i_size
=
p_block
->
i_buffer
;
in_buf
.
i_
buffer
=
in_buf
.
i_size
=
p_block
->
i_buffer
;
in_buf
.
i_nb_samples
=
p_block
->
i_nb_samples
;
out_buf
.
p_buffer
=
p_out
->
p_buffer
;
out_buf
.
i_
nb_bytes
=
out_buf
.
i_size
=
p_out
->
i_buffer
;
out_buf
.
i_
buffer
=
out_buf
.
i_size
=
p_out
->
i_buffer
;
out_buf
.
i_nb_samples
=
p_out
->
i_nb_samples
;
DoWork
(
(
aout_instance_t
*
)
p_filter
,
&
aout_filter
,
&
in_buf
,
&
out_buf
);
block_Release
(
p_block
);
p_out
->
i_buffer
=
out_buf
.
i_
nb_bytes
;
p_out
->
i_buffer
=
out_buf
.
i_
buffer
;
p_out
->
i_nb_samples
=
out_buf
.
i_nb_samples
;
return
p_out
;
...
...
modules/audio_filter/resampler/linear.c
View file @
6c9479be
...
...
@@ -149,11 +149,11 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
{
if
(
p_filter
->
b_continuity
&&
p_in_buf
->
i_size
>=
p_in_buf
->
i_
nb_bytes
+
sizeof
(
float
)
*
i_nb_channels
)
p_in_buf
->
i_
buffer
+
sizeof
(
float
)
*
i_nb_channels
)
{
/* output the whole thing with the last sample from last time */
memmove
(
((
float
*
)(
p_in_buf
->
p_buffer
))
+
i_nb_channels
,
p_in_buf
->
p_buffer
,
p_in_buf
->
i_
nb_bytes
);
p_in_buf
->
p_buffer
,
p_in_buf
->
i_
buffer
);
memcpy
(
p_in_buf
->
p_buffer
,
p_prev_sample
,