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.1.1 has been released! | Please read ffmpeg.org/developer.html#Code-of-conduct
<ramiro> haasn: good idea about memdup'ing the SwsOpsList. if a backend fails to compile, but has already done some optimizations, we don't lose the original list. it's easy for me now since neon still has a 1:1 mapping to the optimized list that it receives, but if we get more aggressive optimizations per backend that change the list, it'd be easier to roll back.
<ramiro> I haven't checked your changes for the last couple of days. I thought there was enough to implement the asmjit backend already. once I get that mostly working I'll rebase on your work and check if what has changed has no downsides.
<ramiro> haasn: good idea to keep SWS_ACCURATE_RND int only and speed things up. but does anyone actually use it?
<ramiro> it seems to me like that kind of optimization that was a good idea 20 years ago, but that nowadays is probably not used that much. hevc decoding certainly takes much longer than converting a frame using accurate rounding or not.
<ramiro> hmmmmm. but actually I would very much be happier with an unscaled pixel format conversion not having to go through f32 :D
<ramiro> haasn: what multiple functions were you thinking of compile() returning? I was thinking about input/output alignment and when width == linesize
s55 has quit [Quit: ZNC 1.9.1 - https://znc.in]
s55 has joined #ffmpeg-devel
<haasn> ramiro: I was thinking that a backend may want to compile an SWS_OP_CLEAR e.g. into multiple separate kernels
<haasn> The cost per OP call in the x86 backend is low enough that it may make sense to emit a kernel per component, say
<haasn> Rather than defining all possible combinations
<haasn> I don’t want to split components at the ops level because it makes optimizations harder
j45 has quit [Quit: ZNC 1.9.1 - https://znc.in]
j45 has joined #ffmpeg-devel
j45 has joined #ffmpeg-devel
iive has quit [Quit: They came for me...]
JackJ30 has joined #ffmpeg-devel
<JackJ30> query JackJ30
JackJ30 has left #ffmpeg-devel [#ffmpeg-devel]
<another|> ar
minimal has quit [Quit: Leaving]
thilo has quit [Ping timeout: 260 seconds]
thilo has joined #ffmpeg-devel
thilo has quit [Changing host]
thilo has joined #ffmpeg-devel
tufei has joined #ffmpeg-devel
abdu71 has joined #ffmpeg-devel
abdu69 has quit [Ping timeout: 240 seconds]
abdu71 has quit [Ping timeout: 240 seconds]
jamrial has quit []
System_Error has quit [Remote host closed the connection]
System_Error has joined #ffmpeg-devel
Anthony_ZO has joined #ffmpeg-devel
Ayush15 has joined #ffmpeg-devel
Ayush15 has quit [Client Quit]
quietvoid has quit [Ping timeout: 276 seconds]
quietvoid has joined #ffmpeg-devel
twelve has joined #ffmpeg-devel
Anthony_ZO has quit [Quit: Anthony_ZO]
Anthony_ZO has joined #ffmpeg-devel
twelve has quit [Remote host closed the connection]
kepstin has quit [Remote host closed the connection]
kepstin has joined #ffmpeg-devel
abdu71 has joined #ffmpeg-devel
IndecisiveTurtle has joined #ffmpeg-devel
lemourin has quit [Quit: The Lounge - https://thelounge.chat]
lemourin has joined #ffmpeg-devel
jamrial has joined #ffmpeg-devel
lemourin has quit [Client Quit]
lemourin has joined #ffmpeg-devel
<mindfreeze> I am not sure if this is a bug or the way J2K is implemented in ffmpeg,
<mindfreeze> Mediainfo of a j2k file says RGB444, 10 bit, while ffmpeg reads the file as `yuv420p10le`.
<mindfreeze> (FWIW using latest head at 9f0970e)
cone-075 has joined #ffmpeg-devel
<cone-075> ffmpeg Andreas Rheinhardt master:fc44ccd9814f: configure: Add EXR decoder->bswapdsp dependency
<haasn> ramiro: what do we do about the fact that AVRational can't hold UINT32_MAX ?
<Lynne> we're bumping the ABI soon, you could bump that to int64_t
drv has quit [Remote host closed the connection]
drv has joined #ffmpeg-devel
<haasn> that may make the implementation substantially more complicadet
<haasn> does C have int128_t?
<haasn> doesn't seem like it, at least not standard
Anthony_ZO has quit [Ping timeout: 260 seconds]
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ffmpeg-devel
JRO has joined #ffmpeg-devel
JRO has quit [Client Quit]
abdu71 has quit [Ping timeout: 240 seconds]
Anthony_ZO has joined #ffmpeg-devel
abdu71 has joined #ffmpeg-devel
<Lynne> C23 does
<Lynne> I've written a much simpler and better rational implementation here - https://github.com/cyanreg/avtransport/blob/master/libavtransport/rational.c#L41
<Lynne> it uses 128bit ints (if C23, otherwise uses the compiler extensions)
abdu13 has joined #ffmpeg-devel
abdu71 has quit [Ping timeout: 240 seconds]
Anthony_ZO has quit [Ping timeout: 252 seconds]
lemourin has joined #ffmpeg-devel
lemourin has quit [Killed (tantalum.libera.chat (Nickname regained by services))]
tufei has quit [Remote host closed the connection]
<averne> Hi all, could someone explain what is going on here? https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/h264_refs.c#L344-L363
<averne> I'm investigating a corruption on ITU sample MR8_BT_B. NVDEC hardware engine wants the LongTermPicNum value which is taken from H264Picture::pic_id, except the snippet above ends up changing it, which makes the decoding blow up
tufei has joined #ffmpeg-devel
ccawley2011 has joined #ffmpeg-devel
<averne> Checking the relevant spec section (8.2.4.3.2 Modification process of reference picture lists for long-term reference pictures), the code doesn't seem to match at all, it should be pretty similar to cases 0-1 above except operating on long refs
<averne> So I'm a bit struggling to understand what it's trying to achieve
<compnn> mindfreeze, does the sample decode ok or no?
<compnn> mindfreeze, and by ok, i mean bitexact to some other reference decoder...
<Lynne> averne: -1 == missing
<Lynne> I'm surprised you found a sample with LTR
<Lynne> no one used them
<compnn> averne, probably ping michaelni about that one. sounds like a rare sample...
<compnn> h264 is full of features no one ever used
<JEEB> if it's an ITU sample it's probably one of the reference suite ones
<compnn> oh yea
<averne> compnn: it does decode fine on ffmpeg's sw decoder
<compnn> oh nvdec on LTR
<compnn> i see i see
<averne> yep
<averne> Well, nvdec (cuvid) decodes it fine because it doesn't use pic_id. Instead it uses the position of the ref within the long_ref array. It happens to work out fine here, but breaks on other samples
<JEEB> this is the listing of the test vector suites
<averne> I'm working on my own hwaccel here, which also based on NVDEC but at a lower level. Basically I'm bypassing cuvid and programming the engine directly
<JEEB> yea, the tegra stuff (switch etc)
<averne> Kind of, originally this was targetting only tegra but recently I got it working on desktop cards too
<JEEB> fun
<JEEB> also that sounds like one of the old test vectors :D
<JEEB> the link I posted has the currently in force ones
<JEEB> apparently in 2016 they last updated them
<compnn> JEEB coming in with the 'your samples are outdated' :D
<cone-075> ffmpeg Shreesh Adiga master:26f2f03e0de2: swscale/x86/rgb2rgb: optimize AVX2 version of uyvytoyuv422
<mindfreeze> compnn: yes, I can decode totoally fine with ffmpeg and also with old ffmpeg version which was libopenjpeg.
<mindfreeze> The key confusion is, the input sample is regular RGB input (10bit) but ffmpeg reads as yuv420p10le which sounds strange to me as input is not 420
<mindfreeze> OpenJPEG can read and process this too
<compnn> curious what openjpeg reports it as
<compnn> and what mediainfo is using to decode/sniff it
<JEEB> compnn: it's a possibility, so since I saw "draft_conformance" in the URL it's worth a check if the sample is still there in the current ones
<JEEB> it might have been updated, or otherwise. but even if it was no longer there, depending on the person's needs they could still of course attempt to figure out why it no work with their HW decoder. those two things are separate.
<JEEB> it's just generally worth checking if you're utilizing the latest test suite
<compnn> fully agree
<averne> JEEB: I downloaded the newer suite just to make sure, MR8_BT_B is still present and bit-identical to the one I was working with
<JEEB> nice
<averne> So, michaelni if you have some insight I'm interested
<JEEB> and I guess it isn't actually utilizing long-term refs?
<averne> JEEB: it is using LTR, 2 of them actually
^Neo has joined #ffmpeg-devel
^Neo has joined #ffmpeg-devel
<JEEB> fun
<averne> Full sample description: https://paste.centos.org/view/bf971740
<JEEB> good ol' foreman :DDD
<JEEB> I wonder if that person knows how known he is in the video sphere
<averne> I think the problematic feature is here is "Ref Pic List Reordering: Yes"
<compnn> mindfreeze, possibly a bug in ffmpeg .
<compnn> yuv420p10le is 10bit at least ?
<mindfreeze> compnn: not 100% sure if it is ffmpeg or mediainfo problem now,
<mindfreeze> opj_dump of the file from openjpeg reports this
<mindfreeze> Trying to see if the dx/dy there means subsampling or not
minimal has joined #ffmpeg-devel
<haasn> ramiro: what's the minimum bit depth that we should do proper dithering at (versus just rounding)?
<haasn> I am thinking 12 bits for SDR and 14 bits for HDR
<haasn> maximum*
witchymary has quit [Quit: Leaving]
witchymary has joined #ffmpeg-devel
<kierank> haasn: what do you mean minimum
<kierank> 12-bit SDR, does that even exist
witchymary has quit [Client Quit]
witchymary has joined #ffmpeg-devel
<Lynne> yeah, tasvideos uses yuv444p12
ccawley2011 has quit [Ping timeout: 252 seconds]
abdu13 has quit [Ping timeout: 240 seconds]
JackJ30 has joined #ffmpeg-devel
<haasn> well, a different question: is dither necessary for 10 bit SDR?
<haasn> I think the answer is yes
<haasn> for example for yuv420p -> yuv420p10 upconversion
<haasn> the "standard" way of doing it is (x << 2) | (x >> 6), without dither
zsoltiv_ has joined #ffmpeg-devel
<haasn> hmm.. I think the question is a red herring; the answer is "it depends on if you're upconverting bit depth or downconverting"
zsoltiv has joined #ffmpeg-devel
<haasn> yuv444p16 -> yuv444p10 requires dither, yuv444p -> yuv444p10 does not
<haasn> what about yuv444p16 -> yuv444p14? 14-bit should be above the human JND threshold, so in theory we can skip dithering
abdu13 has joined #ffmpeg-devel
Mirarora has quit [Quit: Mirarora encountered a fatal error and needs to close]
JackJ30 has quit [Ping timeout: 260 seconds]
<Lynne> I think if you're dealing with 14 or 16-bit video, you'd be entitled to expect nothing short of perfection
<kierank> haasn: for downconverting yes
<kierank> from 10 -> 8 I would expect dither
<kierank> upconverting imo no
<kierank> but opinions will vary
abdu13 has quit [Ping timeout: 240 seconds]
JackJ30 has joined #ffmpeg-devel
ccawley2011 has joined #ffmpeg-devel
JackJ30 has quit [Ping timeout: 252 seconds]
LainExperiments has joined #ffmpeg-devel
LainExperiments9 has joined #ffmpeg-devel
LainExperiments has quit [Ping timeout: 240 seconds]
LainExperiments9 has quit [Ping timeout: 240 seconds]
ccawley2011 has quit [Ping timeout: 252 seconds]
JackJ30 has joined #ffmpeg-devel
ccawley2011 has joined #ffmpeg-devel
ccawley2011 has quit [Ping timeout: 260 seconds]
JackJ30 has quit [Ping timeout: 260 seconds]
LainExperiments has joined #ffmpeg-devel
JackJ30 has joined #ffmpeg-devel
<frankplow> averne: Your envideo is an awesome project
LainExperiments7 has joined #ffmpeg-devel
<frankplow> averne: Does the sample decode fine with the cuvid sample decoder application?
LainExperiments has quit [Ping timeout: 240 seconds]
LainExperiments7 has quit [Ping timeout: 240 seconds]
IndecisiveTurtle has quit [Ping timeout: 276 seconds]
zeezie01 has joined #ffmpeg-devel
LainExperiments has joined #ffmpeg-devel
zeezie01 has quit [Changing host]
zeezie01 has joined #ffmpeg-devel
cone-075 has quit [Quit: transmission timeout]
JackJ30 has quit [Remote host closed the connection]
JackJ30 has joined #ffmpeg-devel
JackJ30 has quit [Ping timeout: 276 seconds]
JackJ30 has joined #ffmpeg-devel
ccawley2011 has joined #ffmpeg-devel
<averne> frankplow: thanks
<averne> Where can I find this sample decoder? I tested the h264_cuvid decoder which uses nvidia's parsing libraries, and that didn't work
<averne> Anyways, I've fixed my issue with this patch: https://paste.centos.org/view/8aded388
<averne> I *think* it makes sense, will post on the ML
<averne> At the very least it doesn't regress the software decoder
<averne> With this, my hwaccel passes 37 more tests on that conformance suite than the nvdec hwaccel on my RTX3050, and 8 more than vaapi on my RX6700XT :)
<Lynne> you know there's work already done on nvk?
<Lynne> you could take a look at it
<averne> Lynne: I'm aware, I've helped Daniel quite a bit actually
<Lynne> ah, I haven't seen you often on #nouveau
<Lynne> how does it handle LTR or did they also not have the pleasure of never caring about LTR?
<averne> which is either long_term_pic_idx or framenum
IndecisiveTurtle has joined #ffmpeg-devel
<frankplow> averne: Yeah I just meant something which used nvidia's parser.
abdu has joined #ffmpeg-devel
minimal has quit [Quit: Leaving]
lemourin has quit [Read error: Connection reset by peer]
lemourin has joined #ffmpeg-devel
<fflogger> [editedticket] MasterQuestionable: Ticket #11363 ([avcodec] MediaCodec de/encoders no more work since Android 15 (No output buffer available)) updated https://trac.ffmpeg.org/ticket/11363#comment:10