[FFmpeg-devel] [PATCH] avfilter: add bm3d filter
Paul B Mahol
onemda at gmail.com
Fri Sep 7 20:27:50 EEST 2018
On 5/13/18, Paul B Mahol <onemda at gmail.com> wrote:
> On 5/13/18, Michael Niedermayer <michael at niedermayer.cc> wrote:
>> On Sat, May 12, 2018 at 09:04:44AM +0200, Paul B Mahol wrote:
>>> On 5/12/18, Michael Niedermayer <michael at niedermayer.cc> wrote:
>>> > On Fri, May 11, 2018 at 04:03:07PM +0200, Paul B Mahol wrote:
>>> >> Signed-off-by: Paul B Mahol <onemda at gmail.com>
>>> >> ---
>>> >> libavfilter/Makefile | 1 +
>>> >> libavfilter/allfilters.c | 1 +
>>> >> libavfilter/vf_bm3d.c | 1002
>>> >> ++++++++++++++++++++++++++++++++++++++++++++++
>>> >> 3 files changed, 1004 insertions(+)
>>> >> create mode 100644 libavfilter/vf_bm3d.c
>>> > [...]
>>> >> +static void block_matching_multi(BM3DContext *s, const uint8_t *ref,
>>> >> int
>>> >> ref_linesize, int y, int x,
>>> >> + int exclude_cur_pos, int plane)
>>> >> +{
>>> >> + const int width = s->planewidth[plane];
>>> >> + const int height = s->planeheight[plane];
>>> >> + const int block_size = s->block_size;
>>> >> + const int step = s->bm_step;
>>> >> + const int range = s->bm_range / step * step;
>>> >> + int l = search_boundary(0, range, step, 0, y, x);
>>> >> + int r = search_boundary(width - block_size, range, step, 0, y,
>>> >> x);
>>> >> + int t = search_boundary(0, range, step, 1, y, x);
>>> >> + int b = search_boundary(height - block_size, range, step, 1, y,
>>> >> x);
>>> >> + int j, i, index = 0;
>>> >> +
>>> >> + PosCode search_pos[((r - l) / step + 1) * ((b - t) / step + 1)];
>>> >
>>> > fails to build here:
>>> >
>>> > src/libavfilter/vf_bm3d.c: In function `block_matching_multi':
>>> > src/libavfilter/vf_bm3d.c:308:5: error: variable length array
>>> > `search_pos'
>>> > is used [-Werror=vla]
>>> > PosCode search_pos[((r - l) / step + 1) * ((b - t) / step + 1)];
>>> > ^
>>>
>>> Come on! Your compiler still live under the rock, doesn't it?
>>
>> It lives under the -Werror=vla flag added by configure
>> I wonder why your compiler ignores it
>
> I removed VLA in lastest patch if you hadn't noticed.
>
Will apply.
More information about the ffmpeg-devel
mailing list