[FFmpeg-devel] Correct libvorbis.c behaviour with >2 channels
Rob
robert.swain
Thu Jun 24 08:51:07 CEST 2010
On 23 June 2010 22:35, James Darnley <james.darnley at gmail.com> wrote:
> On 17 June 2010 10:21, Rob <robert.swain at gmail.com> wrote:
>> On 3 June 2010 11:35, James Darnley <james.darnley at gmail.com> wrote:
>>> On 3 June 2010 00:08, Justin Ruggles <justin.ruggles at gmail.com> wrote:
>>>> There are some patches on the issue tracker that might be useful.
>>>>
>>>> https://roundup.ffmpeg.org/issue1325
>>>>
>>>> This was only for 5.1 channels though. ?The vorbis spec has been
>>>> modified since then to support up to 7.1 I think... or more?
>>>
>>> Yes, it now has mappings for 1-8 channels.
>>>
>>> Any comments about putting the following in vorbis_data.c?
>>>
>>>>const uint8_t ff_vorbis_encoding_channel_layout_offsets[8][8] = {
>>>> ? ?{ 0, },
>>>> ? ?{ 0, 1, },
>>>> ? ?{ 0, 2, 1, },
>>>> ? ?{ 0, 1, 2, 3, },
>>>> ? ?{ 0, 2, 1, 3, 4, },
>>>> ? ?{ 0, 2, 1, 4, 5, 3, },
>>>> ? ?{ 0, 2, 1, 5, 6, 4, 3, },
>>>> ? ?{ 0, 2, 1, 6, 7, 4, 5, 3},
>>>>};
>>
>> These look correct and vorbis_data.c is the correct location I guess.
>> Unless it is only used for decoding, then I'm not sure.
>>
>>> Also, what should I do if someone tries to use more that 8 channels.
>>> Libvorbis appears to support it. ?Should this wrapper support it too
>>> or return an error?
>>
>> No. More channels are valid, but their order is defined by the
>> application as I recall. So >8 channels should just be pushed through
>> in the order they are in. Or maybe some might prefer that the first 8
>> channels of the output match the order for 8 channels and then the
>> rest are in the order as the come.
>
> Okay...
> Table added to vorbis_data.c
> Channel order not changed with more than 8 channels
>
> patch attached
Looks OK to me, but I'm not the maintainer. :)
Regards,
Rob
More information about the ffmpeg-devel
mailing list