[MPlayer-dev-eng] liba52
Arpi
arpi at thot.banki.hu
Sun Dec 9 20:24:38 CET 2001
Hi,
I've spent this day with understanding liba52 and implementing -ac a52
into mplayer. It works now, just commited last changes.
Please test it with 4 and 6 speaker configurations, i couldn't.
Some words about liba52:
it's lowlevel stuff, compared to libac3.
You have more control over the decoding process than with libac3.
1. you should sync stream, by reading bytes and verify with a52_syncinfo()
-> it will return samplerate and sample format (channels setup)
2. you have to call a52_frame() with requested(!) output channel setup to
get a single frame parsed and downsampled (N->M channels conversion).
3. you have to call a52_block() 6 times to get 6 x 256 samples blocks.
each block has float samples for each channel, you have to convert
to int (s16) and interleave it depending on audio card requirements.
For step 3, i've added resample.c to liba52, it's from a52dec sample
program, and should be extended and optimized later.
It has conversion stuff for most common setups (1/2/4/5/6 speakers).
TODO:
- test it with various ac3 streams (currently i've only one,
as my hdd with vobs is crashed :((()
- implement required resample functions
- optimize resample functions
- port optimized imdct from libac3 (if possible, or optimize new one)
note, that libac3's 3dnow optimization is buggy, some users reported high
noises using it
- finally remove libac3 from mplayer, and port back changes to liba52 cvs
good work :)
A'rpi / Astral & ESP-team
--
mailto:arpi at thot.banki.hu
http://esp-team.scene.hu
More information about the MPlayer-dev-eng
mailing list