avfilter/vf_atadenoise: do not abort if user specified invalid size
Update documentation with new size default. Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
@@ -5247,7 +5247,7 @@ Threshold A is designed to react on abrupt changes in the input signal and
|
|||||||
threshold B is designed to react on continuous changes in the input signal.
|
threshold B is designed to react on continuous changes in the input signal.
|
||||||
|
|
||||||
@item s
|
@item s
|
||||||
Set number of frames filter will use for averaging. Default is 33. Must be odd
|
Set number of frames filter will use for averaging. Default is 9. Must be odd
|
||||||
number in range [5, 129].
|
number in range [5, 129].
|
||||||
|
|
||||||
@item p
|
@item p
|
||||||
|
|||||||
@@ -112,8 +112,8 @@ static av_cold int init(AVFilterContext *ctx)
|
|||||||
ATADenoiseContext *s = ctx->priv;
|
ATADenoiseContext *s = ctx->priv;
|
||||||
|
|
||||||
if (!(s->size & 1)) {
|
if (!(s->size & 1)) {
|
||||||
av_log(ctx, AV_LOG_ERROR, "size %d is invalid. Must be an odd value.\n", s->size);
|
av_log(ctx, AV_LOG_WARNING, "size %d is invalid. Must be an odd value, setting it to %d.\n", s->size, s->size|1);
|
||||||
return AVERROR(EINVAL);
|
s->size |= 1;
|
||||||
}
|
}
|
||||||
s->mid = s->size / 2 + 1;
|
s->mid = s->size / 2 + 1;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user