mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-08 16:54:03 +02:00
avfilter/vf_vaguedenoiser: remove excessive code from soft thresholding
This commit is contained in:
parent
d09c35677d
commit
6c57b0d63a
@ -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 frac = 1.f - percent * 0.01f;
|
||||||
const float shift = threshold * 0.01f * percent;
|
const float shift = threshold * 0.01f * percent;
|
||||||
int w = width;
|
int y, x;
|
||||||
int h = height;
|
|
||||||
int y, x, l;
|
|
||||||
|
|
||||||
for (l = 0; l < nsteps; l++) {
|
|
||||||
w = (w + 1) >> 1;
|
|
||||||
h = (h + 1) >> 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (y = 0; y < height; y++) {
|
for (y = 0; y < height; y++) {
|
||||||
const int x0 = (y < h) ? w : 0;
|
for (x = 0; x < width; x++) {
|
||||||
for (x = x0; x < width; x++) {
|
|
||||||
const float temp = FFABS(block[x]);
|
const float temp = FFABS(block[x]);
|
||||||
if (temp <= threshold)
|
if (temp <= threshold)
|
||||||
block[x] *= frac;
|
block[x] *= frac;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user