[FFmpeg-cvslog] avfilter/af_afir: increase max partition size

Paul B Mahol git at videolan.org
Sun Dec 25 21:38:06 EET 2022


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Dec 25 10:21:47 2022 +0100| [8906145cdf62f20c0006ae9457ce0b95451e304c] | committer: Paul B Mahol

avfilter/af_afir: increase max partition size

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8906145cdf62f20c0006ae9457ce0b95451e304c
---

 doc/filters.texi      | 4 ++--
 libavfilter/af_afir.c | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index ceab0ea0f8..9b866de5ae 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -1752,12 +1752,12 @@ Set video stream frame rate. This option is used only when @var{response} is ena
 
 @item minp
 Set minimal partition size used for convolution. Default is @var{8192}.
-Allowed range is from @var{1} to @var{32768}.
+Allowed range is from @var{1} to @var{65536}.
 Lower values decreases latency at cost of higher CPU usage.
 
 @item maxp
 Set maximal partition size used for convolution. Default is @var{8192}.
-Allowed range is from @var{8} to @var{32768}.
+Allowed range is from @var{8} to @var{65536}.
 Lower values may increase CPU usage.
 
 @item nbirs
diff --git a/libavfilter/af_afir.c b/libavfilter/af_afir.c
index f9c18f1c23..3fd641bf44 100644
--- a/libavfilter/af_afir.c
+++ b/libavfilter/af_afir.c
@@ -170,7 +170,7 @@ static int init_segment(AVFilterContext *ctx, AudioFIRSegment *seg,
     if (!seg->tx || !seg->ctx || !seg->itx)
         return AVERROR(ENOMEM);
 
-    seg->fft_length    = part_size * 2 + 2;
+    seg->fft_length    = (part_size + 1) * 2;
     seg->part_size     = part_size;
     seg->block_size    = FFALIGN(seg->fft_length, cpu_align);
     seg->coeff_size    = FFALIGN(seg->part_size + 1, cpu_align);
@@ -677,8 +677,8 @@ static const AVOption afir_options[] = {
     { "channel", "set IR channel to display frequency response", OFFSET(ir_channel), AV_OPT_TYPE_INT, {.i64=0}, 0, 1024, VF },
     { "size",   "set video size",    OFFSET(w),          AV_OPT_TYPE_IMAGE_SIZE, {.str = "hd720"}, 0, 0, VF },
     { "rate",   "set video rate",    OFFSET(frame_rate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, INT32_MAX, VF },
-    { "minp",   "set min partition size", OFFSET(minp),  AV_OPT_TYPE_INT,   {.i64=8192}, 1, 32768, AF },
-    { "maxp",   "set max partition size", OFFSET(maxp),  AV_OPT_TYPE_INT,   {.i64=8192}, 8, 32768, AF },
+    { "minp",   "set min partition size", OFFSET(minp),  AV_OPT_TYPE_INT,   {.i64=8192}, 1, 65536, AF },
+    { "maxp",   "set max partition size", OFFSET(maxp),  AV_OPT_TYPE_INT,   {.i64=8192}, 8, 65536, AF },
     { "nbirs",  "set number of input IRs",OFFSET(nb_irs),AV_OPT_TYPE_INT,   {.i64=1},    1,    32, AF },
     { "ir",     "select IR",              OFFSET(selir), AV_OPT_TYPE_INT,   {.i64=0},    0,    31, AFR },
     { "precision", "set processing precision",    OFFSET(precision), AV_OPT_TYPE_INT,   {.i64=0}, 0, 2, AF, "precision" },



More information about the ffmpeg-cvslog mailing list