mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-20 22:41:11 +00:00
avfilter/vf_chromanr: compare correct variables for advanced mode
This commit is contained in:
parent
fa0470347e
commit
db7b838237
@ -158,7 +158,7 @@ static int distance ## _slice##name(AVFilterContext *ctx, void *arg,
|
|||||||
su += U; \
|
su += U; \
|
||||||
sv += V; \
|
sv += V; \
|
||||||
cn++; \
|
cn++; \
|
||||||
} else if (fun(cyY, cuU, cvV) < thres) { \
|
} else if (!extra && fun(cyY, cuU, cvV) < thres) { \
|
||||||
su += U; \
|
su += U; \
|
||||||
sv += V; \
|
sv += V; \
|
||||||
cn++; \
|
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_u = s->threshold_u * (1 << (s->depth - 8));
|
||||||
s->thres_v = s->threshold_v * (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) {
|
switch (s->distance) {
|
||||||
case 0:
|
case 0:
|
||||||
s->filter_slice = s->depth <= 8 ? manhattan_e_slice8 : manhattan_e_slice16;
|
s->filter_slice = s->depth <= 8 ? manhattan_e_slice8 : manhattan_e_slice16;
|
||||||
|
Loading…
Reference in New Issue
Block a user