[FFmpeg-cvslog] avfilter/vf_chromanr: compare correct variables for advanced mode
Paul B Mahol
git at videolan.org
Fri Dec 1 22:23:56 EET 2023
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Dec 1 21:11:57 2023 +0100| [db7b8382376e6b49cfc44583036759be59156f22] | committer: Paul B Mahol
avfilter/vf_chromanr: compare correct variables for advanced mode
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=db7b8382376e6b49cfc44583036759be59156f22
---
libavfilter/vf_chromanr.c | 4 ++--
1 file 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;
More information about the ffmpeg-cvslog
mailing list