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 | if (detection > 0) | 199 | if (detection > 0) |
| 200 | state[5] = fmax(state[5], detect); | 200 | state[5] = fmax(state[5], detect); |
| 201 | 201 | ||
| 202 | if (direction == 0 && mode == 0 && detect < threshold) | 202 | if (direction == 0) { |
| 203 | detect = 1. / av_clipd(1. + makeup + (threshold - detect) * ratio, 1., range); | 203 | if (detect < threshold) { |
| 204 | else if (direction == 0 && mode == 1 && detect < threshold) | 204 | if (mode == 0) |
| 205 | detect = av_clipd(1. + makeup + (threshold - detect) * ratio, 1., range); | 205 | detect = 1. / av_clipd(1. + makeup + (threshold - detect) * ratio, 1., range); |
| 206 | else if (direction == 1 && mode == 0 && detect > threshold) | 206 | else |
| 207 | detect = 1. / av_clipd(1. + makeup + (detect - threshold) * ratio, 1., range); | 207 | detect = av_clipd(1. + makeup + (threshold - detect) * ratio, 1., range); |
| 208 | else if (direction == 1 && mode == 1 && detect > threshold) | 208 | } else { |
| 209 | detect = av_clipd(1. + makeup + (detect - threshold) * ratio, 1., range); | 209 | detect = 1.; |
| 210 | else | 210 | } |
| 211 | detect = 1.; | 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 | if (direction == 0) { | 222 | if (direction == 0) { |
| 214 | if (detect > state[4]) { | 223 | if (detect > state[4]) { |