Hello, this is the first chunk of a large set designed to restructure the current channel layout. It is largely based off Anton's works from a couple of years ago, with several changes and expansion plans.
The rationale for a new API is multiple - currently layouts are limited to 63 channels maximum - often layouts are completely made up, or guessed, during transcoding leaving very little control to the user - expanding the API for future standards such as 128 Audio Objects is impossible or requires very hackish solutions To address the aforementioned issues, a new structure is proposed, containing a variety of new channel orders, the number of channels, and a union for a "classic" channel layout mask or a full custom map. Helper functions are provided and a new option type is introduced. Unfortunately this requires changing the codebase in several places. On the positive side, adding new channel order types becomes very easy, eg, Ambisonic support for Opus and MOV is implemented simply adding proper handling of a custom format. For a sneak peek on the changes required see this commit: https://github.com/kodabb/libav/commit/1601d988f355b1e48f7e4eeb18f8cac93ca5d2ed The whole patchset passes fate at any given time, and avtools are updated in conjuction with the relative library changes, so that compatibility and functionatily can be preserved during the conversion. Version bump is perfomed atomically at the end of the set. Some conversions are simple replacements while some other are definitely non-trivial and will require deep review. If you want to try out the whole working tree, head out to my tree https://github.com/kodabb/libav/commits/chl Cheers, Vittorio Anton Khirnov (5): Add a new channel layout API lavu: support AVChannelLayout AVOptions lavc: deprecate channel count/layout changing side data avframe: switch to the new channel layout API lavr: switch to the new channel layout API Vittorio Giovara (4): avtools: Use the new channel layout API in AVFrame lavfi: switch to the new channel layout API buffersrc: switch to the new channel layout API avtools: Use the new channel layout API in libavfilter avtools/avconv.c | 4 +- avtools/avconv_filter.c | 6 +- avtools/avplay.c | 4 +- libavcodec/avcodec.h | 5 + libavcodec/decode.c | 71 ++++-- libavcodec/encode.c | 9 + libavfilter/audio.c | 17 +- libavfilter/avfilter.c | 9 +- libavfilter/avfilter.h | 13 +- libavfilter/avfiltergraph.c | 35 ++- libavfilter/buffersink.c | 2 +- libavfilter/buffersrc.c | 53 +++-- libavfilter/buffersrc.h | 12 +- libavfilter/fifo.c | 7 +- libavformat/dump.c | 9 +- libavformat/utils.c | 9 + libavresample/audio_mix.c | 148 ++++++------ libavresample/audio_mix_matrix.c | 477 ++++++++++++++++++++++----------------- libavresample/avresample.h | 42 +++- libavresample/internal.h | 10 +- libavresample/options.c | 8 + libavresample/tests/avresample.c | 26 +-- libavresample/utils.c | 127 +++++++---- libavutil/channel_layout.c | 386 +++++++++++++++++++++++++------ libavutil/channel_layout.h | 361 ++++++++++++++++++++++++++--- libavutil/frame.c | 88 +++++++- libavutil/frame.h | 12 +- libavutil/opt.c | 48 ++++ libavutil/opt.h | 10 + libavutil/version.h | 3 + 30 files changed, 1507 insertions(+), 504 deletions(-) -- 2.12.0 _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel