Michael Niedermayer
1d08e4b584
yadif: fix slice sizes
This more evenly distributes the load between threads
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
221f902f1d
avfilter/vf_yadif: fix race condition
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
cb79881b49
vf_yadif: support slice threading
12 years ago
Clément Bœsch
b8a9876a8b
lavfi/yadif: add timeline support.
12 years ago
Clément Bœsch
f3962c6264
lavfi/yadif: fix chroma subsampling with odd sizes.
12 years ago
James Darnley
d10499a32a
yadif: correct strides in filter_edges_16bit
The C code treats the data as arrays of uint16_t so strides must not
be in bytes but in pixels.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years ago
James Darnley
b0ef0ae776
yadif: restore speed of the C filtering code
Always use the special filter for the first and last 3 columns (only).
Changes made in 64ed397
slowed the filter to just under 3/4 of what it
was. This commit restores the speed while maintaining identical output.
For reference, on my Athlon64:
1733222 decicycles in old
2358563 decicycles in new
1727558 decicycles in this
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years ago
Anton Khirnov
7536c67104
vf_yadif: switch to an AVOptions-based system.
12 years ago
Nicolas George
2753d4ebf0
lavfi/vf_yadif: use standard options parsing.
12 years ago
James Darnley
7976d92dac
yadif: cosmetic indentation from previous commits
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
James Darnley
17e7b49501
yadif: x86 assembly for 16-bit samples
This is a fairly dumb copy of the assembly for 8-bit samples but it
works and produces identical output to the C version. The options have
been tested on an Athlon64 and a Core2Quad.
Athlon64:
1810385 decicycles in C, 32726 runs, 42 skips
1080744 decicycles in mmx, 32744 runs, 24 skips, 1.7x faster
818315 decicycles in sse2, 32735 runs, 33 skips, 2.2x faster
Core2Quad:
924025 decicycles in C, 32750 runs, 18 skips
623995 decicycles in mmx, 32767 runs, 1 skips, 1.5x faster
406223 decicycles in sse2, 32764 runs, 4 skips, 2.3x faster
387842 decicycles in ssse3, 32767 runs, 1 skips, 2.4x faster
307726 decicycles in sse4, 32763 runs, 5 skips, 3.0x faster
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
James Darnley
3d751b1ef6
yadif: correct strides in filter_edges_16bit
The C code treats the data as arrays of uint16_t so strides must not
be in bytes but in pixels.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
James Darnley
0735b50880
yadif: restore speed of the C filtering code
Always use the special filter for the first and last 3 columns (only).
Changes made in 64ed397
slowed the filter to just under 3/4 of what it
was. This commit restores the speed while maintaining identical output.
For reference, on my Athlon64:
1733222 decicycles in old
2358563 decicycles in new
1727558 decicycles in this
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Clément Bœsch
96e4b00d62
lavfi: remove remaining forgotten min/rej perms.
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
Michael Niedermayer
b4bb996d6f
yadif: remove unused variable
Found by: durandal_1707
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
James Darnley
87d359ff8f
lavfi/yadif: support 9, 12, and 14 bits per pixel
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
James Darnley
724061888b
lavfi/yadif: remove unnecessary cast
Finish what 99162f8
started
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
64ed397635
vf_yadif: fix out-of line reads
Some changes in the border pixels, visually indistinguishable.
12 years ago
Anton Khirnov
ccd70d9c16
vf_yadif: factorize initializing the filtering callbacks
Do it all in config_props().
12 years ago
Anton Khirnov
99162f8d46
vf_yadif: silence a warning.
clang says:
libavfilter/vf_yadif.c:192:28: warning: incompatible pointer types assigning to
'void (*)(uint8_t *, uint8_t *, uint8_t *, uint8_t *, int, int, int, int, int)'
from 'void (uint16_t *, uint16_t *, uint16_t *, uint16_t *, int, int, int, int, int)'
12 years ago
André Pankratz
0287eea914
lavfi/yadif: fix shorthand/option mismatch
Fix trac ticket #2128 .
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
12 years ago
Stefano Sabatini
cb8d3965fd
lavfi/yadif: add support to named constants
12 years ago
Stefano Sabatini
f7dc6aa6b1
lavfi/yadif: add support to named options and options introspection
Also rename the "enable_auto" field to "deint", to match the name of the
option.
12 years ago
Stefano Sabatini
8674597fe5
lavfi/yadif: remove redundant NULL checks in uninit
12 years ago
Stefano Sabatini
4ea7c17932
lavfi/yadif: fail during the configuration stage in case of invalid video size
This is better than repeatedly failing during the filtering stage.
12 years ago
Stefano Sabatini
b52c1d0c99
lavfi/yadif: remove unused poll_frame callback
12 years ago
Anton Khirnov
5f648ce43e
vf_yadif: switch to filter_frame, this filter did not support slices
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
Diego Biurrun
f6c38c5f4e
avfilter: call x86 init functions under if (ARCH_X86), not if (HAVE_MMX)
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
Luca Barbato
28165fee1b
yadif: cosmetics
12 years ago
Michael Niedermayer
8cc77646c0
yadif: remove unused variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Nicolas George
9341bbfc51
vf_yadif: fix permissions.
Require AV_PERM_PRESERVE and leave harmless permissions
alone for the next filter.
12 years ago
Michael Niedermayer
a0d15027e3
yadif: check input video size.
yadif needs at least 3x3 or it will likely crash with out of array reads
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
8f29901b54
yadif: remove get_video_buffer, its redundant now
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
2f7e8dcf45
yadif: redesign first and last 2 lines handling.
The previous code dependent on the input buffer matching the
buffer that has been provided by yadifs get_buffer.
The API does in now way gurantee this though its often true.
This fixes some out of array reads.
The regression test checksums change due to "out of picture" values
being initialized differently.
There should be no visual difference in the filters output
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
3161958455
yadif: update frame rate
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
b5c8aa745e
vf_yadif: unset cur_buf on the input link.
The buffer is stored internally, so this prevents it from being unreffed
automatically.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
13 years ago
Anton Khirnov
8f3a3ce730
lavfi: check all ff_get_video_buffer() calls for errors.
13 years ago
Anton Khirnov
1dc4205018
lavfi: check all avfilter_ref_buffer() calls for errors.
13 years ago
Anton Khirnov
02ac7311c8
lavfi: use avfilter_unref_bufferp() where appropriate.
13 years ago
Anton Khirnov
3825b52688
lavfi: check all ff_start_frame/draw_slice/end_frame 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
731fa116b4
yadif: use emms_c() instead of inline assembly for emms invocations.
13 years ago
Ronald S. Bultje
3db407038e
lavfi: use const for AVFilterPad declarations in all filters.
13 years ago