[MPlayer-dev-eng] [RFC] Support for 8 channel audio

Jason Tackaberry tack at urandom.ca
Fri Aug 14 21:58:44 CEST 2009


On Fri, 2009-08-14 at 21:26 +0200, Reimar Döffinger wrote:
> If you are ready to assume a modern compiler, this could be done a bit
> nicer with e.g.
> memcpy(dest_8+3*0, src_8+3*s0, 3);
> memcpy(dest_8+3*1, src_8+3*s1, 3);
> memcpy(dest_8+3*2, src_8+3*s2, 3);

Are we ready to assume that?  I'm happy to, I just followed the pattern
from the existing code.


> At least I would suggest using s[8] instead of s0..s7
> and then
> for (j = 0; j < 8; j++) {
> dest_8[i+3*j] = src_8[i+3*s[0]];
> ...
> }

I assumed the original author unrolled the loop for performance.  I
haven't done any benchmarking, again I just basically copied the
existing 6ch code and extended it for 8ch.

Is there a preferences to either approach?  Should I update the existing
5ch and 6ch functions as well?


> > +    if (ao_data.channels == 6 || ao_data.channels == 5 || ao_data.channels == 8) {
> 
> Having this in some kind of order would be nice.

The conditions /are/ in order: from most likely to least likely to occur. :)

I'll update to numerical order.

Thanks for taking a look.

Cheers,
Jason.





More information about the MPlayer-dev-eng mailing list