Paul B Mahol
9cd62b2ca4
avfilter/vf_pad: revert part of 57c3670896
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Ricardo Constantino
57c3670896
vf_pad: center image on padded area if negative x/y
or if x/y go beyond padded area.
This is mostly useful when paired with the aspect option.
Defaults aren't changed.
Idea for this was taken from mpv's soon-to-be-removed expand vf.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Paul B Mahol
7e59393d40
avfilter/vf_pad: add aspect option
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Michael Niedermayer
3d8a8fd27e
avfilter/vf_pad: Fix segfault if reconfiguration fails
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
ffc3337e0b
avfilter/vf_pad: Add eval=frame support
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Diego Biurrun
0f40c90984
Drop pointless assert.h #includes
9 years ago
Andrey Turkin
149b1f7cca
avfilter/vf_pad: fix direct padding
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
John Stebbins
2ec112f71c
vf_pad: fix x, y option expression evaluation
Calculation of x an y based on width and height did not work when
width == 0 or height == 0. "0" substitutes the input width and
height, but did so too late for x, y expression evaluation.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Anton Khirnov
3735b5c616
Revert "lavfi: always check av_expr_parse_and_eval() return value"
This reverts commit 63be97ec40
.
All those calls were unchecked on purpose, as explained in the comments
in the code.
10 years ago
Paul B Mahol
a0854c084e
avfilter: handle error in query_formats() in bunch of filters
Signed-off-by: Paul B Mahol <onemda@gmail.com>
10 years ago
Vittorio Giovara
63be97ec40
lavfi: always check av_expr_parse_and_eval() return value
CC: libav-stable@libav.org
Bug-Id: CID 703624
10 years ago
Vittorio Giovara
58400ac133
lavfi: name anonymous structs
11 years ago
Michael Niedermayer
0cc5011f9a
avfilter/vf_pad: fix req_end
Fixes out of array accesses
Fixes Ticket3190
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
cd43ca0443
lavfi: do not export the filters from shared objects
11 years ago
Michael Niedermayer
4bc7a2a64b
avfilter: remove duplicate includes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Paul B Mahol
59d72f8b16
lavfi/pad,crop,scale: remove options description from filter description
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Paul B Mahol
b211607b5c
avfilter: various cosmetics
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Michael Niedermayer
e43a0a232d
avfilter: fix plane validity checks
Fixes out of array accesses
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Paul B Mahol
d2dd1e075c
lavfi/pad: use FFSIGN
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
85e8a1169c
lavfi/pad: switch to AV_OPT_TYPE_COLOR
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Anton Khirnov
3062ac4c47
vf_pad: use the name 's' for the pointer to the private context
This is shorter and consistent across filters.
12 years ago
Anton Khirnov
d69a4177b9
lavfi: remove now unused args parameter from AVFilter.init
Conflicts:
libavfilter/avfilter.c
libavfilter/vf_drawtext.c
libavfilter/vf_lut.c
libavfilter/vf_select.c
libavfilter/vf_setpts.c
libavfilter/vsrc_color.c
libavfilter/vsrc_movie.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
c43a7ecad9
lavfi: remove now unused args parameter from AVFilter.init
12 years ago
Anton Khirnov
40c885c589
vf_pad: switch to an AVOptions-based system.
12 years ago
Nicolas George
392ec7ec1c
lavfi/vf_pad: use standard options parsing.
12 years ago
Clément Bœsch
c10b57973d
lavfi/pad: fix horizontal/vertical shift confusion.
12 years ago
Xi Wang
5d639b2b4a
vf_pad: fix a & instead of && typo
Avoid buffer overflow in buffer_needs_copy()
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Xi Wang
969e8d35b5
lavfi/pad: avoid buffer overflow in buffer_needs_copy()
Replace & with short-circuit &&.
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
12 years ago
Anton Khirnov
7e350379f8
lavfi: switch to AVFrame.
Deprecate AVFilterBuffer/AVFilterBufferRef and everything related to it
and use AVFrame instead.
12 years ago
Stefano Sabatini
1897109c00
lavfi/pad: add support to named options
12 years ago
Michael Niedermayer
6be0df5080
vf_pad: switch to filter_frame
Based on patch by Anton Khirnov
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
565e4993c6
lavfi: merge start_frame/draw_slice/end_frame
Any alleged performance benefits gained from the split are purely
mythological and do not justify added code complexity.
12 years ago
Anton Khirnov
59ee9f78b0
lavfi: do not use av_pix_fmt_descriptors directly.
12 years ago
Mans Rullgard
568c70e79e
lavfi: convert input/ouput list compound literals to named objects
A number of compilers, for example those from TI and IBM, choke on
these initialisers. The current style is also quite ugly.
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Anton Khirnov
ba04177eeb
vf_pad/scale: use double precision for aspect ratios.
Fixes Bug 203.
CC:libav-stable@libav.org
12 years ago
Martin Storsjö
1d9c2dc89a
Don't include common.h from avutil.h
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Anton Khirnov
8f3a3ce730
lavfi: check all ff_get_video_buffer() calls for errors.
13 years ago
Anton Khirnov
d4f89906e3
lavfi: add error handling to end_frame().
13 years ago
Anton Khirnov
e9b992d035
lavfi: add error handling to draw_slice().
13 years ago
Anton Khirnov
ebc8d97481
lavfi: add error handling to start_frame().
13 years ago
Ronald S. Bultje
3db407038e
lavfi: use const for AVFilterPad declarations in all filters.
12 years ago
Anton Khirnov
4c9080a7ef
lavfi: unref AVFilterLink.out_buf in ff_end_frame().
This reduces code duplication and prevents stale pointers from remaining
on the link.
13 years ago
Anton Khirnov
07bad27810
lavfi: unref AVFilterLink.cur_buf in ff_end_frame().
This reduces code duplication and prevents stale pointers from remaining
on the link.
13 years ago
Anton Khirnov
f493c644cd
vf_pad: don't give up its own reference to the output buffer.
13 years ago
Anton Khirnov
1a49a169eb
lavfi: make filters less verbose.
13 years ago
Anton Khirnov
a5e8c41c28
lavfi: remove 'opaque' parameter from AVFilter.init()
It is not used in any filters currently and is inherently evil. If
passing binary data to filters is required in the future, it should be
done with some AVOptions-based system.
13 years ago
Michael Niedermayer
46c50b1726
vf_pad: check that we have write permission before writing in the buffer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
9d0bfc5052
lavfi: make AVFilterPad opaque after two major bumps.
It will allow adding new fields to it without ABI breaks.
13 years ago
Anton Khirnov
6d58358a3a
lavfi: make avfilter_get_video_buffer() private on next bump.
They are only useful inside filters and we don't allow user filters for
now.
13 years ago