James Almer
aa0829d834
fate: update reference files after the recent dash manifest muxer changes
...
Missed in 487b49d8f2 .
Signed-off-by: James Almer <jamrial@gmail.com >
2022-04-08 16:08:53 -03:00
James Almer
487b49d8f2
avformat/webmdashenc: fix on-demand profile string
...
Fixes ticket #9596
Signed-off-by: James Almer <jamrial@gmail.com >
2022-04-07 21:57:42 -03:00
James Almer
3e186148ca
avcodec/libdav1d: don't depend on the event flags API to init sequence params the first time
...
A bug was found in dav1d <= 1.0.0 where the event flag New Sequence Header would
not be signaled for some samples using delayed random access points.
It has since been fixed, but nonetheless it's best to ensure the AVCodecContext
is filled with parameters when parsing the first frame, regardless of what events
were signaled.
Fixes ticket #9694 .
Signed-off-by: James Almer <jamrial@gmail.com >
2022-04-07 15:28:50 -03:00
James Almer
e3c4442b24
avcodec/libsvtav1: give svtav1-params priority over avctx values
...
If the svt equivalent option to an avctx AVOption is passed by the user
then it should have priority. The exception are fields like dimensions, bitdepth
and pixel format, which must match what lavc will feed the encoder after init.
This addresses libsvt-av1 issue #1858 .
Signed-off-by: James Almer <jamrial@gmail.com >
2022-04-07 12:15:39 -03:00
James Almer
c9ecbc08a1
tests: use a filtergraph script for fate-mov-channel-description
...
Should fix running the test on certain shells
Signed-off-by: James Almer <jamrial@gmail.com >
2022-04-05 21:25:26 -03:00
James Almer
cc6c5ff201
avcodec/libvpxenc: avoid unnecessary variable shadowing
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-04-05 12:19:04 -03:00
James Almer
0e03807f69
fate: add a test for writing channel descriptions in mov
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-04-05 09:19:59 -03:00
James Almer
7ccc910803
avformat/movenc: don't use mono layout when a front center label is expected
...
On output streams where a multichannel stream needs to be stored as one track
per channel, each track will have a channel layout describing the position of
the channel they contain. For the track with front center, the mov muxer was
using the mov layout "mono" instead of the label for the front center position.
Since our channel layout API considers front center == mono, we need to do some
heuristics. To achieve this, we make sure all audio tracks contain streams with
a single channel, and only one of them is front center. In that case, we write
the front center label instead of signaling mono layout.
Fixes the last part of ticket #2865
Signed-off-by: James Almer <jamrial@gmail.com >
2022-04-05 09:19:59 -03:00
James Almer
feb3b44c1c
avformat/mov_chan: move the definition of MovChannelLayoutTag to the header
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-04-05 09:19:59 -03:00
James Almer
c2c5f34843
avformat/movenc: write channel descriptions when a known layout or a bitmap can't be used
...
Fixes part of ticket #2865
Signed-off-by: James Almer <jamrial@gmail.com >
2022-04-05 09:19:59 -03:00
James Almer
b4373bc422
avformat/mov_chan: use a higher log level for a debug message
...
Trace is too noisy and this line is useful enough to get it printed
at debug level.
Signed-off-by: James Almer <jamrial@gmail.com >
2022-04-05 09:19:58 -03:00
James Almer
603f2245d4
avformat/mov_chan: add a few missing channel label mappings
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-04-05 09:19:58 -03:00
James Almer
90ef712de5
avformat/mov_chan: rename mov_get_channel_label() to better reflect its purpose
...
This function turns a mov channel label into a lavf native bitmask.
Signed-off-by: James Almer <jamrial@gmail.com >
2022-04-05 09:19:58 -03:00
James Almer
5021b2ba06
avcodec/dfa: don't check for the bitstream version on every copied line
...
And use av_image_copy_plane() while at it to simplify things for
version != 0x100.
Signed-off-by: James Almer <jamrial@gmail.com >
2022-04-02 00:24:44 -03:00
James Almer
7c35aa60a5
avcodec/wmalosslessdec: ensure channel count in the private context and decoder context are consistent
...
Fixes: Out of array write
Fixes: 45613/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-4539073606320128
Fixes: 46008/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-4681245747970048
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-29 16:34:56 -03:00
James Almer
5ee198f9aa
swresample/rematrix: fix typo in clean_layout()
...
av_channel_layout_index_from_channel() takes an AVChannel value, not a mask.
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-28 00:07:42 -03:00
James Almer
4a8f932fd9
avfilter/buffersrc: uninitialize the context ch_layout before overwritting it
...
av_buffersrc_parameters_set() can be called to set paramenters after the filter
was initialized with for example avfilter_graph_create_filter().
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-27 22:22:24 -03:00
James Almer
f2967490f1
avutil/channel_layout: return earlier on UNSPEC layouts in av_channel_layout_subset()
...
No point running all 64 iterations in the loop to never write anything to ret.
Also make ambisonic layouts check its mask too while at it.
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-25 17:10:39 -03:00
James Almer
7602b4e4c2
avutil/tests/channel_layout: also test ambisonic layouts in av_channel_layout_subset()
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-25 17:10:39 -03:00
James Almer
cbeb827cfb
avutil/tests/channel_layout: test av_channel_layout_check()
...
Should increase test coverage
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-25 12:09:21 -03:00
James Almer
95ac380252
avutil/tests/channel_layout: test the output of av_channel_layout_subset()
...
Should increase test coverage a bit
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-25 12:09:19 -03:00
James Almer
167c5a6afc
avutil/tests/channel_layout: test the output of av_channel_layout_standard()
...
Should increase test coverage.
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-25 11:46:51 -03:00
James Almer
f9ed91abc9
avutil/tests/channel_layout: test generating a custom layout using ambisonic channels and a non diegetic channel with a custom name
...
Should increase test coverage a bit
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-25 11:46:48 -03:00
James Almer
1e24fad867
doc/utils: add missing 22.2 layout entry
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-25 09:26:45 -03:00
James Almer
e4f6fce9e0
avutil/channel_layout: add missing check for AV_CHAN_NONE in av_channel_description
...
Prevents printing "user -1" on invalid channel ids.
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-25 09:24:39 -03:00
James Almer
b04f14136e
fftools/opt_cmdutils: fix printing known channel layouts
...
Look for the generic "USR" labels instead of "?" to skip channels with no
known names, and actually print the decomposition of standard channel layouts.
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-25 08:42:45 -03:00
James Almer
6e04ace7fe
avutil/channel_layout: don't try to print NULL string pointers in av_channel_{name,description}
...
Instead fallback to print USR%d for channels id < 64 without a known name.
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-25 08:38:19 -03:00
James Almer
b65ce7bed8
Revert "avcodec/av1dec: Check tile_cols"
...
This reverts commit 4fdfe430c1 .
The previous commit ensures this field will never be zero.
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-23 12:03:57 -03:00
James Almer
5670eddf8c
avcodec/av1: only set the private context pix_fmt field if get_pixel_format() succeeds
...
Otherwise get_pixel_format() will not be called when parsing a subsequent Sequence
Header in non hwaccel enabled scenarios, allowing frame parsing when it shouldn't.
This prevents the scenario seqhdr -> frame_hdr/redundant_frame_hdr -> seqhdr ->
redundant_frame_hdr from having the latter redundant frame header parsed as if it
was a frame header by the decoder because the former was discarded.
Since CBS did not discard it, the latter redundant frame header is output with a
zeroed AV1RawFrameHeader struct, which can have undesired results, like division
by zero with fields normally guaranteed to be anything else.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-23 12:03:57 -03:00
James Almer
e78173557d
ffmpeg: make the ac option set the demuxer's ch_layout AVOption
...
channels is deprecated on all supported raw demuxers.
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-22 08:45:39 -03:00
James Almer
639c2f0049
ffmpeg: add a ch_layout option as an alias to channel_layout
...
This ensures it's parsed as a CLI option instead of the AVCodecContext AVOption.
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-22 08:45:38 -03:00
James Almer
bc99e3a9d6
ffmpeg: replace custom channel_layout code with an SpecifierOpt based one
...
This is cleaner and allows fine tuning which stream the option is applied to.
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-22 08:45:38 -03:00
James Almer
e6e86a3907
avformat/test/seek: set ch_layout instead of channels
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-22 08:45:38 -03:00
James Almer
edd26bca60
avformat/dfpwmdec: add support to set channel layout
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-22 08:45:38 -03:00
James Almer
e42e54fa4e
avformat/pcmdec: add support to set channel layout in sln demuxer
...
Deprecate the channels option, and ensure ch_layout has priority if set over
channels, until the latter is gone.
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-22 08:45:38 -03:00
James Almer
5cd6cb9f05
avformat/pcmdec: deprecate channels option
...
And ensure ch_layout has priority if set over channels, until the latter is
gone.
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-22 08:45:34 -03:00
James Almer
6bab6afecc
avcodec/wmaprodec: ensure channel count in the private context and decoder context are consistent
...
avctx->ch_layout will be reinitialized using channel_mask later in the
function.
Fixes: 45736/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMAPRO_fuzzer-5769886813519872
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-21 16:12:04 -03:00
James Almer
37f4440682
avformat/demux: ensure ch_layout is not lost in the stream's internal avctx
...
This is a workaround until avcodec_close() stops freeing ch_layout through
av_opt_fre(), or the former is removed.
Fixes a regression since 327efa6633 .
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-21 08:50:28 -03:00
James Almer
efdde028bb
avcodec/opus: always use ambisonic layout for mapping family 2
...
No need to use a Custom layout when the non diegetic channels can be
described as a standard mask.
This fixes:
45684/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBOPUS_fuzzer-5039410989629440
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-20 19:23:12 -03:00
James Almer
327efa6633
avutil/opt: add missing case for AV_OPT_TYPE_CHLAYOUT in av_opt_free()
...
Fixes potential memleaks for existing options of this type.
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-18 18:59:03 -03:00
James Almer
c606736836
gitignore: add config_components.h
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-17 18:35:41 -03:00
James Almer
b06eba6b7c
Makefile: check config_components.h when comparing timestamps in component list files
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-17 18:35:41 -03:00
James Almer
3feabcd5ef
Makefile: delete config_components.h on distclean
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-17 18:35:41 -03:00
James Almer
0af06344cd
avformat/boadec: fix check for invalid channel count
...
Regression since 8269fbcb7a .
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-17 16:52:08 -03:00
James Almer
85b7be53e1
avcodec/setts_bsf: don't repeatedly set start pts and dts
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-17 13:04:44 -03:00
James Almer
c5628ae347
fate: add a setts bsf test
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-17 13:04:44 -03:00
James Almer
c834083861
avcodec/setts_bsf: fix setting output timebase
...
Set a valid max value for the option, and also check numerator before
assuming the value is useful.
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-16 23:43:07 -03:00
James Almer
11c4f4b455
ffmpeg: remove usage of internal deprecation macro
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-16 13:00:42 -03:00
James Almer
8ddf1795b9
avutil/attributes: add support for clang in AV_NOWARN_DEPRECATED
...
Reviewed-by: Martin Storsjö <martin@martin.st >
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-16 12:29:37 -03:00
James Almer
f2fe17c56d
avutil/channel_layout: remove duplicate stereo downmix entry
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 22:54:41 -03:00
James Almer
3aeeee1597
avcodec/hevc_refs: don't use the frame's AVBufferRef sizes when initializing planes
...
Use the actual plane sizes instead.
Reviewed-by: Anton Khirnov <anton@khirnov.net >
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 18:16:54 -03:00
James Almer
f5d67469b0
avfilter/buffersink: simplify parsing the input channel layout string
...
And remove a stray comma in the list of supported separators.
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 14:29:04 -03:00
James Almer
cdba98bb80
Bump minor versions after the channel layout changes
...
Forgotten in the respective commits adding new API.
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 11:12:21 -03:00
James Almer
55740299ef
avfilter/af_sofalizer: fix getting speaker position
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 11:09:31 -03:00
James Almer
f0be7c1057
avcodec/audiotoolboxenc: add missing AVCodec.ch_layouts
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 10:57:08 -03:00
James Almer
739c96ba1a
avcodec/dca_lbr: set nchannels
...
Fixes warnings about uninitialized values
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 10:37:54 -03:00
James Almer
a02663d997
avcodec/audiotoolboxenc: use the correct macros for standard channel layouts
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 10:27:12 -03:00
James Almer
793c85bc4d
avcodec/audiotoolboxenc: use the correct function name
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 10:18:53 -03:00
James Almer
2f8ccca2fa
tools/target_{bsf,dec}_fuzzer: convert to new channel layout-API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:47 -03:00
James Almer
f5ef91e020
doc/examples: convert to new channel layout-API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:47 -03:00
James Almer
50e9e11316
tools: convert to new channel layout-API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:47 -03:00
James Almer
7d532f474d
tests: convert to new channel layout-API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:47 -03:00
James Almer
0995e1f1b3
ffplay: convert to new channel layout-API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:46 -03:00
James Almer
a8b885f294
ffprobe: convert to new channel layout-API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:46 -03:00
James Almer
987763ac35
ffmpeg: convert to new channel layout-API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:46 -03:00
James Almer
53d60aafaf
avdevice/lavfi: remove call to deprecated function av_buffersink_get_channel_layout()
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:46 -03:00
James Almer
1f96db959c
avfilter: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:46 -03:00
James Almer
8a5896ec1f
swresample: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:46 -03:00
James Almer
2b1fd08f3f
speex: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:45 -03:00
James Almer
35789608ae
siren: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:45 -03:00
James Almer
6d8b25841c
mf: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:43 -03:00
James Almer
b5b18440f1
hca: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:42 -03:00
James Almer
4d73dc14de
fastaudio: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:41 -03:00
James Almer
441fe2508d
dfpw: convert to new channel layout API
2022-03-15 09:42:41 -03:00
James Almer
4b58583171
uncodedframecrcenc: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:38 -03:00
James Almer
d38166a832
svs: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:37 -03:00
James Almer
6f1a9effef
sndio: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:37 -03:00
James Almer
87e092348b
sga: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:37 -03:00
James Almer
4a0bd4393c
scd: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:37 -03:00
James Almer
c218144748
pulseaudio: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:36 -03:00
James Almer
0b07a53170
pp_bnk: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:36 -03:00
James Almer
16970e1acb
openal: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:35 -03:00
James Almer
3654db79f4
moflex: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:34 -03:00
James Almer
8819a3200b
mca: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:34 -03:00
James Almer
51c2c6ff59
libopenmpt: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:34 -03:00
James Almer
eac3a902a4
libmodplug: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:34 -03:00
James Almer
d85b577f98
libgme: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:34 -03:00
James Almer
678c1952a9
avdevice/lavfi: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:34 -03:00
James Almer
1c22a29e1a
kvag: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:34 -03:00
James Almer
c94220e96d
imx: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:33 -03:00
James Almer
dd25ca02ae
hls_sample_encryption: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:33 -03:00
James Almer
d71bddbbe9
hca: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:33 -03:00
James Almer
7261f2a180
fwse: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:32 -03:00
James Almer
daf329fc38
dshow: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:31 -03:00
James Almer
5cb02982a5
dfpw: convert to new channel layout API
2022-03-15 09:42:31 -03:00
James Almer
a64494df49
derf: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:31 -03:00
James Almer
d03b327787
decklink: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:31 -03:00
James Almer
3b3b8eb8ef
chromaprint: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:31 -03:00
James Almer
64f27c10ee
apm: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:30 -03:00
James Almer
39cc2d05af
amv: convert to new channel layout API
...
Signed-off-by: James Almer <jamrial@gmail.com >
2022-03-15 09:42:30 -03:00