On Mon, Jun 13, 2011 at 1:06 PM, Justin Ruggles
<[email protected]> wrote:
> On 06/13/2011 03:38 PM, Alex Converse wrote:
>
>> On Mon, Jun 13, 2011 at 11:41 AM, Justin Ruggles
>> <[email protected]> wrote:
>>>
>>> Only the low 31 bits are used for channel assignments. The high bit is a
>>> special-case flag bit used to indicate that any channel layout is supported.
>>
>> Is masking here the best choice (vs zero which seems to mean
>> unspecified or moving the channels to a new position)? Has a sample
>> where we mask off the top channels been tested?
>
>
> Setting it to zero is not as good because at least the low 18 bits match
> defined channels. The remaining channels without bits set in the channel
> mask would still be undefined.  MS documentation says "Should nChannels
> exceed the number of bits set in dwChannelMask, then the remaining
> channels are not assigned to any particular speaker location."
>

ok

> So here are the choices:
>
> 1) We keep channel_layout low 32 bits compatible with dwChannelMask and
> move all of channel mask values that aren't defined in
> WAVEFORMATEXTENSIBLE to the high 32 bits. This assumes Microsoft will
> actually use bits 19 to 31 at some point and that we want to avoid
> changing our API if that happens.
>
> 2) We make channel_layout compatible with only the defined values for
> dwChannelMask (low 18 bits) and mask off the rest. This allows us to
> keep AV_CH_STEREO_LEFT/RIGHT as-is and even use the other low bits if we
> want.
>
> As for testing samples... I don't have any files which utilize channels
> other than those defined in WAVEFORMATEXTENSIBLE.

Perhaps retag channels on an existing file that doesn't use those channels?

>  But clearly writing
> bits other than the low 18 is using reserved values and can only lead to
> no good.
>

ok
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to