[Ffmpeg-devel] channel ordering and downmixing
Justin Ruggles
justinruggles
Sat Apr 7 03:36:29 CEST 2007
Michael Niedermayer wrote:
> Hi
>
> On Fri, Apr 06, 2007 at 08:17:29PM -0400, Justin Ruggles wrote:
> [...]
>
>>>
>>>>- have the decoder override the channel layout if it wants to
>>>>- user-level API: av_channel_mix_init(), av_channel_mix(),
>>>> av_channel_mix_close()
>>>>- the encoder can set the channel layout in encode_init or just set the
>>>> number of channels and set the mask to CHANNEL_MASK_NONE to let the
>>>> muxer decide
>>>>- if avctx->channel_layout.mask is CHANNEL_MASK_NONE, the muxer should
>>>> set the channel layout
>>>
>>>
>>>i think the AVCodec encoder should have a list of supported layouts and
>>>the user app should choose one
>>
>>Ok. Then you have muxer support to consider as well. e.g. pcm codecs
>>can support any layout, but certain containers only support particular
>>layouts. One solution to this might be for the muxer to also have a
>>list of supported layouts. Then we could either have the muxing fail if
>>the codec's layout is non-compatible with the muxer's list or else just
>>let it be on the user's head of they decide to mix incompatible layouts.
>
>
> adding such a list to the muxer is trivial if that is needed
That sounds ok. Things could get a little more complex at the user
level this way, but better there than within lav*.
>>>then there are no ff_/av_ prefixes on non static things
>>
>>True. I considered that, but I was mimicking the naming scheme for
>>codecs, parsers, and bitstream filters. Is it different in this case
>>because the channel layouts are const or because of history?
>
>
> alot of stuff in lav* is historically missnamed
Then do we have a clear statement somewhere regarding our preferred
naming scheme?
> i even suggest to completely ignore downmix coeffs first and design just the
> channel layout stuff that way we have a smaller set of things to consider
> and after the channel layout is done and in svn work on the downmix coeffs
> (just a random suggestion)
Sounds good to me. I have a clear idea of how to do it, and I have the
weekend off. :)
-Justin
More information about the ffmpeg-devel
mailing list