[FFmpeg-devel] [PATCH 1/9] lavfi: support unknown channel layouts.

Nicolas George nicolas.george at normalesup.org
Sat Dec 29 11:43:28 CET 2012


Le nonidi 9 nivôse, an CCXXI, Stefano Sabatini a écrit :
> would be possible to remove the special conditions, and add something
> like:
> 
> int all_known_channel_layouts;
> int all_channels_layouts;
> ?

I do not understand exactly what you mean, but the next two patches
introduce helper functions to create this kind of lists.

> Why the new define is required?

We need a way to distinguish known and unknown layouts. It was either a flag
or a different field in the AVFilterChannelLayouts structure. The flag
seemed slightly simpler.

> It is unlikely, but it could conflict with a possible *known* channel
> layout,

AFAIK, no, because of this:

/** Channel mask value used for AVCodecContext.request_channel_layout
    to indicate that the user requests the channel order of the decoder output
    to be the native codec channel order. */
#define AV_CH_LAYOUT_NATIVE          0x8000000000000000ULL

The bit 63 is already reserved for something else elsewhere.

>	  and also doesn't allow to express a number of channels greater
> than 63.

You are mistaken (or possibly confused with my previous proposal, which
indeed had that limitation): the code is AV_CH_LAYOUT_UNKNOWN|n to code for
n channels, that puts the limit at 9223372036854775807 channels, and the
rest of the code is limited to 2147483647 anyway since channel counts are
ints.

>	   A possibly better solution would be to rely on the couple
> (channel_layout, channel_count) which encodes all the required
> information. Is there any reason for not doing like that?

That would require updating all filters that manipulate the
AVFilterChannelLayouts directly, and in particular maintaining filters from
the fork.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121229/88ef4c53/attachment.asc>


More information about the ffmpeg-devel mailing list