Skip to content

vo_gpu_next: use pl deinterlace shader for bwdif instead of sw filter#17394

Draft
llyyr wants to merge 1 commit intompv-player:masterfrom
llyyr:pl-deint
Draft

vo_gpu_next: use pl deinterlace shader for bwdif instead of sw filter#17394
llyyr wants to merge 1 commit intompv-player:masterfrom
llyyr:pl-deint

Conversation

@llyyr
Copy link
Contributor

@llyyr llyyr commented Feb 10, 2026

Currently a draft because it breaks when changing hwdec during runtime

// We check also if a filter is already present, to avoid removing it
bool filter_needed = opts->deinterlace == 1 ||
(opts->deinterlace == -1 && (p->interlaced_frame || p->sub.filter));
bool filter_needed = (info && info->deinterlace) && (opts->deinterlace == 1 ||
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this flipped? We don't want filter when deinterlace is supported. Also we might still prefer hardware deint. Might actually need an option, not sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made it only override the software filter, still crashes with hwdec however. I won't have time to look at this for a bit

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardware Intel deint should be always preferred. Just need this fixed. #15197

Works on FFmpeg correctly on Linux
ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -v debug -f rawvideo -pix_fmt yuv420p -s:v 720x480 -top 1 -i MotionTest_i_tff_720x480_10f_I420.yuv -vf 'format=nv12,hwupload,deinterlace_vaapi=mode=weave:rate=field,hwdownload,format=nv12' -pix_fmt yuv420p -vframes 20 -y dump.yuv

@dancingmirrors
Copy link

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.

@llyyr llyyr force-pushed the pl-deint branch 3 times, most recently from a5e1c86 to 0939147 Compare February 10, 2026 20:14
Currently a draft because it breaks when changing hwdec during runtime
@kasper93
Copy link
Member

This should be implemented such that it's possible to output full frame rate (60i -> 60p), instead of every other frame.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants