avfilter/af_arls: improve documentation and extend option

pull/389/head
Paul B Mahol 2 years ago
parent 159f8b8d71
commit f09280dfc4
  1. 7
      doc/filters.texi
  2. 3
      libavfilter/af_arls.c

@ -3004,10 +3004,13 @@ Pass the 1st input.
Pass the 2nd input.
@item o
Pass filtered samples.
Pass difference between desired, 2nd input and error signal estimate.
@item n
Pass difference between desired and filtered samples.
Pass difference between input, 1st input and error signal estimate.
@item e
Pass error signal estimated samples.
Default value is @var{o}.
@end table

@ -33,6 +33,7 @@ enum OutModes {
DESIRED_MODE,
OUT_MODE,
NOISE_MODE,
ERROR_MODE,
NB_OMODES
};
@ -70,6 +71,7 @@ static const AVOption arls_options[] = {
{ "d", "desired", 0, AV_OPT_TYPE_CONST, {.i64=DESIRED_MODE}, 0, 0, AT, "mode" },
{ "o", "output", 0, AV_OPT_TYPE_CONST, {.i64=OUT_MODE}, 0, 0, AT, "mode" },
{ "n", "noise", 0, AV_OPT_TYPE_CONST, {.i64=NOISE_MODE}, 0, 0, AT, "mode" },
{ "e", "error", 0, AV_OPT_TYPE_CONST, {.i64=ERROR_MODE}, 0, 0, AT, "mode" },
{ NULL }
};
@ -156,6 +158,7 @@ static float process_sample(AudioRLSContext *s, float input, float desired, int
case DESIRED_MODE: output = desired; break;
case OUT_MODE: output = desired - output; break;
case NOISE_MODE: output = input - output; break;
case ERROR_MODE: break;
}
return output;
}

Loading…
Cancel
Save