CVS Commit: vlc
Jean-Paul Saman
saman at natlab.research.philips.com
Thu May 2 16:22:33 CEST 2002
Laurent Aimar wrote:
> On Thu, May 02, 2002, Jean-Paul Saman wrote:
>
>>It does not solve the problem. I noticed the audio to be faster then it
>>should be (at least twice) when running with avi plugin. Which gives a
>>nice effect, Jean-Claude sounded just like Donald Duck :-).
>
>
> It's really strange, because i 'v just done 'cvs update' and 'make' and
> for this file (only,for the other the sound the sound totally unusable)
> if I set ADEC_FRAME_SIZE to 2*512 it work for me( audio is quite perfect
> and video and audio are synchro all along the file ). Perhaps there is
> another problem (perhaps because hardware is different).
>
Hardware is definitly different, but that should not matter in speed ;-)
Then with other files we only have half of a frame or only one channel
decoded. Thats why it is 1152*2. The AOUT subsystem divides that by 2
because it used 2 buffers, this gives 1152 per buffer.
The function libmad_output receives a pcm buffer of exactly 1152*2 (left
and right channel), which makes the default ADEC_FRAME_SIZE mandatory to
1152*2. .. I think.
I'll check to night .. am at work now ..deadlines ;-(
>
>>One of my own MPEG2 files sounds terrible with current CVS version.
>>While in vlc-0.3.1 stable versions it is OK. So my guess is that it is
>>not simple related to mad or avi plugin, there is more to it.
>
>
>
> I've look at mad source and i've see that for mpeg layer 3 the
> length of pcm output ( in libmad_output it is p_libmad_pcm->length i
> think ) is not a constant like for other layer. it's defined by 32 *
> MAD_NSBSAMPLES(header) where
>
> # define MAD_NSBSAMPLES(header) \
> ((header)->layer == MAD_LAYER_I ? 12 : \
> (((header)->layer == MAD_LAYER_III && \
> ((header)->flags & MAD_FLAG_LSF_EXT)) ? 18 : 36)
> ( and header is the header for a mpeg audio frame )
>
> So, In layer 3 there is two sort of frame : short(for transition, 576
> samples ) and long(1152 samples). But if i am not wrong, this is not
> supported in plugin mad for vlc.
>
> About other thing: for me mono audio always make vlc to segfault,
> whereas builtin mpeg decoder have very bad sound but don't segfault. I
> don't know if i am the only one who see that.
>
> About the way that i call the audio decoder by MPEG2_AUDIO_ES is
> because i can't know what really it is (i know only the layer), (avi
> file format sux), but even if i change it, it does nothing. Unless I 'm
> wrong, mad plugin don't use it for decoding purpose but only to say if
> it can decoded the stream, and it can do mpeg-I and II.
>
>
In mad plugin itself I do not know anything about layer I, II or III.
The handling of MPEG1/2 layer I, II or III is left up to the mad decoder
itself. So it is virtual impossible to adapt strategy there.
--
Kind greetings,
Jean-Paul Saman
Software Architect
e-mail (work): saman at natlab.research.philips.com
phone (work): 040 27 42909
------------------------------------------------------------
Ordina TA,
Science Park Eindhoven 5602, Postbus 293, 5600 AG Eindhoven
e-mail : jean-paul.saman at ordina.nl
phone : 040 2601200
fax : 040 2601199
--
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://www.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>
More information about the vlc-devel
mailing list