[MPlayer-dev-eng] [PATCH] [TEST FUNC] Multi-channel reorder function

Corey Hickey bugfood-ml at fatooh.org
Sat Nov 17 07:47:01 CET 2007


Ulion wrote:
> Hello, Corey,
> 
> First of all, thank you for review and test my reorder function.

You're welcome.

>>> +#define REORDER_COPY_5(DEST,SRC,SAMPLES,S0,S1,S2,S3,S4) \
>> It seems like all these reorder macros would be nicer as (possibly
>> inline) functions. Do you have a particular reason for having them as
>> macros?
> 
> Sorry because I didn't familar with inline functions, so I wrote this
> macro codes. I don't know whether they (macro and inline) will have
> same performance. Also, I didn't really mean to make this patch tobe
> commited, just show the idea here and push the bug fix sooner. Indeed
> in the irc, the discuss result seems choose a lightweight hack to fix
> the reorder bug since all current patches are hackes.

Ok. I don't use IRC, so I don't know what the current situation there
is, but I thought it might be worthwhile to test your patch out.

>> You're missing a reorder for ao_pcm.c.
>>
> 
> That use a fwrite function, unless I change the input buffer by swap
> functions, or write a reorder fwrite, neither is prefered by me, so I
> didn't patch that file.

Hmm. Keep it in mind, though, if your patch is determined to be the
useful way to go. Something will have to be done for ao_pcm regardless.

>> I got mplayer to compile with this patch (after adding the missing
>> #include), but it doesn't seem to be properly reordering the channels on
>> playback of a 6-channel WAVE file.
>>
>> http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/Samples/Microsoft/6_Channel_ID.wav
> 
> That sounds bad, after a quick look, I didn't found the reason make it
> fail. So what's the detail wrong channel status after this patch, or
> before this patch?

Unpatched mplayer has the wrong channel order, since the WAVE channel
order is different. With your patch, the order remains the same, and,
now that I listen again, there's some faint but sharp crackling introduced.

mplayer    WAVE
FL         FL
FR         FR
BL         C
BR         LFE
C          BL
LFE        BR


-Corey



More information about the MPlayer-dev-eng mailing list