diff options
author | Paul B Mahol <onemda@gmail.com> | 2023-12-01 21:11:57 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2023-12-01 21:31:38 +0100 |
commit | db7b8382376e6b49cfc44583036759be59156f22 (patch) | |
tree | fb56c0d76af1419714f3311d91b2ac16fa90b867 | |
parent | fa0470347e326fe1c9f54ab3dcdbdfa67fa5eddd (diff) | |
download | ffmpeg-db7b8382376e6b49cfc44583036759be59156f22.tar.gz |
avfilter/vf_chromanr: compare correct variables for advanced mode
-rw-r--r-- | libavfilter/vf_chromanr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_chromanr.c b/libavfilter/vf_chromanr.c index dd49d8670a..6f969f981c 100644 --- a/libavfilter/vf_chromanr.c +++ b/libavfilter/vf_chromanr.c @@ -158,7 +158,7 @@ static int distance ## _slice##name(AVFilterContext *ctx, void *arg, su += U; \ sv += V; \ cn++; \ - } else if (fun(cyY, cuU, cvV) < thres) { \ + } else if (!extra && fun(cyY, cuU, cvV) < thres) { \ su += U; \ sv += V; \ cn++; \ @@ -210,7 +210,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) s->thres_u = s->threshold_u * (1 << (s->depth - 8)); s->thres_v = s->threshold_v * (1 << (s->depth - 8)); - if (s->thres_y < 200.f || s->thres_u < 200.f || s->thres_v < 200.f) { + if (s->threshold_y < 200.f || s->threshold_u < 200.f || s->threshold_v < 200.f) { switch (s->distance) { case 0: s->filter_slice = s->depth <= 8 ? manhattan_e_slice8 : manhattan_e_slice16; |