[MPlayer-advusers] Re: FAAD problem on AMD64: no sound

Daniel Hottinger mplayer at hotti.ch
Mon Mar 28 16:04:43 CEST 2005


Hi

After two evenings of bug-hunting I have made some progress.

* On the 84th day of the year MMV a.d., Daniel Hottinger wrote:
> Attila pointed out that Debian uses an old version of automake by
> default. With 1.6 I got the latest snapshot to compile. This is
> an improvement since now I get sound (sort of). It sounds choppy
> and plays too slow. I'll have a deeper look at it tomorrow and
> will report my progress.

I've tried another file with only two channels (44100 Hz, 2 ch,
s16le, 128.0 kbit) Result:

    - no sound with internal libfaad on amd64 but plays ok on x86
    - plays perfect with external libfaad on amd64 and x86

For ftp://ftp.mplayerhq.hu/MPlayer/incoming/zx.eva.renewal.01.divx511_first_5mb_amd64.mkv
(6 channels):

    - plays with internal libfaad on x86
    - no sound with internal libfaad on amd64
    - external libfaad provides (recognizable) sound on x86 
      /and/ amd64 (but it's very choppy)

I have tracked the last point down to the function
raw_data_block() in libfaad/syntax.c in the cvs-snapshot of
libfaad. The loop


|       while ((id_syn_ele = (uint8_t)faad_getbits(ld, LEN_SE_ID
|           DEBUGVAR(1,4,"NeAACDecDecode(): id_syn_ele"))) != ID_END)
|        {

is traversed four(!) times for the 6 channel file. The value of
in_syn_ele is 0, 1, 1, 0 (ID_SCE, ID_CPE, ID_CPE, ID_SCE). As a
consequence hDecoder->fr_channels has the value 8 (should
probably be 6!). Inserting

|            if (hDecoder->fr_channels == 6)
|                break;

just after the quoted source above eliminates the noise and the
sound is played correctly for the center/lfe-channel (i think, i
have to downmix to four channels because my hardware is 4.0 and
not 5.1). The other channels are silent.

I do not know where to search further. The bug with 8 instead of
6 channels seems to be fixed in the internal libfaad but the fix
does not seem to be 64 bit clean.

So long,

Hotti

-- 
I was trained in the culture of mathematics, so I'm not used to charging 
people a penny every time they use a theorem I proved. But I charge somebody 
for the time I spend telling them which theorem to apply.  -- D.E. Knuth




More information about the MPlayer-advusers mailing list