git.videolan.org Git - ffmpeg.git/rss log
FFmpeg git repo
Les articles publiés sur le site
-
avformat/iamf : fix setting channel layout for Scalable layers
17 juin, par James Almeravformat/iamf: fix setting channel layout for Scalable layers The way streams are coded in an IAMF struct follows a scalable model where the channel layouts for each layer may not match the channel order our API can represent in a Native order layout. For example, an audio element may have six coded streams in the form of two stereo streams, followed by two mono streams, and then by another two stereo streams, for a total of 10 channels, and define for them four scalable layers with loudspeaker_layout values "Stereo", "5.1ch", "5.1.2ch", and "5.1.4ch". The first layer references the first stream, and each following layer will reference all previous streams plus extra ones. In this case, the "5.1ch" layer will reference four streams (the first two stereo and the two mono) to encompass six channels, which does not match out native layout 5.1(side) given that FC and LFE come after FL+FR but before SL+SR, and here, they are at the end. For this reason, we need to build Custom order layouts that properly represent what we're exporting. ---- Before: Stream group #0:0[0x12c]: IAMF Audio Element: Layer 0: stereo Stream #0:0[0x0]: Audio: opus, 48000 Hz, stereo, fltp (default) Layer 1: 5.1(side) Stream #0:0[0x0]: Audio: opus, 48000 Hz, stereo, fltp (default) Stream #0:1[0x1]: Audio: opus, 48000 Hz, stereo, fltp (dependent) Stream #0:2[0x2]: Audio: opus, 48000 Hz, mono, fltp (dependent) Stream #0:3[0x3]: Audio: opus, 48000 Hz, mono, fltp (dependent) Layer 2: 5.1.2 Stream #0:0[0x0]: Audio: opus, 48000 Hz, stereo, fltp (default) Stream #0:1[0x1]: Audio: opus, 48000 Hz, stereo, fltp (dependent) Stream #0:2[0x2]: Audio: opus, 48000 Hz, mono, fltp (dependent) Stream #0:3[0x3]: Audio: opus, 48000 Hz, mono, fltp (dependent) Stream #0:4[0x4]: Audio: opus, 48000 Hz, stereo, fltp (dependent) Layer 3: 5.1.4 Stream #0:0[0x0]: Audio: opus, 48000 Hz, stereo, fltp (default) Stream #0:1[0x1]: Audio: opus, 48000 Hz, stereo, fltp (dependent) Stream #0:2[0x2]: Audio: opus, 48000 Hz, mono, fltp (dependent) Stream #0:3[0x3]: Audio: opus, 48000 Hz, mono, fltp (dependent) Stream #0:4[0x4]: Audio: opus, 48000 Hz, stereo, fltp (dependent) Stream #0:5[0x5]: Audio: opus, 48000 Hz, stereo, fltp (dependent) ---- AFter: Stream group #0:0[0x12c]: IAMF Audio Element: Layer 0: stereo Stream #0:0[0x0]: Audio: opus, 48000 Hz, stereo, fltp (default) Layer 1: 6 channels (FL+FR+SL+SR+FC+LFE) Stream #0:0[0x0]: Audio: opus, 48000 Hz, stereo, fltp (default) Stream #0:1[0x1]: Audio: opus, 48000 Hz, stereo, fltp (dependent) Stream #0:2[0x2]: Audio: opus, 48000 Hz, mono, fltp (dependent) Stream #0:3[0x3]: Audio: opus, 48000 Hz, mono, fltp (dependent) Layer 2: 8 channels (FL+FR+SL+SR+FC+LFE+TFL+TFR) Stream #0:0[0x0]: Audio: opus, 48000 Hz, stereo, fltp (default) Stream #0:1[0x1]: Audio: opus, 48000 Hz, stereo, fltp (dependent) Stream #0:2[0x2]: Audio: opus, 48000 Hz, mono, fltp (dependent) Stream #0:3[0x3]: Audio: opus, 48000 Hz, mono, fltp (dependent) Stream #0:4[0x4]: Audio: opus, 48000 Hz, stereo, fltp (dependent) Layer 3: 10 channels (FL+FR+SL+SR+FC+LFE+TFL+TFR+TBL+TBR) Stream #0:0[0x0]: Audio: opus, 48000 Hz, stereo, fltp (default) Stream #0:1[0x1]: Audio: opus, 48000 Hz, stereo, fltp (dependent) Stream #0:2[0x2]: Audio: opus, 48000 Hz, mono, fltp (dependent) Stream #0:3[0x3]: Audio: opus, 48000 Hz, mono, fltp (dependent) Stream #0:4[0x4]: Audio: opus, 48000 Hz, stereo, fltp (dependent) Stream #0:5[0x5]: Audio: opus, 48000 Hz, stereo, fltp (dependent) Signed-off-by: James Almer <jamrial@gmail.com>
- [DH] libavformat/iamf_parse.c
- [DH] libavformat/iamf_writer.c
- [DH] libavformat/iamfdec.c
- [DH] tests/ref/fate/iamf-5_1-copy
- [DH] tests/ref/fate/iamf-5_1-demux
- [DH] tests/ref/fate/iamf-5_1_4
- [DH] tests/ref/fate/iamf-7_1_4
- [DH] tests/ref/fate/iamf-9_1_6
- [DH] tests/ref/fate/mov-mp4-iamf-5_1_4
- [DH] tests/ref/fate/mov-mp4-iamf-7_1_4-video-first
- [DH] tests/ref/fate/mov-mp4-iamf-7_1_4-video-last
-
avcodec/osq : Switch back to av_ceil_log2()
17 juin, par Michael Niedermayeravcodec/osq: Switch back to av_ceil_log2() This returns to code closer to prior 56c334d732dbbce43b0c8fc0809ec545b7946832 The prior fixes should limit the sum and avoid the need for double argument log2() Fixes: Assertion n>=0 && n<=32 failed at libavcodec/get_bits.h:406 Fixes: 410109093/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OSQ_fuzzer-6550900028276736 No testcases except fuzzers Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
avcodec/osq : Add note about update_stats() count
17 juin, par Michael Niedermayer -
avcodec/osq : Fix signed integer overflow in update_stats()
16 juin, par Michael Niedermayeravcodec/osq: Fix signed integer overflow in update_stats() Fixes: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself Fixes: 410109093/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OSQ_fuzzer-6550900028276736 Note, none of the available osq files uses update_stats(), this change may fix or break files using coding_mode == 2. The code prior looks wrong though Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-
tests/iamf : reorder muxed streams
16 juin, par James Almer