[FFmpeg-devel] Channel layouts for aac encoding/decoding and vorbis decoding
Mon Aug 10 22:39:31 CEST 2009
Nicolas George wrote:
> Le tridi 23 thermidor, an CCXVII, Benjamin Larsson a ?crit :
>> The FFmpeg codecs should use that layout for output and input. Though
>> there are still some codecs that do not adhere to that.
> Is it really the best option? Channels reordering is a non-trivial
> operation, it may be costly.
> I admit I did not run any benchmark, but if, for example, I use libfaad
> through lavc and play the resulting file to the sound card, the idea that
> lavc is converting the FC-FL-FR-RL-RR-LF order from libfaad to its internal
> FL-FR-FC-LF-RL-RR while I have to convert it once again to FL-FR-RL-RR-FC-LF
> as expected by ALSA, is somewhat disturbing. It would be best if the
> reordering could be done only once.
I agree but I think that is better addressed with the use of planar (ie.
non-interleaved) audio. Than a transcoding from one codec to another
with ffmpeg would not require any reordering at all (just some pointer
swizzling). And output to Alsa, PulseAudio, whatever would just require
one interleaving step (just as you mention)
Having said that I still think the use of a coherent channel order for
interleaved audio was (and still is) a good intermediate step.
More information about the ffmpeg-devel