Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -199,16 +199,25 @@ static int filter_channels(AVFilterContext *ctx, void *arg, int jobnr, int nb_jo · 198 unmodified lines | ||
| 199 | 199 | if (detection > 0) |
| 200 | 200 | state[5] = fmax(state[5], detect); |
| 201 | 201 | |
| 202 | − if (direction == 0 && mode == 0 && detect < threshold) | |
| 203 | − detect = 1. / av_clipd(1. + makeup + (threshold - detect) * ratio, 1., range); | |
| 204 | − else if (direction == 0 && mode == 1 && detect < threshold) | |
| 205 | − detect = av_clipd(1. + makeup + (threshold - detect) * ratio, 1., range); | |
| 206 | − else if (direction == 1 && mode == 0 && detect > threshold) | |
| 207 | − detect = 1. / av_clipd(1. + makeup + (detect - threshold) * ratio, 1., range); | |
| 208 | − else if (direction == 1 && mode == 1 && detect > threshold) | |
| 209 | − detect = av_clipd(1. + makeup + (detect - threshold) * ratio, 1., range); | |
| 210 | − else | |
| 211 | − detect = 1.; | |
| 202 | + if (direction == 0) { | |
| 203 | + if (detect < threshold) { | |
| 204 | + if (mode == 0) | |
| 205 | + detect = 1. / av_clipd(1. + makeup + (threshold - detect) * ratio, 1., range); | |
| 206 | + else | |
| 207 | + detect = av_clipd(1. + makeup + (threshold - detect) * ratio, 1., range); | |
| 208 | + } else { | |
| 209 | + detect = 1.; | |
| 210 | + } | |
| 211 | + } else { | |
| 212 | + if (detect > threshold) { | |
| 213 | + if (mode == 0) | |
| 214 | + detect = 1. / av_clipd(1. + makeup + (detect - threshold) * ratio, 1., range); | |
| 215 | + else | |
| 216 | + detect = av_clipd(1. + makeup + (detect - threshold) * ratio, 1., range); | |
| 217 | + } else { | |
| 218 | + detect = 1.; | |
| 219 | + } | |
| 220 | + } | |
| 212 | 221 | |
| 213 | 222 | if (direction == 0) { |
| 214 | 223 | if (detect > state[4]) { |