summaryrefslogtreecommitdiff
path: root/libavfilter/vf_vaguedenoiser.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2020-06-07 13:12:34 +0200
committerPaul B Mahol <onemda@gmail.com>2020-06-07 15:20:11 +0200
commit6c57b0d63ac9b7a14012b8a00650d4fafbc18dc5 (patch)
treeb869a19fbad579b8d1f37f126b42c243711c6ef7 /libavfilter/vf_vaguedenoiser.c
parentd09c35677defb383f69395cef84a5e20c41da6d2 (diff)
avfilter/vf_vaguedenoiser: remove excessive code from soft thresholding
Diffstat (limited to 'libavfilter/vf_vaguedenoiser.c')
-rw-r--r--libavfilter/vf_vaguedenoiser.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/libavfilter/vf_vaguedenoiser.c b/libavfilter/vf_vaguedenoiser.c
index 023bd5d16a..e3d4d30f25 100644
--- a/libavfilter/vf_vaguedenoiser.c
+++ b/libavfilter/vf_vaguedenoiser.c
@@ -352,18 +352,10 @@ static void soft_thresholding(float *block, const int width, const int height, c
{
const float frac = 1.f - percent * 0.01f;
const float shift = threshold * 0.01f * percent;
- int w = width;
- int h = height;
- int y, x, l;
-
- for (l = 0; l < nsteps; l++) {
- w = (w + 1) >> 1;
- h = (h + 1) >> 1;
- }
+ int y, x;
for (y = 0; y < height; y++) {
- const int x0 = (y < h) ? w : 0;
- for (x = x0; x < width; x++) {
+ for (x = 0; x < width; x++) {
const float temp = FFABS(block[x]);
if (temp <= threshold)
block[x] *= frac;