vo_gpu_next: use pl deinterlace shader for bwdif instead of sw filter#17394
vo_gpu_next: use pl deinterlace shader for bwdif instead of sw filter#17394llyyr wants to merge 5 commits into
Conversation
|
Yes, for some reason bwdif_vulkan stopped working for me after around FFmpeg 7.1, just outputs a green screen instead. No idea what happened but libplacebo's deinterlacing works. |
0939147 to
6da6403
Compare
|
This should be implemented such that it's possible to output full frame rate (60i -> 60p), instead of every other frame. |
|
Any updates? |
|
No, and I'm quite busy irl so I won't have time for this for a few months still. If anyone wants to pick this up they're welcome |
|
Rebased on top of #18099 This is ready for testing/review now |
|
unless I'm misunderstanding it, documentation of pl_source_frame.first_field already says libplacebo is doing the doubling internally. Can you tell me what I need to do here or how I can check if it's working right? |
It does, but you have to drive rendering twice as fast. Two times per each frame to output full frame rate, else you are dropping every other field (output frame). Get this sample and test it. You should be able to see all consecutive numbers. You can pause and frame step, both forward and backward frame step should work correctly. https://github.com/bbgdzxng1/interlace-detection-test-patterns/raw/9d163e87b222e2711ab5fae805d80b2e655e04c1/bt601-525_480_interlaced_bff.ts EDIT: You can find more samples at https://github.com/bbgdzxng1/interlace-detection-test-patterns/ |
|
From those samples, even current vaapi/vulkan deint filters skip half the fields on gpu-next. On gpu, 60i becomes 60p correctly. I'll need to check why |
When the image format changes (e.g. switching hwdec), immediately destroy the existing deinterlace filter instead of draining it. Draining feeds new frames through the old filter, which can cause issues. (e.g. bwdif_vulkan receiving vaapi frames). This fixes userdeint filter failure when switching from hwdec=vulkan to hwdec=vaapi while the filter is applied via --deinterlace=auto/yes
Used in next commits
This is used to emit frame per field, so the VO is asked to draw both fields.
|
This outputs full frame rate now. Though I'm not sure if there's a simpler way to do this than adding a dummy video filter |
This is used to signal when the VO can do deinterlacing itself, instead of using a filter
No description provided.