diff options
author | Lynne <dev@lynne.ee> | 2023-07-04 00:48:09 +0200 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2023-07-04 00:52:19 +0200 |
commit | 9ff834c2a0dbbe5544ec09b56d077a3b21f728c0 (patch) | |
tree | 849cc9e8310a3c3ce4d22ea1be36ce9143a7ccea | |
parent | d4b989c94d7ec2693bd52b286099f02d99e2bc4f (diff) | |
download | ffmpeg-9ff834c2a0dbbe5544ec09b56d077a3b21f728c0.tar.gz |
bwdif_vulkan: clamp the temporarily interpolated sample spatially
This makes the filter output match that of the C version.
It was left intentionally while we figured out if it was better
or not, and while it makes certain samples better, it makes static
samples jump around slightly.
-rw-r--r-- | libavfilter/vf_bwdif_vulkan.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavfilter/vf_bwdif_vulkan.c b/libavfilter/vf_bwdif_vulkan.c index 1fc74d1544..db916b22cd 100644 --- a/libavfilter/vf_bwdif_vulkan.c +++ b/libavfilter/vf_bwdif_vulkan.c @@ -86,8 +86,7 @@ static const char filter_fn[] = { C(0, ) C(1, bvec4 interpolate_cnd1 = greaterThan(abs(fc - fe), temp_diff[0]); ) C(1, vec4 interpol = mix(interpolate_cur, interpolate_all, interpolate_cnd1); ) - /* Cliping interpol between [fd - diff, fd + diff] is intentionally left out. - * Removing the clipping increases quality. TODO: research and fix the C version to match this. */ + C(1, interpol = clamp(interpol, fd - diff, fd + diff); ) C(1, return mix(interpol, fd, diff_mask); ) C(0, } ) }; |