[iPAQ port] libmad audio decoder

Jean-Paul Saman jpsaman at wxs.nl
Fri Nov 23 15:33:38 CET 2001


 
Based on Henri Fallon's decoder modularization work in file
"vlc-20011108-mod1.tar.gz", libmad is added as an audio decoder. The
source can be found at:
http://home.wxs.nl/~jpsaman/ choose videolan in the menu and get
vlc-devel-libmad-0.14.2b-20011120.tgz
 
Current status:
+ compile and configure libmad from extras/libmad. From top-level
directory do make libmad (this copies libmad.a to lib/, so it can be
linked with mad_adec in the same way vlc uses.
+ audio is out of sync with video (date/timestamp is made at wrong
moment)
+ audio dropouts can still occur
+ cleaning up of audio output with smoothing and scaling algorithms
needed.
 
An iPaq package can be found at: http://home.wxs.nl/~jpsaman/ the
package is named vlc_0.2.90_arm.ipk
The arm compiled source code version is at the same page. I called it
vlc-devel-libmad-0.14.2b-20011121-armv4l.tgz
It has x11, gtk, mad_adec (libmad audio decoder) and dsp support.
 
On Intel audio is also out of sync with the video, this needs to be
fixed. However I'm not sure how it should be synced in vlc. There are
two functions an libmad_input and a libmad_output. Currently a date
stamp is set in this way (as lpcm_adec does), but there it happens
before decoding the frame. Now it is done after decoding a frame in
libmad_output, as result out of sync with video.

if( DECODER_FIFO_START(*p_mad_adec->p_fifo)->i_pts )
{

 p_mad_adec->p_aout_fifo->date[p_mad_adec->p_aout_fifo->l_end_frame] =
            DECODER_FIFO_START(*p_mad_adec->p_fifo)->i_pts;
       DECODER_FIFO_START(*p_mad_adec->p_fifo)->i_pts = 0;
}
else
{

 p_mad_adec->p_aout_fifo->date[p_mad_adec->p_aout_fifo->l_end_frame] =
        LAST_MDATE;
}
 
I guess it should be done in libmad_input, but using the same code in
there triggers a crash. How does syncing work in vlc ? (especially with
the new decoder plugin structure).

Greetings,
Jean-Paul Saman




More information about the vlc-devel mailing list