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
Traneptora_ has joined #ffmpeg-devel
Traneptora has quit [Ping timeout: 260 seconds]
System_Error has quit [Remote host closed the connection]
System_Error has joined #ffmpeg-devel
<kasper93>
haasn: there is double av_frame_free(&in) after bb8044581366fe286e16b14515d873979133dbda, are you interested in fixing it?
Teukka has quit [Read error: Connection reset by peer]
Teukka has joined #ffmpeg-devel
Teukka has quit [Changing host]
Teukka has joined #ffmpeg-devel
mkver has quit [Ping timeout: 268 seconds]
Daemon404 has quit [Ping timeout: 264 seconds]
Daemon404 has joined #ffmpeg-devel
lexano has quit [Ping timeout: 272 seconds]
thilo has quit [Ping timeout: 264 seconds]
thilo has joined #ffmpeg-devel
thilo has quit [Changing host]
thilo has joined #ffmpeg-devel
ergZay has joined #ffmpeg-devel
<ergZay>
Is it possible for ffmpeg to change the default arib subtitle decoder from libaribcaption to libaribb24?
<ergZay>
er typo, from libaribb24 to libaribcaption
rvalue- has joined #ffmpeg-devel
Traneptora_ has quit [Quit: Quit]
<ergZay>
libaribcaption has wider format support and libaribb24 doesn't even work for currently being released transport streams from Japanese television
<kasper93>
(vf_scale.c#L725-L726 in fact does not leak, because the alloc is attached to ScaleContext, but still I see reports from this, so something is bad further on)
<haasn>
Odd, since uninit() should take care of them
<kasper93>
Try with some big scale like `-vf scale=12:2147483647` to make init fail due to overflows, that could also be fixed at some point
<kasper93>
to be specific `./ffmpeg_g -i t.mkv -vf scale=12:2147483647 -f null /dev/null` is enough to reproduce leaks
<courmisch>
Lynne: tensor units? you mean bf16 stuff?
j45 has joined #ffmpeg-devel
j45 has quit [Changing host]
j45 has joined #ffmpeg-devel
<courmisch>
annoying how most scalar product and matrix FMA stuff seems to only support 8x8 multiplies
<courmisch>
(to be fair Arm SVE seems to have 16x16)
System_Error has quit [Ping timeout: 260 seconds]
Krowl has quit [Read error: Connection reset by peer]
ccawley2011 has joined #ffmpeg-devel
System_Error has joined #ffmpeg-devel
lexano has joined #ffmpeg-devel
Krowl has joined #ffmpeg-devel
jamrial has joined #ffmpeg-devel
deus0ww has quit [Ping timeout: 264 seconds]
ergZay has quit [Quit: This computer has gone to sleep]
deus0ww has joined #ffmpeg-devel
cone-215 has quit [Quit: transmission timeout]
vckt has joined #ffmpeg-devel
Daemon404 has joined #ffmpeg-devel
Daemon404 has quit [Changing host]
Livio has joined #ffmpeg-devel
Krowl has quit [Read error: Connection reset by peer]
<Lynne>
courmisch: no, they also support i8*i8 -> i16
Krowl has joined #ffmpeg-devel
cone-149 has joined #ffmpeg-devel
<cone-149>
ffmpeg Zhao Zhili master:85706f5136cf: avutil/hwcontext_videotoolbox: Fix version check
uartie_ has joined #ffmpeg-devel
uartie has quit [Ping timeout: 264 seconds]
uartie_ is now known as uartie
System_Error has quit [Remote host closed the connection]
System_Error has joined #ffmpeg-devel
vckt has quit [Ping timeout: 256 seconds]
<Lynne>
and f32*f32 -> f64
<Lynne>
bf16 hasn't been *that* well supported in consumer/workstation hardware until rdna3/ada
<Lynne>
also vulkan still doesn't have a way to expose bf16... for now
sadome has joined #ffmpeg-devel
sadome has joined #ffmpeg-devel
sadome has quit [Changing host]
sadome has quit [Excess Flood]
<haasn>
kasper93: this is actually a leak in swscale
<haasn>
fixed
mkver has quit [Ping timeout: 268 seconds]
vckt has joined #ffmpeg-devel
vckt has joined #ffmpeg-devel
vckt has quit [Changing host]
System_Error has quit [Ping timeout: 260 seconds]
System_Error has joined #ffmpeg-devel
mkver has joined #ffmpeg-devel
<cone-149>
ffmpeg Rémi Denis-Courmont master:3606e592ea23: lavc/h264dsp: R-V V 8-bit h264_weight_pixels
<cone-149>
ffmpeg Rémi Denis-Courmont master:f1ed351d3b3c: lavc/h264dsp: R-V V 8-bit h264_biweight_pixels
vckt has quit [Ping timeout: 252 seconds]
Livio has quit [Ping timeout: 240 seconds]
vckt has joined #ffmpeg-devel
vckt has quit [Changing host]
vckt has joined #ffmpeg-devel
Sirtsu55 has quit [Server closed connection]
Sirtsu55 has joined #ffmpeg-devel
Krowl has quit [Read error: Connection reset by peer]
* Sean_McG
peeks in
<j-b>
good morning
devinheitmueller has quit [Ping timeout: 264 seconds]
<ePirat>
Hi
Krowl has joined #ffmpeg-devel
<Sean_McG>
hi
<Marth64>
good day
kasper93 has quit [Ping timeout: 255 seconds]
kasper93_ has joined #ffmpeg-devel
vckt has quit [Ping timeout: 268 seconds]
AbleBacon has joined #ffmpeg-devel
devinheitmueller has joined #ffmpeg-devel
MikhailAMD has joined #ffmpeg-devel
kasper93_ is now known as kasper93
MikhailAMD has quit [Client Quit]
MikhailAMD has joined #ffmpeg-devel
MikhailAMD has quit [Client Quit]
MrZeus has joined #ffmpeg-devel
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ffmpeg-devel
vckt has joined #ffmpeg-devel
vckt has quit [Changing host]
vckt has joined #ffmpeg-devel
rvalue has quit [Max SendQ exceeded]
MrZeus has quit [Ping timeout: 268 seconds]
rvalue has joined #ffmpeg-devel
vckt has quit [Ping timeout: 268 seconds]
rvalue has quit [Max SendQ exceeded]
ngaullier has quit [Quit: Leaving]
rvalue has joined #ffmpeg-devel
devinheitmueller has quit [Quit: devinheitmueller]
blb has quit [Ping timeout: 264 seconds]
devinheitmueller has joined #ffmpeg-devel
feiw has quit [Remote host closed the connection]
feiw has joined #ffmpeg-devel
cone-149 has quit [Quit: transmission timeout]
ccawley2011 has quit [Read error: Connection reset by peer]
mkver has quit [Ping timeout: 252 seconds]
ergZay has joined #ffmpeg-devel
vckt has joined #ffmpeg-devel
vckt has quit [Changing host]
vckt has joined #ffmpeg-devel
Krowl has quit [Read error: Connection reset by peer]
vckt has quit [Read error: Connection reset by peer]
ccawley2011 has joined #ffmpeg-devel
MikhailAMD has joined #ffmpeg-devel
MikhailAMD has quit [Client Quit]
MrZeus has joined #ffmpeg-devel
MrZeus has quit [Read error: Connection reset by peer]
MrZeus has joined #ffmpeg-devel
MrZeus has quit [Read error: Connection reset by peer]
MrZeus has joined #ffmpeg-devel
kasper93_ has joined #ffmpeg-devel
kasper93 has quit [Ping timeout: 268 seconds]
mkver has joined #ffmpeg-devel
System_Error has quit [Remote host closed the connection]
IndecisiveTurtle has joined #ffmpeg-devel
<IndecisiveTurtle>
Lynne: Very sorry for the absense, I read your email. I got a bit stuck on the null issue last week trying to debug it so I moved to makign the quant shader 2 days ago to get some more progress. Almost finished with that
kasper93_ is now known as kasper93
<Lynne>
the null issue should be trivial to solve
<IndecisiveTurtle>
I saw the hwc pointer you mentioned but I wasn't sure if the hwctx member of it is the same as the one FFVulkanContext needed, as its type erased. Searched for references and found only hwcontext_vulkan setting it during init, but that was in its private context that can't access. It's strange as certain filters that use vulkan have FFVulkanContext as a member of private data and don't appear to init hwctx either
<Lynne>
AVCodecContext
<Lynne>
its required to have a valid frames context set for encoding
<Lynne>
and you can always get a device context from a frame context
<Lynne>
and even if you couldn't for whatever reason, you can always get a frame context from the avframe given as an input
<IndecisiveTurtle>
I'm trying to create some buffers during encoder init so is using frames possible for that?
<IndecisiveTurtle>
The coefficient buffer for each plane and a ubo for quant LUTs
<Lynne>
if you're not trying to do something proper you can do that upon a first frame in, you're still far off from encoding multiple frames
<Lynne>
oh no
<Lynne>
you don't need quant LUTs
<Lynne>
just divide by the quantizer
<Lynne>
unless you mean the actual quantization index -> quantizer LUTs, then yeah
<IndecisiveTurtle>
The qmagic_lut
<IndecisiveTurtle>
And ff_dirac_qscale_tab
<IndecisiveTurtle>
They are q_m/q_a
Krowl has joined #ffmpeg-devel
Krowl has quit [Client Quit]
<IndecisiveTurtle>
The strange thing to me is, why do filters work when not setting the hwctx member that is what I don't understand honestly
Krowl has joined #ffmpeg-devel
<IndecisiveTurtle>
For example I saw vf_gblur_vulkan
<IndecisiveTurtle>
In no place does it set the hwctx member of its vulkan context
<IndecisiveTurtle>
Or probably I didn't find it
<Lynne>
you don't need qmagic_luts
<Lynne>
just do coeff/quantization_index instead
<IndecisiveTurtle>
I see, will do
<Lynne>
it'll save you debugging, and it can always be added in the future, the magic luts are just faster ways of doing integer division
<Lynne>
let's start from the start
<Lynne>
which field is not set?
<IndecisiveTurtle>
The AVVulkanDeviceContext *hwctx member of FFVulkanContext
<IndecisiveTurtle>
Any function that uses it will crash
<Lynne>
ah, you're supposed to set that one
<Lynne>
check out libavcodec/vulkan_decode.c:1153
<IndecisiveTurtle>
I got confused because filters didn't appear to set it so thought I was doing something wrong elsewhere
<Lynne>
filters have a common initialization routine in libavfilter/vulkan_filter.c which sets up the context and everything they need
<IndecisiveTurtle>
Ah I see so it's only supported in decoders
Krowl has quit [Read error: Connection reset by peer]
<Lynne>
to initialize the context yourself, you have to set s->frames_ref, s->frames, s->hwfc, s->device, and s->hwctx
<Lynne>
all of this can be done with any AVBufferRef to hwfc you find
<IndecisiveTurtle>
Let me try now
<Lynne>
you'll also need to copy the ctx->s.extensions code from libavcodec/vulkan_decode.c:652 to set the extensions
<Lynne>
so, do ctx->s.extensions = ff_vk_extensions_to_mask, call ff_vk_load_functions, set the 5 fields I pasted up, call ff_vk_load_props and you'll have a fully initialized context
<IndecisiveTurtle>
Thanks, hope it runs after this, I've added the dispatches to haar shader and basic encoding shader. The latter will definitely need some decoding but its mostly a straight copy of cpu code with (1, 1, 1) workgroup size. Do I need to wait for the submit to finish for each frame or just let it?
<Lynne>
yes, you'll need to wait, just call ff_vk_exec_pool_init() with nb_contexts == 1
<Lynne>
err, nevermind
<Lynne>
just call ff_vk_exec_wait after submit
<IndecisiveTurtle>
Oki will do
<IndecisiveTurtle>
Ah I wanted to ask another thing but forgot initially, regarding the shader integration I got some questions. I tried copying the code from in the makefile that generates headers for them but it didn't seem to work, I got link errors when defining the extern strings.
<IndecisiveTurtle>
So I hardcoded them in the source files for now. Another thing is that I noticed calls to ff_vk_pipeline_descriptor_set_add will actually emit glsl themselves for the descriptors which we probably don't want in this case, any way to avoid this or actually does this even matter?
<Lynne>
you can paste shaders
<Lynne>
so you shouldn't hardcode descriptors
<IndecisiveTurtle>
Hm I see, so I should remove the descriptors from the shader and let the descriptor add them for me
<Lynne>
yes
<Lynne>
just call GLSLD(source);
<IndecisiveTurtle>
Understood, will fix this too
<Lynne>
to fix linking errors, you have to add the shader file you added as a dependency to the encoder
<IndecisiveTurtle>
If my shader name is dwt.comp do I name it dwt.o or dwt_comp.o
<Lynne>
dwt.o
<IndecisiveTurtle>
Hm seems like it doesn't recognize either, anything else I need to add?
<IndecisiveTurtle>
At the bottom of the makefile I have added the lines that call source2c
<Lynne>
doesn't recognize it?
<Lynne>
it fails building due to linking, or due to another error?
<IndecisiveTurtle>
Looks like I made a silly copy error in writing it, issue resolved sorry :P
<IndecisiveTurtle>
For UBOs with multiple structs do I need to add them all in a single line in buf_content?
<IndecisiveTurtle>
Eh not multiple structs but a struct with many arrays as members
<Lynne>
check out what libavfilter/vf_nlmeans_vulkan.c does
<Lynne>
it just has pointers to all buffers the shader needs in pushconst
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ffmpeg-devel
<Lynne>
not sure what you mean by many arrays?
MrZeus has quit [Read error: Connection reset by peer]
MrZeus has joined #ffmpeg-devel
<IndecisiveTurtle>
I was looking at that just now actually. Seems to define a bunch of buffers but buf_contets is just a single line with a float array i.e float weights_3[]
ccawley2011 has quit [Read error: Connection reset by peer]
<IndecisiveTurtle>
I removed qmagic_lut but still need to pass the other ones (ff_dirac_qscale_tab, quant) I think, so I chose UBO as its read only.
<Lynne>
sure
<IndecisiveTurtle>
So do I need to make them separate bindings like that filter or I was wondering if I can have a single UBO with both
<Lynne>
just use separate bindings
<IndecisiveTurtle>
Oki thanks will do
MrZeus has quit [Ping timeout: 264 seconds]
System_Error has joined #ffmpeg-devel
darkapex has quit [Remote host closed the connection]
darkapex has joined #ffmpeg-devel
Kei_N has quit [Read error: Connection reset by peer]