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
AbleBacon has joined #ffmpeg-devel
System_Error has quit [Remote host closed the connection]
System_Error has joined #ffmpeg-devel
Marth64 has quit [Ping timeout: 260 seconds]
Marth64 has joined #ffmpeg-devel
System_Error has quit [Remote host closed the connection]
System_Error has joined #ffmpeg-devel
ravenJPL has joined #ffmpeg-devel
Livio has quit [Ping timeout: 255 seconds]
ravenJPL has quit [Quit: Leaving]
paulk has quit [Ping timeout: 272 seconds]
thilo has quit [Ping timeout: 256 seconds]
iive has quit [Quit: They came for me...]
paulk has joined #ffmpeg-devel
paulk has joined #ffmpeg-devel
paulk has quit [Changing host]
thilo has joined #ffmpeg-devel
thilo has quit [Changing host]
thilo has joined #ffmpeg-devel
paulk has quit [Ping timeout: 268 seconds]
paulk has joined #ffmpeg-devel
mkver has quit [Ping timeout: 252 seconds]
<sdc> sort of an asm question: I've been trying to write a SIMD lut lookup, using YMM/AVX2, so for the 16bpc version for CTU widths 16 to 128 I just did in a single function and just calculating how many times to loop. I was trying to figure out a good way to do 4 and 8 pixel widths (I was thinking vmaskmov) but it seems like other SIMD versions just have separate functions for each CTU width? is that correct?
<Lynne> sdc: what's the element size?
<Gramner> it is common to have a branch or jump table for different widths. you can for example have 3 different code paths, one for w=4, one for w=8, and one for w>8
<Gramner> you probably don't want to use any of the maskmov instructions as they are non-temporal
<sdc> 16 bits for the 10/12bit version
<Gramner> actually some are not no-temporal. but they can be really slow, up to 42 µops
<sdc> yeah when I was benchmarking the maskmov was quite a bit slower
<sdc> that's when I decided to try and see what the other implementations looked like haha probably should've done that sooner
tufei_ has quit [Remote host closed the connection]
tufei_ has joined #ffmpeg-devel
<Lynne> oof, 16 bit elements
<Lynne> if there's nothing to exploit, like the block size being small enough to fit into all registers, or the lookup index being small enough, not much you can do on *that* level
<Lynne> you could check if the data can be tweaked to be nicer to SIMD before the function call
tufei_ has quit [Remote host closed the connection]
<sdc> ahhh okay good to know, thank you both for the suggestions!
tufei_ has joined #ffmpeg-devel
cone-186 has quit [Quit: transmission timeout]
AbleBacon has quit [Read error: Connection reset by peer]
Marth64 has quit [Remote host closed the connection]
Xaldafax has quit [Quit: Bye...]
tufei__ has joined #ffmpeg-devel
tufei_ has quit [Ping timeout: 260 seconds]
jamrial has quit []
Martchus has quit [Ping timeout: 264 seconds]
Martchus has joined #ffmpeg-devel
<Lynne> tensorflow was abandoned, wonder how long pytorch will last
<Lynne> they haven't even updated it to support the latest cuda (12.2), and it's been out for a year now
MisterMinister has quit [Ping timeout: 256 seconds]
qeed has quit [Quit: Leaving]
rooisnoek has joined #ffmpeg-devel
rooisnoek has quit [Client Quit]
deus0ww has quit [Ping timeout: 268 seconds]
deus0ww has joined #ffmpeg-devel
Krowl has joined #ffmpeg-devel
ngaullier has joined #ffmpeg-devel
ngaullie has joined #ffmpeg-devel
Krowl has quit [Read error: Connection reset by peer]
ngaullier has quit [Ping timeout: 256 seconds]
kurosu has joined #ffmpeg-devel
System_Error has quit [Remote host closed the connection]
System_Error has joined #ffmpeg-devel
Krowl has joined #ffmpeg-devel
j45 has quit [Quit: ZNC 1.8.2 - https://znc.in]
j45 has joined #ffmpeg-devel
j45 has quit [Changing host]
j45 has joined #ffmpeg-devel
j45 has quit [Quit: ZNC 1.8.2 - https://znc.in]
j45 has joined #ffmpeg-devel
j45 has quit [Changing host]
j45 has joined #ffmpeg-devel
tufei_ has joined #ffmpeg-devel
tufei__ has quit [Remote host closed the connection]
lexano has joined #ffmpeg-devel
Workl has joined #ffmpeg-devel
Krowl has quit [Ping timeout: 260 seconds]
paulk has quit [Remote host closed the connection]
paulk has joined #ffmpeg-devel
mkver has joined #ffmpeg-devel
novaphoenix has quit [Quit: i quit]
novaphoenix has joined #ffmpeg-devel
jamrial has joined #ffmpeg-devel
<haasn> is there an easy way to translate an AVPixFmtDescriptor into `int bit_depth_luma, bit_depth_chroma;`?
<haasn> actually, is there even a yuv format that has differing bit depth for luma and chroma?
<haasn> I guess technically I400 formats have 0 bits for chroma
<Sean_McG> mkver: wow... 5 commits fixed 600 tests.
<jkqxz> H.265 in the Main 10 profile which most devices declare support for nowadays requires different luma and chroma bit depth.
<jkqxz> So, try on a device which declares support for Main 10 decode and see what it gives you?
<jkqxz> (And in the highly unlikely event that it doesn't work you can report the manufacturer to the MPEG conformance police.)
<mkver> Sean_McG: And now the other failing tests stand out more. Will look at them later.
<mkver> ubitux's valgrind boxes work again.
<Sean_McG> nice
cone-117 has joined #ffmpeg-devel
<cone-117> ffmpeg Andreas Rheinhardt master:c00cd007e842: configure: Remove av_restrict
<JEEB> jkqxz: I think we might explicitly nope out if the bit depths do not match
elastic_dog has quit [Ping timeout: 272 seconds]
<kurosu> That's basically for YCoCg-like stuff. And I think once thought for CGS.
<JEEB> yea
elastic_dog has joined #ffmpeg-devel
Workl has quit [Read error: Connection reset by peer]
Livio has joined #ffmpeg-devel
clarkh_ has joined #ffmpeg-devel
System_Error has quit [Ping timeout: 260 seconds]
Livio has quit [Ping timeout: 261 seconds]
System_Error has joined #ffmpeg-devel
Krowl has joined #ffmpeg-devel
<BtbN> Well great, the debug output on this Intel Laptop got absolutely nothing, while producing a completely botched recording
<BtbN> not sure what to do about this, this DOES looks very much like a driver side issue to me
<BtbN> That's what it looks like, error log completely empty. I'm at a loss.
<BtbN> time to contact Intel Driver devs I guess
<JEEB> sounds like a good idea
<BtbN> The weird thing is, the dude in the issue also claims it happens on Nvidia
<BtbN> it does not reproduce there at all for me though
qeed has joined #ffmpeg-devel
zsoltiv_ has quit [Ping timeout: 255 seconds]
Workl has joined #ffmpeg-devel
Krowl has quit [Ping timeout: 260 seconds]
<cone-117> ffmpeg Andreas Rheinhardt master:5f7eb4240a05: avcodec/tests/snowenc: Fix mixed declaration and code
<cone-117> ffmpeg Marth64 master:4464b7eeb194: avformat/dvdvideodec: use int64_t for menu blocks_read and make format expressions portable
System_Error has quit [Ping timeout: 260 seconds]
clarkh_ has quit [Quit: Connection closed for inactivity]
tufei_ has quit [Remote host closed the connection]
tufei_ has joined #ffmpeg-devel
tufei_ has quit [Remote host closed the connection]
tufei_ has joined #ffmpeg-devel
Krowl has joined #ffmpeg-devel
Workl has quit [Ping timeout: 264 seconds]
Krowl has quit [Read error: Connection reset by peer]
AbleBacon has joined #ffmpeg-devel
Traneptora has quit [Quit: Quit]
Traneptora has joined #ffmpeg-devel
<cone-117> ffmpeg James Almer master:136f1cdf0f5e: fate/aac: add missing aresample filter dependency
<cone-117> ffmpeg James Almer master:73095bc19ee5: fate/ac3: add missing aresample filter dependency
<cone-117> ffmpeg James Almer master:234268b4edec: fate/adpcm: add missing aresample filter dependency
<cone-117> ffmpeg James Almer master:b3ab87d3208e: fate/alac: add missing aresample filter dependency
<cone-117> ffmpeg James Almer master:7a10d6521f87: fate/amrnb: add missing aresample filter dependency
<cone-117> ffmpeg James Almer master:8755e7eb74da: fate/amrwb: add missing aresample filter dependency
<cone-117> ffmpeg James Almer master:fc17af7f8de0: fate/atrac: add missing aresample filter dependency
<cone-117> ffmpeg James Almer master:04ab5cc58452: fate/audio: add missing aresample filter dependency
<cone-117> ffmpeg James Almer master:7416d216aa61: fate/demux: add missing aresample filter dependency
<cone-117> ffmpeg James Almer master:20581cea3e1b: fate/fate-container: add missing aresample filter dependency
<cone-117> ffmpeg James Almer master:4c8b8bc52bb3: fate/filter-audio: add missing aresample filter dependency
<cone-117> ffmpeg James Almer master:536dfe92e082: fate/ffmpeg: add missing aresample filter dependency
<cone-117> ffmpeg James Almer master:f3f2932f7560: fate/ffprobe: add missing aresample filter dependency
<cone-117> ffmpeg James Almer master:6887a0292f64: fate/gapless: add missing aresample filter dependency
<cone-117> ffmpeg James Almer master:92c7e2737355: fate/hlsenc: add missing aresample filter dependency
<cone-117> ffmpeg James Almer master:47362785ae0f: fate/iamf: add missing aresample filter dependency
<cone-117> ffmpeg James Almer master:8b96aca43285: fate/libswresample: add missing aresample filter dependency
<cone-117> ffmpeg James Almer master:be9d9b7abaa2: fate/lossless-audio: add missing aresample filter dependency
<cone-117> ffmpeg James Almer master:b80b3947ddf2: fate/monkeysaudio: add missing aresample filter dependency
<cone-117> ffmpeg James Almer master:6d569aa80c73: fate/mov: add missing aresample filter dependency
<cone-117> ffmpeg James Almer master:2df103528c17: fate/mp3: add missing aresample filter dependency
<cone-117> ffmpeg James Almer master:540d1b14d81e: fate/mpc: add missing aresample filter dependency
<cone-117> ffmpeg James Almer master:2262c9ab0c48: fate/pcm: add missing aresample filter dependency
<cone-117> ffmpeg James Almer master:85da6e5c448b: fate/real: add missing aresample filter dependency
<cone-117> ffmpeg James Almer master:9906bef5c40e: fate/vorbis: add missing aresample filter dependency
<cone-117> ffmpeg James Almer master:e48b2211448d: fate/voice: add missing aresample filter dependency
<cone-117> ffmpeg James Almer master:59f5cf5c715c: fate/vqf: add missing aresample filter dependency
<cone-117> ffmpeg James Almer master:cfa694d81127: fate/wmavoice: add missing aresample filter dependency
System_Error has joined #ffmpeg-devel
Marth64 has joined #ffmpeg-devel
Kei_N has quit [Ping timeout: 264 seconds]
Kei_N has joined #ffmpeg-devel
psykose has quit [Remote host closed the connection]
MisterMinister has joined #ffmpeg-devel
agrosant has joined #ffmpeg-devel
psykose has joined #ffmpeg-devel
Marth64 has quit [Ping timeout: 256 seconds]
Marth64 has joined #ffmpeg-devel
iive has joined #ffmpeg-devel
<Sean_McG> I just want to take a moment and say thanks to everybody that spent time looking at FATE test failures lately. I know it's un-sexy but at the very least I really appreciate the work.
SystemError has joined #ffmpeg-devel
System_Error has quit [Ping timeout: 260 seconds]
ngaullie has quit [Ping timeout: 256 seconds]
<Lynne> jkqxz: minor updates, added a few missing fields and setup saved order hint propagation properly - https://github.com/cyanreg/FFmpeg/tree/av1dec
<Lynne> still haven't found a broken stream, and I've ran it through all I have saved (not a lot, av1 isn't that popular yet, and youtube's av1 is watered down, like all they provide)
rvalue has joined #ffmpeg-devel
jarthur has joined #ffmpeg-devel
tufei_ has quit [Remote host closed the connection]
tufei_ has joined #ffmpeg-devel
tufei_ has quit [Remote host closed the connection]
tufei_ has joined #ffmpeg-devel
Marth64 has quit [Ping timeout: 264 seconds]
Marth64 has joined #ffmpeg-devel
cone-117 has quit [Quit: transmission timeout]
<BtbN> Re D3D11: Is it possible that "GPU to CPU" memory copies _do_ need explicit syncing or something?
<BtbN> That'd explain stuff at least a little bit, why it sometimes digs out some super old frame, seemingly not performing the CopyRes/SubRegion calls
Livio has joined #ffmpeg-devel
<Sean_McG> I don't know personally, but it would surprise me if that requirement was not documented somewhere
<Sean_McG> but might it vary between vendors?
<BtbN> well, D3D is not _supposed_ to vary between vendors
<BtbN> That's kinda its whole selling point over Vulkan/OpenGL
<Sean_McG> TRU.DAT
<BtbN> But I honestly don't see what the code is doing wrong
<BtbN> And it works on Nvidia, for me
agrosant has quit [Ping timeout: 264 seconds]
Krowl has joined #ffmpeg-devel
<Lynne> vulkan is vendor invariant
<Lynne> just write all the code to support all cases the spec outlines, it'll work
<JEEB> BtbN: really sounds like an intel funky problem driver-wise
<Lynne> until you find out the vendor in question which requested that workaround didn't implement it properly
<BtbN> The initial reporter says the same thing happens on an Nvidia VM though
MisterMinister has quit [Ping timeout: 260 seconds]
<BtbN> I just can't reproduce it _at all_ locally
<JEEB> ouch
<BtbN> Makes me wonder if that "Nvidia VM" is using some funky Optimus setup, and it's Intel after all
<BtbN> Someone happens to have AMD on Windows 11?
<JEEB> yea
<JEEB> I actually thought the same re: nvidia vm being actually optimus or so
<JEEB> not sure if you noted that it was on mobile or not, but that would have raised the optimus case percentage much higher
<BtbN> The thing is... even if this is a broken Intel driver... we kinda do need to account for it. No idea how though
<BtbN> Nah, definitely not mobile
<BtbN> he cited some big fat Datacenter Nvidia GPU
<JEEB> okay
MisterMinister has joined #ffmpeg-devel
<BtbN> reverting the patch that causes it would make ddagrab unuseable for me again
<BtbN> So kinda gotte pick whom to break it for...
<BtbN> And even then, it's only working by pure chance without that patch
agrosant has joined #ffmpeg-devel
<Sean_McG> wow, changes to ATRAC... takes me back to when I used to have a MiniDisc deck
<Lynne> I still have an encoder I haven't sent to the ML
Livio has quit [Ping timeout: 260 seconds]
<BtbN> since I'm not at work anymore, I have no way of reproducing it anymore either
<BtbN> so gotta wait until monday. I'd want to see if just throwing in a Flush() call after the final CopySubRes region works around the issue
Traneptora has quit [Quit: Quit]
Livio has joined #ffmpeg-devel
agrosant has quit [Ping timeout: 264 seconds]
Marth128 has joined #ffmpeg-devel
Marth64 has quit [Killed (NickServ (GHOST command used by Marth128))]
Marth128 is now known as Marth64
<Marth64> i have 3 nvidias and an arc...happy to help test if needed
<Marth64> i think one of them is an entry grade Quadro
<Marth64> but older gen
<Marth64> no windows tho unless doing vm passthru
HarshK23 has quit [Quit: Connection closed for inactivity]
agrosant has joined #ffmpeg-devel
<BtbN> Well, that's kinda a requirement for testing D3D11 stuff :D
<Marth64> i can set it up nbd, have partitions to spare
<BtbN> I'd say it's not important enough for that
<Marth64> just meant dont have a metal windows ready to go
<Marth64> cool
<BtbN> In theory I _do_ have an AMD GPU in the very system I'm sitting in front of
<BtbN> but not sure if I can make it do ddagrab
<Marth64> BtbN: actually just realized, the Quadro is in a real windows machine
<BtbN> On Nvidia it works for me though. On Intel it doesn't.
<Marth64> its Pascal generation. feel free to shoot any test tasks my way if that card helps
<Marth64> ah got it
<BtbN> I mean, pretty much just try to use ddagrab, draw selection-rects with the mouse, and then look at the footage
<BtbN> it's very obvious if it's busted
<Marth64> ok
<Marth64> Win10 is ok?
<BtbN> Should be
<Marth64> will run shortly
Krowl has quit [Read error: Connection reset by peer]
deus0ww has quit [Ping timeout: 272 seconds]
deus0ww has joined #ffmpeg-devel
<Marth64> BtbN: its busted
<Marth64> sample upload en route
<BtbN> On a pure Nvidia system? That's wild
<BtbN> I don't understand anymore then
<Marth64> yes its like a flickering effect right?
<BtbN> Yeah, sometimes an old frame is somehow dug out
<Marth64> yes exactly
<JEEB> \o/
<BtbN> BUT the latest mouse cursor is drawn onto it. On top of the already existing one
<BtbN> which should be absolutely impossible
<Marth64> yes the mouse movement is smooth but old frames judder in
<BtbN> well, the mouse ends up with a trail
<BtbN> https://github.com/FFmpeg/FFmpeg/blob/master/libavfilter/vsrc_ddagrab.c#L1169 it's like this Copy-Call simply never happens
<BtbN> and it re-draw the mouse into the old frame
<BtbN> But I think it ONLY happens when the input frame comes out of this code-path: https://github.com/FFmpeg/FFmpeg/blob/master/libavfilter/vsrc_ddagrab.c#L712
<BtbN> So it's a chain of two Copy-Calls
<BtbN> Map texture from DDA -> ID3D11DeviceContext_CopyResource -> Unmap it -> ID3D11DeviceContext_CopySubresourceRegion -> draw onto the frame a bit -> deliver it ---> broken
<BtbN> where as Map texture from DDA -> ID3D11DeviceContext_CopySubresourceRegion -> draw onto it a bit -> deliver it ---> works
lemourin has joined #ffmpeg-devel
lemourin is now known as Guest2779
Guest2779 has quit [Killed (lithium.libera.chat (Nickname regained by services))]
<Marth64> i see the trail now
<BtbN> Can you try a patch on that machine?
<Marth64> anything you need
<Marth64> sorry trying to get the video off to upload
<BtbN> it'll look similar to the video from earlier
<BtbN> The patch is basically just adding ID3D11DeviceContext_Flush(dda->device_hwctx->device_context); after the singular ID3D11DeviceContext_CopySubresourceRegion call in vsrc_ddagrab.c
<Marth64> i don't have compiler on it :(
<Marth64> but i can figure it out
<Sean_McG> if you have Docker somewhere, we have a node that can do Windows cross-compiles -- we even use it for the CI jobs
<Marth64> yes that would make my life much easier
<Marth64> i has docker
<BtbN> I'm already building a binary, one sec
<Marth64> windows machine probably wont let me install dx sdk since its not pro/home
<Marth64> tyty
<BtbN> DX SDK does not exist anymore anyway
<Marth64> makes sense with their modernization. i haven't done win32 in long time
<BtbN> Just clone my builds repo and run `FFMPEG_REPO_OVERRIDE="https://github.com/BtbN/FFmpeg.git" GIT_BRANCH_OVERRIDE="master" ./build.sh win64 gpl` if you need some kinda special build
<Marth64> gpu: NVIDIA Quadro P2200 cpu: AMD FX 8350 8-core chipset: amd 9xx
<Marth64> ok
<Marth64> got the sample off too, will upload before/after together
<BtbN> no need to upload really
<Marth64> cool tyty
<BtbN> I do believe you that it's broken :D
<Marth64> i promise it looks bad haha
<Marth64> standing by for bin, no rush
<Marth64> on it
<BtbN> If you are REALLY bored, I do wonder if a) updating the Nvidia driver a and then b) updating to latest Win 11 would fix it
<Marth64> for the greater good i'd do it but win11 makes me sick
<Marth64> now an interesting update
<Marth64> with patch, no judder, smooth ... BUT no mouse cursor
<BtbN> what
<BtbN> how
<Marth64> yup haha
<BtbN> let's just move the Flush after drawing the mouse cursor then I guess
<Marth64> before: http://0x0.st/HF4m.mkv after (patch 1): http://0x0.st/HF4a.mkv
<Marth64> testing new patch now
<Marth64> still no cursor
<Marth64> nvidia driver 31.0.15.2849 from 2/2/2023
<BtbN> That's not a driver version I'm aware of
<Marth64> let me try once more
<BtbN> But over a year old is definitely old
<Marth64> i think that's the .dll version, actual is 528.49
<Marth64> my bad
<BtbN> Yeah, that's old
<BtbN> I'm on 551.61 locally
<BtbN> Are you encoding using nvenc, or downloading to libx264 or something?
<Marth64> it's actually still broken .. i apologize... when i said no cursor, that was over RDP .. just did it on physical display and can reproduce the original issue
<BtbN> With the Flush in, that is?
Marth128 has joined #ffmpeg-devel
<Marth128> correct, flush/judder effect
<Marth128> ffmpeg -init_hw_device d3d11va -filter_complex ddagrab=0 -c:v h264_nvenc -cq:v 20 output.mkv
<BtbN> That's so weird
<Marth128> can update the driver
<BtbN> I got no clue what's causing that
<BtbN> latest driver would be super interesting
<BtbN> if that fixes it, I can point at Intel at least
Marth64 has quit [Killed (NickServ (GHOST command used by Marth128!~Marth64@85.237.194.65))]
<Marth128> yeah will do it now
Marth128 is now known as Marth64
<BtbN> Be sure to reboot, even if Nvidia Installer does not prompt you to
<Marth64> ok
<Marth64> no RDP this time to mud the results, apologize for that
<Marth64> 551.61 on the way
<Marth64> i did "Perform a clean installation" also, got nothing to lose on this machine
<BtbN> That only resets Game-Settings and stuff I think
<Marth64> just some fire emblem saves
<Marth64> ok
<Sean_McG> that reminds me I still have to start FE: Engage on my Switch
Traneptora has joined #ffmpeg-devel
<Marth64> the soundtrack is too good
<Marth64> i have limited time to play because of job but i play it vicariously through partner
<Sean_McG> yes, $DAYJOB limits my gaming time as well
<Marth64> :)
<Marth64> rebooting...beepboop
<Sean_McG> heading out for food, and probably calling it a night -- take care everybody
<Marth64> tc!
<Marth64> BtbN: issue still happening on g3c10a1b499
<Marth64> trying your last master build now on github
<Marth64> it's still happening, can consistently reproduce
<BtbN> I don't get it
<Marth64> should i try without moving the mouse? maybe some light keyboard activity only
<BtbN> I mean, I know what condition triggers it
<Marth64> got it
<BtbN> It's whenever buffer_texture gets used
<Marth64> i did notice something bizarre
<Marth64> when i am doing the mouse moves, the black frames occur and old frames repeat. without mouse, only old frames repeat
<Marth64> you probably know this already but thought to confirm/share
<BtbN> well, there's an internal pool of textures in the hw_frames_ctx
<BtbN> and the copying of the frame just somehow never happens in the error case
<BtbN> So if it happens early in the recording, the pool just hasn't rotated through fully yet, and the AVFrame is empty
<BtbN> while later some random old one gets re-used
<Marth64> pulling up vsrc_ddgrab.c to take a peek
<BtbN> so you might even get a black frame _with_ a mouse cursor drawn onto it
<BtbN> it's dumb
<BtbN> That should be 100% impossible, but yet it happens
<Marth64> i can fuzz the some of the options manually and see if that changes anything. eg. pixel format, dup_frames
<BtbN> This build should not exhibit the issue, but it's broken for me cause of the random format switches
<Marth64> running
<Marth64> yes, that build looks good
<BtbN> That build fails for me the moment I move the mouse though...
<Marth64> my cursor is smooth on it
<Marth64> i noticed, that it took a little longer to start
<BtbN> Cause on a frame that's "mouse upate only, no frame change", when you map the desktop resource from a HDR/10bit screen, for some reason you will get an 8 bit texture
<BtbN> Which will completely break the input, since it's set up for 10 bit textures
<Marth64> this is a shot in the dark, but i ran clang-tidy and found something possibly smell (but also perfectly valid if it's intended)
<BtbN> What is it?
<Marth64> why monochrome referring to &width/height? but masked color is not
<Marth64> clang-tidy things they are cloned statements
<Marth64> s/things/thinks
<BtbN> Cause one can change it, the other can't.
<Marth64> got it
<Marth64> vsrc_ddagrab.c:647:76: warning: repeated branch in conditional chain [bugprone-branch-clone]
<Marth64> if (shape_info.Type == DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MONOCHROME) {
<Marth64> wonder why it thinks its repeated then
<Marth64> o well
<BtbN> But even if, that's only copying the mouse cursor texture
<Marth64> i wonder if it's 2 issues
<BtbN> sooo
<Marth64> if that's g9f596d3060 then yep!
<Marth64> spared me the win11 upgrade ;D
<BtbN> well, not really
<BtbN> but actually... it's broken on my Laptop at work
<BtbN> which is Win11
<BtbN> I wonder if I'm messing up the AddRef dance
<BtbN> but it looks correct to me
<Marth64> let me check what gpu mom's nuc has .. its 11..this happen on intel too right?
<BtbN> Yeah, at this point I don't think it's driver or vendor related anymore
<BtbN> and I'm more confused why it does not happen for me than anything else
<Marth64> think i reproduced on win11 ...
<BtbN> hm, I do wonder if the internal texture has some more flags that need cleared
<Marth64> its a slow machine, so encoding is like 0.4x with libx264, but there's a heavy cursor trail
<Marth64> trying to see what real time options i have to rule out the slow encode. this one's an Intel Iris Plus 655 iGPU
<Marth64> it should have quicksync i hope
<Marth64> yeah so in this machine, i'm only seeing a heavy cursor trail. no empty frames or old frames. might be a different issue
<Marth64> ./ffmpeg -filter_complex ddagrab=0,hwdownload,format=bgra -c:v h264_qsv -b:v 1M -an output.mkv
<BtbN> cursor trail automatically implies it's re-using old frames
<BtbN> i.e. an old one with the cursor on it
<Marth64> got it
<Marth64> let me try with g9f596d3060- for the confidence, then now i know i have 2 machines susceptible to the issue
<Marth64> would rule out GPU and Windows version kinda
<BtbN> Just try latest master if you need to reproduce
<Marth64> i reproduced with latest master, just wanted to check if 3060 fixes it on the intel machine like it did on my nvidia
<BtbN> It's just somehow that that intermediate copy somehow ends up being super super broken
<BtbN> This would be a complete crap-shot at fixing it. Just clearing out the flags of the buffer texture
<Marth64> will test on both machines shortly
<Marth64> got stuck in a windows update trap heh
<BtbN> I have a patch I can push that will at least revert it to the way it used to be, until it actually hits the case that breaks HDR capture
agrosant has quit [Ping timeout: 264 seconds]
<BtbN> It's working by a VERY ugly principle, but it's working.
<Marth64> yes, i can confirm on the nvidia machine, the issue is not present in that build. i also re-tested master to rule out windows update.
<Marth64> it is a 1920x1080 display
<Marth64> moving on to the intel
<Marth64> they are on different IPs so i apologize for the bandwidth use downloading twie
<Marth64> s/twie/twice
<Marth64> BtbN: intel machine, latest build you provided --- the mouse trails are gone :D
<Marth64> win11 @ 1920x1080
<BtbN> and the general other wonkiness?
<Marth64> none, looked ok
<BtbN> wow
<Marth64> ran another one to be sure. it's an anemic machine but the output looked very acceptable
<Marth64> going back to closed captions stuff
<Marth64> ping me if ya need
<BtbN> I'd have one more patch to run for purely academic reasons, but no rush on that one
<Marth64> nw, send it my way at your convenience and i'll run it
<BtbN> So, this is the patch that actually seems to fix it: https://github.com/BtbN/FFmpeg/commit/7ba7f1a96245fbf47f3bb1885b5f1d76be730235
<BtbN> And for me, those flags are already all 0, except for the bind flags, which are render res/shader res, which is both fine
<BtbN> And now I'd love to know what they are on a broken system
<Marth64> do they get logged or are they something i can pull from dxdiag?
<Marth64> if dxdiag is even a thing anymore
<BtbN> I'll just add a log for them
<BtbN> no other sensible way to get to them
<Marth64> cool
<Marth64> makes sense, they seem to be per texture
<BtbN> Yeah
<BtbN> The texture they come from in this case is the desktop texture, straight from the compositor
<BtbN> I really do wonder why so many people, except for me, have non-normal flags in there that'd ruin the day, and what they'd be
<Marth64> if i recall correctly, when you install graphics drivers, windows runs some kind of capability test and configures the compositor (Aero/DWM?) based on that
<BtbN> nah, that's not what the flags are about
<Marth64> wonder if it's a configuration that happens at that point, that causes it to behave differently later
<Marth64> got it
<BtbN> they control stuff of who can access the texture in what way. I.e. it's a GPU<->GPU only, or GPU<->CPU, and so on
<Marth64> ah
<Marth64> what is your system chipset?
<BtbN> Logs this for me: [Parsed_ddagrab_0 @ 0000023682b99480] >>>>>>>>>> Initial texture flags: Usage: 0, BindFlags: 40, CPUAccessFlags: 0, MiscFlags: 0
<BtbN> This is an X670E Ryzen system, though I don't think the chipset plays any role in this
<BtbN> this is gonna be some windows or driver setting somewhere, somehow influencing this
<BtbN> For me, the misc flags are even different per-screen
<BtbN> i.e. it has 10496 in the misc flags there. Which is D3D11_RESOURCE_MISC_RESTRICT_SHARED_RESOURCE | D3D11_RESOURCE_MISC_SHARED_NTHANDLE | D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX
<Marth64> [Parsed_ddagrab_0 @ 000001b8522a9c00] >>>>>>>>>> Initial texture flags: Usage: 0, BindFlags: 40, CPUAccessFlags: 0, MiscFlags: 10496
<BtbN> specially the keyecmutex one I could see causing this
<BtbN> ok, so same thing
<BtbN> I don't get it, why is it different for me, on some screens?
<BtbN> I just never tested the one screen it's broken on. I get if I revert the patch, I'll see the same nonsense there...
<BtbN> *bet
<Marth64> the nvidia one is running off DisplayPort->HDMI adapter; intel is HDMI only
<Marth64> wonder if that matters, or refresh rate
<BtbN> That should also not influence these at all
<BtbN> My guess is that it's because this is a HDR screen
<Marth64> hmm. when you say "screen", did you mean display?
<BtbN> And so is one of the second ones
<BtbN> yeah
<Marth64> makes sense
<Marth64> one more shot in the dark, do you have IO-MMU enabled?
<Marth64> bios setting
<BtbN> yes, but then it wouldn't be different accross my screens
<Marth64> unless the broken screen is primary display
<Marth64> i can see that possibly
<BtbN> And yeah, I DO observe it being broken on my third screen.
<BtbN> I just never once seem to have tested that screen, ever
<BtbN> Anyway, glad that wild goose hunt is over
<Marth64> is third screen same screen BIOS assumes for VGA on initial boot?
<BtbN> Thanks for the help!
<Marth64> yeah, anytime
<BtbN> Nah, it boots on the big fat HDR one
<BtbN> I can just set that in the UEFI
<Marth64> i need to get hdr screen soon
<BtbN> It's Crap-HDR. I.e. HDR400
<Marth64> i just watch old sd content over and over
<BtbN> but I just wanted the cheapest HDR/10bit color depth screen I could get my hands on
<BtbN> if you actually want something for viewing pleasure, make sure it's at least HDR1000
<Marth64> thx, noted
cone-984 has joined #ffmpeg-devel
<cone-984> ffmpeg Timo Rothenpieler master:b47abd5737ee: avfilter/vsrc_ddagrab: clear all flags of buffer texture