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

Ulion ulion2002 at gmail.com
Mon Nov 19 02:41:52 CET 2007


2007/11/19, Ulion <ulion2002 at gmail.com>:
> 2007/11/17, Ulion <ulion2002 at gmail.com>:
> > 2007/11/17, Corey Hickey <bugfood-ml at fatooh.org>:
> > > 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.
> >
> > Hmm.
> >
> > >
> > > >> 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
> > >
> >
> > Thank you for testing, I found all my self swap macro missed the loop
> > variable 'i', now attached version should work.
> >
>
> slight update version, using mp_msg, add missed ao_pcm, ae_lavc
>

Sorry, I must be sleepy, made some mistake in the last post, here's
fixed version
also add an option for ao_pcm to decide whether doing the reorder.


-- 
Ulion
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reorder_func4.diff
Type: text/x-diff
Size: 49217 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20071119/7e72c708/attachment.diff>


More information about the MPlayer-dev-eng mailing list