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 6.1.1 has been released! | Please read ffmpeg.org/developer.html#Code-of-conduct
<IndecisiveTurtle>
Lynne: Should cases where the image dimentions do not fit the block width evenly be handled? In this case using block sizes larger than 32 (e.g 64) on this image with width 800, the last line will have a darker color cause 800 / 64 = 12.5 so it will sample a few pixels out of bounds, that will return zero with robust image access.
rvalue has joined #ffmpeg-devel
<IndecisiveTurtle>
Though I'm guessing it could be the cpu's job to figure out the largest block size that could fit
<Sean_McG>
I wonder how michealni managed to make the MIPS QEMU nodes actually build: I keep getting impossible asm constraints
<IndecisiveTurtle>
Pushed the change, now the shader does the x and y basis separately and is based more faithfully on the ffmpeg version. It's still done on a per block basis, it would also be possible to use 2 shaders/dispatches for each axis and have each process the full width/height of the image.
<Lynne>
IndecisiveTurtle: you can assume the image will be padded on all sides
<IndecisiveTurtle>
Will the padded pixels also have the value (0, 0, 0, 1)?
<Lynne>
yes
<IndecisiveTurtle>
And how do we deal with the padded pixels making the final result darker than it should, cause they bring down the computed average?
<Lynne>
ah, actually it's not #0000000, it's an extended border (so the last value is extended across)
<IndecisiveTurtle>
Ah nice that makes a lot of sense
<Lynne>
I'm still not getting correct results though, for a 128x128 blocks with a single level, there should be a 64*64 bright pixels and 3*64*64 darker pixels (the difference), but I only get a couple of bright pixels at the top left
<IndecisiveTurtle>
Hm the current implementation does is for each 128x128 block it first performs haar on every 2x2 block, then every 4x4 block etc and until the end where it's left with a single bright pixel at the top and the rest are detail. So if the expected is 64*64 it definitely overshoots here
<IndecisiveTurtle>
Ah wait so for each 128x128 block we treat it as a separate image, so the upper 64x64 should be bright and other part should be the detail
<Lynne>
err, keep in mind that coefficients are shuffled
<Lynne>
so you wouldn't get bright pixels at the top left, they will be spread out once every 2 pixels
<IndecisiveTurtle>
Yeah I'm thinking about it as split images cause it's easier to imagine but the implementation will always keep them interleaved.
<IndecisiveTurtle>
So if I think this correctly, the block size should not affect the amount of bright pixels on screen, but the level should
IndecisiveTurtle has quit [Remote host closed the connection]
IndecisiveTurtle has joined #ffmpeg-devel
lexano has quit [Ping timeout: 256 seconds]
<Lynne>
correct, the levels will, if you have a power of two size, you can go all the way down to a single (extremely bright) pixel, but the vc2 spec only permits at most 5 levels, so that would only happen for 128x128 blocks
<Lynne>
the levels are what cause energy compaction, you get the same with fourier transforms, but fourier transforms always go all the way, rather than being block based (*with some exceptions, but those don't apply here)
<Lynne>
and energy compaction is what gets you compression - you can throw away fainter pixels to reduce details while brigher values will remain (with a precision loss)
<IndecisiveTurtle>
Makes sense, thanks. Will fix up the shader tomorrow cause it's late now, but I feel I understand a lot better what the purpose of levels and blocks have now
IndecisiveTurtle has quit [Ping timeout: 256 seconds]
mkver has joined #ffmpeg-devel
thilo has quit [Ping timeout: 272 seconds]
iive has quit [Quit: They came for me...]
thilo has joined #ffmpeg-devel
jafa has quit [Ping timeout: 268 seconds]
rossy has quit [Remote host closed the connection]
rossy has joined #ffmpeg-devel
MisterMinister has quit [Read error: Connection reset by peer]
<Lynne>
it's a typical speech codec with the appropriate complex algorithm to switch between it and MDCT coding
<Lynne>
I want the IP address of the ones who thought that SBR is totally rad and not at all a hack of the highest order
<aaabbb>
sbr is great. what, you don't like listening to nasty sbr artifacts?
<Lynne>
and tell them "Yes, it's perfect. It would make a great addition to MP3, the most popular codec on the planet. It will keep compatibility and MP3 will keep its popularity, this is really great work."
rajivharlalka has quit [Remote host closed the connection]
rajivharlalka has joined #ffmpeg-devel
<Lynne>
this may have led to a dark future where opus had real competition though...
<elenril>
better write a codec2 decoder
rvalue has joined #ffmpeg-devel
rvalue- has quit [Ping timeout: 256 seconds]
Krowl has joined #ffmpeg-devel
<Lynne>
I dislike ham radio, wish they'd stop hogging all that radio bandwidth that they say is being used by them for public service and emergencies, then we'd have enough radio bandwidth and bitrate to do something like flac
<Lynne>
codec2 is interesting in that it scraps MDCTs and just uses an RDFT, not very common due to basis functions being twice as large
<Lynne>
and the new extensions they're writing which use LPCnet are nice
<Lynne>
though they're committing sacrilage by going back to analog coding for some bitstream elements
<JEEB>
thardin: he did a whole article on how MPEG has lost its way in modern times
lemourin has joined #ffmpeg-devel
<JEEB>
and how various IP holders sabotaged the royalty free codec projects
<JEEB>
within MPEG
jamrial has joined #ffmpeg-devel
<Lynne>
I don't remember any of this, I just remember the very weird analogies he put into his blog, like the american civil war and such
<elenril>
software patents are just like owning guns
lexano has joined #ffmpeg-devel
<thardin>
the gun is good
<thardin>
come to think of it, why isn't there something like the GPL but for patents? surely software patents can be weaponized for free software purposes as well
<Lynne>
oh, there is
<kierank>
he compared slavery to mpeg and other weird stuff
<JEEB>
that's the licensing related article he did
IndecisiveTurtle has joined #ffmpeg-devel
MisterMinister has joined #ffmpeg-devel
MisterMinister has quit [Ping timeout: 268 seconds]
System_Error has quit [Ping timeout: 260 seconds]
Krowl has quit [Read error: Connection reset by peer]
System_Error has joined #ffmpeg-devel
* Sean_McG
yawns and stretches
<haasn>
elenril: is there any reason not to just av_opt_set_dict(ost->enc_ctx, ost->encoder_opts) after filter_codec_opts(..., &ost->encoder_opts) in ffmpeg_mux_init.c?
<haasn>
that way we can access the encoder_opts from the enc_ctx directly (downstream of this)
<haasn>
indeed, why does ost->encoder_opts even need to exist?
<haasn>
instead of mutating encoder_opts you can just mutate av_opt_set(enc_ctx, ...) directly
ngaullier has quit [Ping timeout: 246 seconds]
<kurosu>
Fear not, the SC29 convenor (after WG11 and SC29 themselves were rebuilt) is a Dolby employee, so what could go wrong. https://www.iso.org/committee/45316.html
Krowl has joined #ffmpeg-devel
hbbs has quit [Quit: bye]
<haasn>
ah, we also need access to the encoder_opts in the case that enc_ctx does not exist
<haasn>
(apparently, for some reason)
System_Error has quit [Remote host closed the connection]
System_Error has joined #ffmpeg-devel
cone-479 has quit [Quit: transmission timeout]
hbbs has joined #ffmpeg-devel
hbbs has quit [Changing host]
hbbs has joined #ffmpeg-devel
<thardin>
looking at subs, seems for vobsub they are sorted by file position, then timestamp. default is timestamp
<thardin>
with webvtt this doesn't matter since the spec says subs are to be ordered in time in the file
System_Error has quit [Remote host closed the connection]
System_Error has joined #ffmpeg-devel
<thardin>
ff_subtitles_read_line() looks wrong. it consumes any number of \r's. but the webvtt spec says \r\r counts as two newlines
MikhailAMD has joined #ffmpeg-devel
AbleBacon has joined #ffmpeg-devel
Raz- has joined #ffmpeg-devel
mkver has joined #ffmpeg-devel
System_Error has quit [Remote host closed the connection]
System_Error has joined #ffmpeg-devel
<BBB>
who controls the ffmpeg twitter account again? was it kierank?
<kierank>
Moi
<kierank>
Why
<LaserEyess>
can you stop posting cringe?
<kierank>
No, we want more people to learn asm
<kierank>
Derek and Nathan discussed it last night
<BBB>
kierank: I actually think the idea of using genAI as a starting point for generating highly optimize asm is not crazy
* alien_lappy
vomits
<kierank>
Sure, I said that at Demuxed
<kierank>
Is someone tweeting about that?
<BBB>
well the replies are like "One is write assembly without automation, the other is write lessons without AI involved."
<BBB>
I'm not sure "without AI" is a requirement, is all I'm saying
<elenril>
haasn: not really
<elenril>
haasn: see 372c78dd42f2b1ca743473b9c32fad71c65919e0
<kierank>
BBB: I think this was the word "handwritten" lost in translation
<BBB>
maybe I should start using my twitter account and say things there
<kierank>
Gramner responds to people
<kierank>
astrange too
<thardin>
n = sscanf(line, "%*u:%*1u%*1u:%*1u%*1u%*1[,.]%*1u%*1u%*1u --> %*u:%*1u%*1u:%*1u%*1u%*1[,.]%*1u%*1u%*1u%n", &m);
<thardin>
it's beautiful
<thardin>
enforces h+:mm:ss.sss --> h+:mm:ss.sss
<thardin>
no single digits, no negatives
<elenril>
use a regex
<thardin>
do we even have regex?
<elenril>
no
<elenril>
ffre, I choose you
<elenril>
or is it avre
<thardin>
it would actually be nice. or better yet ffpeg
<thardin>
that way we can give all parsers a much needed PEG:ing
<elenril>
this channel sure is leaning in a weird direction lately
ngaullier has joined #ffmpeg-devel
<Sean_McG>
thardin: that hurts my brain to read
<BBB>
how do I "notify" people on twitter about a post privately? is that even possible?
<BBB>
"DM" seems to be a "twitter plus" feature that you have to pay for
<gnafu>
I think the right answer is to stop using Twitter altogether.
Krowl has quit [Read error: Connection reset by peer]
<Sean_McG>
that's always the answer
jarthur has joined #ffmpeg-devel
<Gramner>
but how will you then get to experience bots barging into into random discussions arguing american politics with other bots?
System_Error has quit [Remote host closed the connection]
System_Error has joined #ffmpeg-devel
jafa has joined #ffmpeg-devel
<Sean_McG>
michaelni: I think the argument to '-L' in the s390x QEMU nodes has to be s390x-linux-gnu, not just s390-linux-gnu -- it looks like the node can't find the shared libraries.
<Sean_McG>
(but then, I wonder if that conflicts with '-arch=s390'
<Sean_McG>
it's cute we can build for a mainframe
j45 has quit [Ping timeout: 240 seconds]
j45_ has joined #ffmpeg-devel
j45_ is now known as j45
j45 has quit [Changing host]
j45 has joined #ffmpeg-devel
Marth64 has joined #ffmpeg-devel
<Sean_McG>
Marth \o
<Marth64>
:wave: good day!
jafa has quit [Remote host closed the connection]
jafa has joined #ffmpeg-devel
<Marth64>
til my mobile email client is using the yucky/fancy ms apostrophe characters
<Marth64>
boo
IndecisiveTurtle has quit [Ping timeout: 256 seconds]
<thardin>
yes stop being a twitter used
<Marth64>
never was, never will >:D
Traneptora has quit [Remote host closed the connection]
Traneptora has joined #ffmpeg-devel
cone-087 has joined #ffmpeg-devel
<cone-087>
ffmpeg Dale Curtis master:bba6df9ac7bd: Don't throw an error when attached picture isn't recognized.
<cone-087>
ffmpeg Michael Niedermayer master:3d5f03bbc8bb: avfilter/vf_signature: Dont crash on no frames
<michaelni>
Sean_McG, s390 path fixed, thx
<Sean_McG>
cheers.
rvalue has quit [Ping timeout: 264 seconds]
ngaullier has quit [Ping timeout: 255 seconds]
<ePirat>
BBB, DM is the way, but some users have them disabled and some required you to be a premium user to send them DMs…
<ePirat>
so there is no "always works" way
rvalue has joined #ffmpeg-devel
___nick___ has joined #ffmpeg-devel
<haasn>
gnafu: what's twitter?
<gnafu>
It's a defunct "social networking" site. I think someone bought it and ran it into the ground, an all-too-common story.
<gnafu>
There's some other site that holds the domain, but it seems to mostly be a platform for misinformation and hate speech.
System_Error has quit [Remote host closed the connection]
System_Error has joined #ffmpeg-devel
<another|>
I rarely click on twitter links anymore since I can't see any replies
<thardin>
srtdec is so weird
<thardin>
actually I know why: because ff_subtitles_read_line() eats newlines, srtdec can't rely on double newline to delimit packets
Marth64 has quit [Ping timeout: 272 seconds]
Marth64 has joined #ffmpeg-devel
IndecisiveTurtle has joined #ffmpeg-devel
<thardin>
starting to get something
<thardin>
it actually get simpler when you remove this annoying queue nonsense
cone-087 has quit [Quit: transmission timeout]
<Lynne>
BBB: I would say it's currently impossible to train an AI on our asm codebase
<thardin>
are there tests that check for error messages and such?
<thardin>
as in I'd like to add some tests for deliberately broken files
<Lynne>
because, what is the first thing you do once you're confident enough in your code?
<thardin>
I wonder if any srt implementations accidentally put too many decimals on the end
<thardin>
because the current implementation just silently interprets 1.999999 as 100.999
<thardin>
whereas my current bondage-and-discipline approach correctly rejects it
MisterMinister has joined #ffmpeg-devel
<BBB>
Lynne: I'm wondering why? too complex?
Livio has joined #ffmpeg-devel
Raz- has quit [Ping timeout: 256 seconds]
<Lynne>
BBB: the first thing you do, is you reorder the code
<Lynne>
to unorder it back to its structured form, you need to know the rules (including those regarding flags), and at the very least, reason
<Lynne>
AI code generation currently works by smartly identifying chunks of code and templating them
<Lynne>
but I think there's someone more qualified here to answer that question, haasn uses codepilot
cone-914 has joined #ffmpeg-devel
<cone-914>
ffmpeg James Almer master:e54591369f15: avformat/flac_picture: print a warning when mimetype is unknown
___nick___ has quit [Ping timeout: 268 seconds]
b50d has joined #ffmpeg-devel
<IndecisiveTurtle>
Lynne: Adjusted the shader today. Tested with 128x128 blocks and it looked okay this time
System_Error has quit [Remote host closed the connection]
<Lynne>
IndecisiveTurtle: why are you dividing your width and height by 32 when the block size is 128?
<IndecisiveTurtle>
Because the shader has set a workgroup size of 32x32
System_Error has joined #ffmpeg-devel
Marth64 has quit [Ping timeout: 252 seconds]
Marth64 has joined #ffmpeg-devel
<IndecisiveTurtle>
I haven't written much advanced compute shaders, but from what I understood having sizes closer to the hardware one leads to better utilization of workgroups
<Lynne>
you'll mostly be using a workgroup size of 1 or so for the real encoder though
<mkver>
StevenLiu: Ping about the rtmpproto issue.
<Lynne>
because in a 4k image you already have 2000 64x64 blocks, enough to saturate the GPU
<Lynne>
with workgroup ops you can decimate that by a factor of 2 and that gets you 1024, which is incidentally the max workgroup size on most GPUs
<Lynne>
but we'll worry about that when we get to it
<Lynne>
IndecisiveTurtle: shader seems to work fine for block sizes 32, I get what I'd expect
<Lynne>
err, larger block sizes, 128
<Lynne>
but breaks on 32x32
<Lynne>
also 5 levels on 64x64 seems to result in 32x32 blocks, not 64x64 according to the number of DCs
<Lynne>
possibly an off by one error in the calculations
<IndecisiveTurtle>
Hm the comparison in the for loop might need to be <= instead of <
Marth64 has quit [Ping timeout: 268 seconds]
Marth64 has joined #ffmpeg-devel
<IndecisiveTurtle>
In the transition from 0 -> 1 we are left with 64 * 64 / 2 * 2 bright pixels, 1 -> 2 its 64 * 64 / 4 * 4 etc so we will be left with 1 bright pixel for each block in 5 -> 6
<IndecisiveTurtle>
Also what kind of breakage do 32x32 blocks exhibit?
<Lynne>
corruption, seems like each invocation reads out of bounds
Livio has quit [Ping timeout: 268 seconds]
b50d has quit [Remote host closed the connection]
Livio has joined #ffmpeg-devel
<IndecisiveTurtle>
What I'm seeing is a faint outline in the border of each block
Pheo has joined #ffmpeg-devel
<thardin>
I see the subtitle stuff considers \r+\n to be a line ending. this is unacceptable of course
<thardin>
\r+ even
<thardin>
I hate shotgun parsers I hate shotgun parsers