Nicolas George
183ce55b0d
lavfi: split frame_count between input and output.
AVFilterLink.frame_count is supposed to count the number of frames
that were passed on the link, but with min_samples, that number is
not always the same for the source and destination filters.
With the addition of a FIFO on the link, the difference will become
more significant.
Split the variable in two: frame_count_in counts the number of
frames that entered the link, frame_count_out counts the number
of frames that were sent to the destination filter.
8 years ago
Paul B Mahol
4d7d74802d
avfilter/vf_crop: make possible to do exact cropping for subsampled videos
8 years ago
Ganesh Ajjanagadde
2a486869d9
lavfi/vf_crop: replace round by lrint
lrint is at least as fast, avoids an implicit cast, and uses a superior
rounding mode.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
9 years ago
Ganesh Ajjanagadde
6aaac24d72
avfilter/all: propagate errors of functions from avfilter/formats
Many of the functions from avfilter/formats can return errors, usually AVERROR(ENOMEM).
This propagates the return values.
All of these were found by using av_warn_unused_result, demonstrating its utility.
Tested with FATE. I am least sure of the changes to avfilter/filtergraph,
since I don't know what/how reduce_format is intended to behave and how it should
react to errors.
Fixes: CID 1325680, 1325679, 1325678.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Previous version Reviewed-by: Nicolas George <george@nsup.org>
Previous version Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
9 years ago
Clément Bœsch
fa83b55161
avfilter/crop: use AV_OPT_TYPE_BOOL for keep_aspect option
9 years ago
Bernd Bleßmann
d2b78fe6b7
libavfilter/vf_crop: implement process_command
Signed-off-by: Bernd Bleßmann <bb@it-entwicklung.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 years ago
Vittorio Giovara
1a3eb042c7
Replace av_dlog with normal av_log at trace level
This applies to every library where performance is not critical.
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
Michael Niedermayer
f3fdc32e2f
avfilter/crop: Avoid using non public AV_PIX_FMT_NB
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Vittorio Giovara
58400ac133
lavfi: name anonymous structs
11 years ago
Anton Khirnov
cd43ca0443
lavfi: do not export the filters from shared objects
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
Paul B Mahol
b077d8d908
avfilter: remove redundant .get_(audio/video)_buffer initializations
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Paul B Mahol
253e155251
lavfi/crop: support more pixel formats
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Anton Khirnov
6592cd22a2
vf_crop: make config_props work properly when called multiple times.
Do not leak the x/y expressions.
12 years ago
Anton Khirnov
671563d9fd
vf_crop: cosmetics, break lines
12 years ago
Anton Khirnov
7f83959598
vf_crop: use the name 's' for the pointer to the private context
This is shorter and consistent across filters.
12 years ago
Diego Biurrun
2832ea26f3
Remove commented-out debug #define cruft
12 years ago
Anton Khirnov
e6c4ac7b5f
pixdesc: rename PIX_FMT_* flags to AV_PIX_FMT_FLAG_*
12 years ago
Clément Bœsch
b8a5c76131
lavfi: add frame counter into AVFilterLink and use it in filters.
12 years ago
Stefano Sabatini
9fa3b5b8a8
lavfi/crop: log pos in debug message
12 years ago
Stefano Sabatini
1d86fe6970
lavfi/crop: restore pos constant, and fix "t" variable misplacement in variable array
Fix evaluation of expressions containing the t variable.
12 years ago
Paul B Mahol
10b1cc63c2
lavfi: remove double .priv_class initializers
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Anton Khirnov
fba0156af7
vf_crop: switch to an AVOptions-based system.
12 years ago
Nicolas George
6202cf5dd8
lavfi/vf_crop: use standard options parsing.
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
fd6b6efbd2
lavfi/crop: fix help message for the keep_aspect option
12 years ago
Stefano Sabatini
94877aad57
lavfi/crop: free x and y parsed expression objects
Fix leak introduced in 1e5492ffe6
.
12 years ago
Stefano Sabatini
1e5492ffe6
lavfi/crop: add support to option parsing
Also fix documentation accordingly.
12 years ago
Anton Khirnov
71f82c3805
vf_crop: switch to filter_frame
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>
13 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Martin Storsjö
1d9c2dc89a
Don't include common.h from avutil.h
Signed-off-by: Martin Storsjö <martin@martin.st>
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.
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
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
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
803391f719
lavfi: remove request/poll and drawing functions from public API on next bump
They are only useful inside filters and we don't allow user filters for
now.
13 years ago
Anton Khirnov
b74a1da49d
lavfi: make formats API private on next bump.
It is only useful inside filters and we don't allow user filters for
now.
13 years ago
Anton Khirnov
c04c533f62
lavfi: remove avfilter_null_* from public API on next bump.
Those functions are only useful inside filters. It is better to not
support user filters until the API is more stable.
13 years ago
Stefano Sabatini
d9f26a0d71
lavfi/crop: show input and output sample aspect ratio in the log
13 years ago
Baptiste Coudurier
f49cb8e669
vf_crop: keepaspect support
13 years ago
Alex Converse
b0f29db5c2
Mark mutable static data const where appropriate.
13 years ago