michaelni changed the topic of #ffmpeg-devel to: Welcome to the FFmpeg development channel | Questions about using FFmpeg or developing with libav* libs should be asked in #ffmpeg | This channel is publicly logged | FFmpeg 7.0.1 has been released! | Please read ffmpeg.org/developer.html#Code-of-conduct
<ravenJPL>
just confirmed that both fraunhofer and exhale encoder use aot 42 regardless of SBR
<ravenJPL>
so USAC_NOSBR was never a thing to begin with
System_Error has quit [Remote host closed the connection]
System_Error has joined #ffmpeg-devel
thilo_ has quit [Ping timeout: 268 seconds]
thilo_ has joined #ffmpeg-devel
<cosminaught>
Lynne: I think aac_xhe would be good name for the profile
<cosminaught>
ravenJPL: yeah, I've never seen USAC_NOSBR be a thing outside of the mention in ffmpeg itself
<Lynne>
yup, I went with that, just wondering why ffmpeg refuses to identify a file as such
<Lynne>
aacdec.c does something weird with the audio object, from forcing it to subtracting one from it
<cosminaught>
to the `switch (ac->oc[1].m4ac.object_type)`
<cosminaught>
and `#define FF_PROFILE_AAC_XHE 41` in avcodec.h
<cosminaught>
but that's because it was skipping the `decode_extension_payload` which is where it otherwise gets set
<Lynne>
that's called by the frame decoding function, but setting it there does nothing
<Lynne>
I think it has to be set in both places
<cosminaught>
yeah, it's also set in `aac_decode_er_frame` but I think you either need the one in `decode_extension_payload` or manually add it to the switch like I did
<Lynne>
nope, still getting "Audio: aac (mp4a / 0x6134706D)"
beastd has quit [Ping timeout: 264 seconds]
beastd has joined #ffmpeg-devel
<cosminaught>
hmm, if you have a git branch somewhere I can take a look and compare notes
<ravenJPL>
nothing, just don't forget to add to it
<jamrial>
Lynne: you're setting avctx->profile to AV_PROFILE_AAC_USAC - 1, so of course you're not going to get the string meant for AV_PROFILE_AAC_USAC
<Lynne>
nope, still can't get it to run
<cosminaught>
yeah, you can do object type - 1 since they map off by one, or just set it to `AV_PROFILE_AAC_USAC` directly
<Lynne>
-1 is what aacdec.c does though
<Lynne>
no idea why still
<cosminaught>
it does -1 because the defines are off by one from the aot types
<Lynne>
I see, but setting it directly doesn't fix it either
<cosminaught>
The AV_PROFILE_AAC_* defines are all object_type - 1
<cosminaught>
#define AV_PROFILE_AAC_USAC 42
<cosminaught>
should be 41
<Lynne>
nope
<Lynne>
tried 41 + ac->avctx->profile = AV_PROFILE_AAC_USAC - 1;, then tried again without -1, doesn't work
<cosminaught>
yeah, still doesn't seem to work, got your patch built with that change, going to step through the code and see how it differs from my local changes
<cosminaught>
actually, apparently I didn't rebuild hard enough the first time? Seems to work
<jamrial>
Fd_2_c1_Ms_0x01.mp4 and Fd_2_c1_Ms_0x04.mp4 both show Stream #0:0[0x1](und): Audio: aac (xHE-AAC) (mp4a / 0x6134706D)
<Lynne>
grr, compilation issues
<Lynne>
clean + reconfigure did it
<Lynne>
patchset sent
<Lynne>
thanks for testing
jamrial has quit []
Martchus has joined #ffmpeg-devel
Martchus_ has quit [Ping timeout: 268 seconds]
AbleBacon has quit [Read error: Connection reset by peer]
tufei_ has quit [Quit: Leaving]
ravenJPL has quit [Quit: Leaving]
tufei has joined #ffmpeg-devel
System_Error has quit [Remote host closed the connection]
System_Error has joined #ffmpeg-devel
bcheng has quit [Remote host closed the connection]
bcheng has joined #ffmpeg-devel
mkver has joined #ffmpeg-devel
rvalue- has joined #ffmpeg-devel
System_Error has quit [Remote host closed the connection]
rvalue has quit [Ping timeout: 272 seconds]
rvalue- is now known as rvalue
System_Error has joined #ffmpeg-devel
HarshK23 has joined #ffmpeg-devel
System_Error has quit [Remote host closed the connection]
Krowl has joined #ffmpeg-devel
System_Error has joined #ffmpeg-devel
System_Error has quit [Remote host closed the connection]
System_Error has joined #ffmpeg-devel
kurosu has quit [Quit: Connection closed for inactivity]
Krowl has quit [Read error: Connection reset by peer]
rossy has quit [Remote host closed the connection]
rossy has joined #ffmpeg-devel
<j-b>
people, you need to chill out
<j-b>
Lynne: <3 on xHe-AAC
Krowl has joined #ffmpeg-devel
tufei has quit [Remote host closed the connection]
tufei has joined #ffmpeg-devel
<courmisch>
ENOSYS
AndrewSayers has joined #ffmpeg-devel
AndrewSayers has left #ffmpeg-devel [#ffmpeg-devel]
rvalue has quit [Read error: Connection reset by peer]
AndrewSayers has joined #ffmpeg-devel
rvalue has joined #ffmpeg-devel
Livio has joined #ffmpeg-devel
Krowl has quit [Read error: Connection reset by peer]
<kasper93>
Lynne: have you had time to look into aacdec.c:594:16: runtime error: index 16 out of bounds for type 'ChannelElement *[16]' (aka 'struct ChannelElement *[16]') on flush()
Livio has quit [Ping timeout: 246 seconds]
Livio has joined #ffmpeg-devel
jamrial has joined #ffmpeg-devel
lexano has joined #ffmpeg-devel
Krowl has joined #ffmpeg-devel
<mkver>
jamrial: Have your lavf vvc patches been based on the spec or on guesstimates?
Livio has quit [Ping timeout: 252 seconds]
<jamrial>
the bitstream parsing ones on the vvc spec, the vvcc ones on guesstimates
<elenril>
more vs -> more versatile?
Teukka has quit [Read error: Connection reset by peer]
Krowl has quit [Read error: Connection reset by peer]
<Lynne>
kasper93: yeah, I sent a patch just now
<Lynne>
I don't like the way I solved it, but I don't want to reengineer everything because USAC allows for 65k channels and elements, not 64
<nevcairiel>
why do they always overengineer audio like this, and features will never get used
<Lynne>
to waste even more bits
<Lynne>
its such a stark contrast to opus, where there's zero extension bits, every single flag is entropy coded with a flat probability, and its too cheap to transmit quantization parameters so it just writes a few weights and runs a part of the encoder in the decoder
<kasper93>
aacdec_usac.c:270:33: runtime error: index 65 out of bounds for type 'AACUsacElemConfig[64]' (aka 'struct AACUsacElemConfig[64]')
<kasper93>
aacdec.c:594:16: runtime error: index 64 out of bounds for type 'ChannelElement *[64]' (aka 'struct ChannelElement *[64]')
<Sean_McG>
you hit the fence post
<Lynne>
show me how that happens and I'll fix it
<Lynne>
I don't see how it could happen currently
blb has quit [Ping timeout: 256 seconds]
blb has joined #ffmpeg-devel
Livio has joined #ffmpeg-devel
mkver has quit [Ping timeout: 255 seconds]
cone-630 has joined #ffmpeg-devel
<cone-630>
ffmpeg Rémi Denis-Courmont master:225de53c9d44: lavc/vp8dsp: rework R-V V idct_dc_add4y
<cone-630>
ffmpeg Rémi Denis-Courmont master:121fb846b97d: lavc/vp7dsp: add R-V V vp7_idct_dc_add4uv
<cone-630>
ffmpeg Rémi Denis-Courmont master:0415bb74c81a: lavc/vp8dsp: remove no longer used macros
ccawley2011 has joined #ffmpeg-devel
<courmisch>
oh, now git revert of a git revert says "Reapply" instead of "Revert "Revert""
<kasper93>
Lynne: https://0x0.st/XqkN.txt flush() doesn't check anything so ff_aac_usac_reset_state() overuns the array, because usac->nb_elems is > 64
<kasper93>
checks were added only in ff_aac_usac_config_decode for those sizes, which flush() bypasses
<Lynne>
well, how can usac->nb_elems be greater than 64 when the only place where it is set checks it?
pross has quit [Remote host closed the connection]
ramiro has quit [Ping timeout: 268 seconds]
ramiro has joined #ffmpeg-devel
<kasper93>
Lynne: you still set the value, it then returns AVERROR(EINVAL) from ff_aac_usac_config_decode
<kasper93>
but the value is there
Krowl has quit [Read error: Connection reset by peer]
IndecisiveTurtle has joined #ffmpeg-devel
System_Error has quit [Remote host closed the connection]
ramiro has quit [Ping timeout: 268 seconds]
System_Error has joined #ffmpeg-devel
ramiro has joined #ffmpeg-devel
<Lynne>
kasper93: thanks, I'll fix it
<Lynne>
jamrial: can you review the profile patchset?
AbleBacon has joined #ffmpeg-devel
k3a has joined #ffmpeg-devel
Coinflipper has quit [Ping timeout: 260 seconds]
Coinflipper has joined #ffmpeg-devel
Krowl has joined #ffmpeg-devel
ccawley2011 has quit [Ping timeout: 272 seconds]
ccawley2011 has joined #ffmpeg-devel
Livio has quit [Read error: Connection reset by peer]
<JEEB>
was xhe-aac an actual profile? I recall it being just a marketing term
<Lynne>
its something that should just burn and die
<JEEB>
I don't disagree
Livio has joined #ffmpeg-devel
<JEEB>
were the profiles so far the Audio Object Type based or?
<JEEB>
I don't recall that bit of aacdec
<JEEB>
it just has AAC Main/LC/SSR/LTP/SBR etc there. granted HE-AAC is not in that list either
<JEEB>
but then a lot of the other stuff is just audio object type stuff it seems? like (E)LD or SSR or LTP
<Lynne>
JEEB: I still haven't got a clue how the layout_map even fucking works
<Lynne>
what the fuck is [1]
<Lynne>
why does it need an index?
<Lynne>
in what order do _FRONT elements get dispatched?
<JEEB>
if that's what I think you're talking about, it's the channelConfigurationIndex, and it seemed somewhat overcomplicated back when I was poking at 22.2
<Lynne>
why does it even do this _FRONT/_BACK/_LFE stuff?
<Lynne>
how does it know that e.g. AV_CHAN_FRONT_LEFT is AAC_CHANNEL_FRONT at all????
<JEEB>
it's based on ff_aac_channel_layout_map which is in aacdec_tab.c
<Lynne>
for custom layouts we skip it entirely
<JEEB>
I think the 22.2 one is most readable, but that was just normally extending that existing mapping
<JEEB>
yea, don't recall how custom mappings worked. all I know is that there is a coding order, and then there should be a definition of what there is in that channel or channel pair so that it can then be ordered correctly. unrelatedly, the big reordering when adding 22.2 is actually a bug since it doesn't follow the bitmask order any more - but no-one told me that in 2020, and I was following "this just
<JEEB>
extends the standard 5.1 layout" which was written in the ARIB spec etc.
<JEEB>
I did validate the stuff that it matched the ARIB/ITU 22.2 layout, but that of course would then be different from the FFmpeg one .-.
<Lynne>
good enough, no one has a 41-channel sound system
<JEEB>
yea, and given that low channels (I think I upped it to the first 9 or so?) aren't getting touched, the downmix shouldn't be too bad
<JEEB>
if you want to check it out, I think I can share some nature documentary audio
cone-630 has quit [Quit: transmission timeout]
cone-329 has joined #ffmpeg-devel
<cone-329>
ffmpeg Ramiro Polla master:2d24a80e5e41: avcodec/mpegvideo_enc: give magic number a name