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
iive has quit [Quit: They came for me...]
<cosminaught> I needed to add
<cosminaught> case AOT_USAC:
<cosminaught> ac->avctx->profile = ac->oc[1].m4ac.object_type - 1;
<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
arch1t3cht1 has joined #ffmpeg-devel
arch1t3cht has quit [Ping timeout: 252 seconds]
arch1t3cht1 is now known as arch1t3cht
lexano has quit [Ping timeout: 268 seconds]
Martchus_ has joined #ffmpeg-devel
Martchus has quit [Ping timeout: 268 seconds]
liuqi has joined #ffmpeg-devel
stevenliu has quit [Ping timeout: 256 seconds]
lemourin has quit [Quit: The Lounge - https://thelounge.chat]
lemourin has joined #ffmpeg-devel
<ravenJPL> i got it working
<ravenJPL> needs defines in avcodec.h as well
<ravenJPL> and of course the naming in profiles.c
<Lynne> what's wrong with the naming there?
<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
<cosminaught> `Stream #0:0[0x1](und): Audio: aac (xHE-AAC) (mp4a / 0x6134706D), 48000 Hz, 0 channels, fltp, 128 kb/s (default)`
System_Error has quit [Remote host closed the connection]
System_Error has joined #ffmpeg-devel
<Lynne> doesn't work here
<jamrial> works here
liuqi has quit [Quit: Leaving]
<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]
Teukka has joined #ffmpeg-devel
Teukka has quit [Changing host]
Teukka has joined #ffmpeg-devel
mateo` has quit [Ping timeout: 246 seconds]
<haasn> mkver: do you have any opinion on https://ffmpeg.org//pipermail/ffmpeg-devel/2024-May/326626.html ?
<mkver> haasn: Thanks for reminding me about that.
mateo` has joined #ffmpeg-devel
<kasper93> Could someone push https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=11493 ? It fixes regression in libzvbi-teletextdec converter to ASS. Thank you.
kurosu has joined #ffmpeg-devel
* Sean_McG peeks in
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
Krowl has joined #ffmpeg-devel
<kasper93> (it throws more errors)
<Lynne> *what errors*??
<Lynne> I don't get anything under asan
<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
<cone-329> ffmpeg Ramiro Polla master:01b1f4c9a5d1: libavcodec/libxvid: code cleanup (replace magic numbers)
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ffmpeg-devel
<Lynne> JEEB: sent a patch which correctly uses the layout map
<Lynne> now 5.1 and 7.1 are identified correctly
<Lynne> still not decoded correctly, but at least now all elements are present and allocated
<JEEB> nice
<Lynne> not decoded correctly because the fucking spec is a pile of shit that doesn't know what the word "specify" means
* Sean_McG giggles
<Lynne> and there's a bitstream desync between the first and second element
<Lynne> and that triggers a chain reaction
<JEEB> meanwhile I'm having to deal with dull e-mail sending because reasons
<Lynne> I spent christmas and new year deriving error correction code math from first principles all the way from Hamming codes to LDPC codes
<Lynne> why can't everything be engineered like error correction codes?
<Lynne> I'll go back soon enough, need to write and run a program to optimize avtransport's codes
Krowl has quit [Read error: Connection reset by peer]
<courmisch> I read about Barrett reduction over polynomials and then my brain went into emergency throttle
<courmisch> so not sure I'm that into error correction codes
mkver has joined #ffmpeg-devel
k3a has quit [Quit: Client closed]
<cone-329> ffmpeg Zhao Zhili master:47ba87551c24: checkasm/sw_rgb: test rgb24/bgr24 to yuv
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ffmpeg-devel
<jamrial> courmisch: rgb32_to_y checkasm on the ml btw
<mkver> Why does libswscale/x86/rgb2rgb_template.c and libswscale/swscale.c use sfence?
<mkver> michaelni: Do you still remember the reason you added this in 99cefd0bda558682?
<BBB> presumably because it uses nt memory moves?
<courmisch> jamrial: hmm, why no ARGB ? wrong alpha offset?
<BBB> mkver: movnti, movntq
<BBB> if I had to guess why, I would point to pentiums but I'm not sure
<courmisch> the nineties called...
<BBB> I'm just answering questions
<courmisch> well, AArch64 also has nontemporal accesses, but they don't need special fences, AFAIK
<BBB> I didn't say this was a good idea or that it should still be there
<courmisch> I didn't say that you did
<mkver> BBB: But if the user uses multiple threads, shouldn't the user use explicit synchronization between them?
<mkver> As avpriv_slicethread_execute() does internally when one uses swscale slice-thread API?
<BBB> I don't know, sorry
<courmisch> if it's really from 586 bygones, then I would think it's about cache optimisation, not threading
<BBB> I just remember sfence is there b/c of movntq
<courmisch> not a lot of multicore pentiums
<BBB> I think
<courmisch> or is that "pentia" ?
<BBB> I don't remember it being related to threading, indeed
<BBB> yeah, it's similar to the custom prefetch optimizations - it's all about caching from what I recall
<courmisch> IMU, nontemporal accesses are just a hint that data should not go/stay in the cache
<BBB> pentii?
<BBB> although pentii is the plural of pentius, not pentium
<courmisch> so this is a question about pentiorum movnti
<courmisch> so that's why my parents had me learn Old Italian
<courmisch> jamrial: is there even a C version of that?
<courmisch> I see RGB32 and such, but no RGBA
HarshK23 has quit [Quit: Connection closed for inactivity]
<michaelni> mkver, over 20 years ago :) i think the reasoning involved CPU & GPU being in sync with what they saw in memory
___nick___ has joined #ffmpeg-devel
System_Error has quit [Remote host closed the connection]
System_Error has joined #ffmpeg-devel
<jamrial> courmisch: https://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavutil/pixfmt.h;h=a7f50e169038256a8b83a2313dd36c31794a8ada;hb=HEAD#l451
<courmisch> hmm yeah so it's exactly the same but with one useless segment
<courmisch> gotta have fun with gas macros...
<jamrial> courmisch: actually, probably better to use the RGB32 and RGB32_1 defines
<courmisch> I don't think anybody cares about big-endian RISC-V
Krowl has joined #ffmpeg-devel
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
Krowl has quit [Read error: Connection reset by peer]
<jamrial> mkver: there, mmxext banished
<Lynne> JEEB: if you're not too busy could you take a quick look at the patch and review it?
<Lynne> just would like to get all the fixes I have out so I can patch up SBR support on top cleanly
<JEEB> you can blame a certain entity that I am dealing with stressful bullshit rather than something else.
<mkver> jamrial: This looks as if it were not only better performance-wise, but also codesize-wise. Am I right?
<jamrial> yeah
<jamrial> should be trivial to add the other shuffle functions too
cone-329 has quit [Quit: transmission timeout]
<mkver> jamrial: Seems like there will be a slight merge conflict between our patches.
tufei has quit [Remote host closed the connection]
tufei has joined #ffmpeg-devel
ccawley2011 has quit [Read error: Connection reset by peer]
___nick___ has joined #ffmpeg-devel
kurosu has quit [Quit: Connection closed for inactivity]
Livio has quit [Ping timeout: 268 seconds]
System_Error has quit [Remote host closed the connection]
System_Error has joined #ffmpeg-devel