Commit Graph

7573 Commits

Author SHA1 Message Date
Paul B Mahol
97698b15a2 avfilter/vf_hysteresis: use time_base from framesync
Fixes non-monotonous timestamps.
2019-07-14 19:14:10 +02:00
Paul B Mahol
54fc8d370e avfilter/vf_remap: add option to control output format 2019-07-14 18:20:18 +02:00
Paul B Mahol
be822eb6f8 avfilter/vf_remap: use time_base from framesync
Fixes non-monotonous timestamps.
2019-07-14 18:20:18 +02:00
Paul B Mahol
077bf9058f avfilter/vf_displace: use time_base from framesync
Fixes non-monotonous timestamps.
2019-07-14 18:20:18 +02:00
Paul B Mahol
6882427841 avfilter/vf_midequalizer: always use framesync timestamps 2019-07-14 17:45:42 +02:00
Paul B Mahol
74236f675e avfilter/vf_maskedmerge: always use framesync timestamps 2019-07-14 17:38:26 +02:00
Paul B Mahol
3d78ad43f7 avfilter/vf_threshold: use time_base from framesync
Fixes non-monotonous timestamps.
2019-07-14 17:28:04 +02:00
Paul B Mahol
37e69b40df avfilter/vf_blend: add 9bit support 2019-07-14 17:00:58 +02:00
Paul B Mahol
80dacbedba avfilter/af_aiir: calculate group delay too 2019-07-13 15:45:06 +02:00
Paul B Mahol
60e6db2f5b avfilter/af_aiir: do not ignore k option for audio filtering
Previously it was used only for displaying frequency response.
2019-07-13 12:29:52 +02:00
Paul B Mahol
74d4fd0822 avfilter/avf_showfreqs: make selecting window size simpler
The previous solution was very bad.
2019-07-10 16:03:34 +02:00
Paul B Mahol
57a2688fe3 avfilter/af_afftfilt: make selecting window size simpler
Next step after this one will be adding support for more window sizes.
2019-07-10 15:57:38 +02:00
Paul B Mahol
9e78c73d86 avfilter/vf_readeia608: implement lowpass operation prior to processing lines 2019-07-08 19:21:59 +02:00
Paul B Mahol
dc481105a1 avfilter/vf_tinterlace: re-enable lowpass option 2019-07-08 17:57:31 +02:00
Paul B Mahol
2a801e8856 avfilter/af_aiir: implement mix option 2019-07-08 16:48:10 +02:00
Paul B Mahol
034a9d2507 avfilter/af_biquads: clip gain picked from command to sane values 2019-07-08 16:29:15 +02:00
Paul B Mahol
7b2d39fc27 avfilter/af_biquads: implement mix option to all filters 2019-07-08 16:20:57 +02:00
Calvin Walton
2bd21b9609 vf_drawtext: Add pkt_pos, pkt_duration, pkt_size as variables
Changes to vf_drawtext.c written by
Calvin Walton <calvin.walton@kepstin.ca>

Changes to filters.texi written by
greg Luce <electron.rotoscope@gmail.com>
with lots of help from Moritz Barsnick and Gyan

Fixes #7947.
2019-07-07 11:12:07 +05:30
Paul B Mahol
b9a6106842 avfilter/af_afftfilt: remove invalid scaling 2019-07-06 12:01:38 +02:00
Jun Zhao
3ed0b3f6f7 lavfi/scale: Add sub-options for in_color_matrix/out_color_matrix
Add sub-options for in_color_matrix/out_color_matrix

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-07-06 13:12:13 +08:00
Paul B Mahol
0f39ef4db2 avfilter/vf_lut: fix regression with >8bit planar filtering 2019-07-05 12:55:02 +02:00
Yonglin Luo
664a27ea40 libavfilter/vf_colorspace.c: fix demarcation point of gamma linearize function
The linearize function (usually refered to EOTF) is the inverse of
delinearize function (usually referred to OETF). Demarcation point of
EOTF should be beta*delta, but the actual value used now in the source
code is beta.

For ITU Rec.709, they are 0.081 (0.018*4.5) and 0.018 respectively
(beta = 0.018 and delta = 4.5), and they correspond to pixel value 5
and 21 for an 8-bit image. Linearized result of pixel within that range
(5-21) will be different, but this commit will make linearize function
of the filter more accurate in the mathematical sense.

Signed-off-by: Yonglin Luo <vincenluo@tencent.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2019-07-03 13:57:11 -04:00
Paul B Mahol
1ac643f066 avfilter/vf_lut2: use time_base from framesync
Fixes non-monotonous timestamps.
2019-07-03 14:54:05 +02:00
Paul B Mahol
cc5c636780 avfilter/vf_midequalizer: use time_base from framesync
Fixes non-monotonous timestamps.
2019-07-03 14:54:05 +02:00
Paul B Mahol
d49d7d238f avfilter/vf_blend: use time_base from framesync
Fixes non-monotonous timestamps.
2019-07-03 14:54:05 +02:00
Paul B Mahol
d71dafb2ab avfilter/vf_maskedclamp: use time_base from framesync
Fixes non-monotonous timestamps.
2019-07-03 14:54:05 +02:00
Paul B Mahol
8a0636a93b avfilter/vf_maskedmerge: use time_base from framesync
Fixes non-monotonous timestamps.
2019-07-03 14:54:05 +02:00
Paul B Mahol
93a73df54d avfilter/af_deesser: remove extra ; 2019-07-03 08:53:35 +02:00
Paul B Mahol
bd5e92ef8a avfilter: add deesser audio filter 2019-07-02 19:02:54 +02:00
Paul B Mahol
1b262004d3 avfilter/af_silenceremove: use input timestamp for timestamp recalculation 2019-07-02 19:01:42 +02:00
Zhong Li
dd662bbdd2 lavf/qsv_scale: add scaling modes support
low_power mode will use a fixed HW engine (SFC), thus can offload EU usage.
high quality mode will take EU usage (AVS sampler).

Performance and EU usage (Render usage) comparsion on Intel(R) Xeon(R) CPU E3-1225 v5 @ 3.30GHz:

High quality mode : ffmpeg -hwaccel qsv -c:v h264_qsv -i bbb_sunflower_1080p_30fps_normal_2000frames.h264 \
-vf scale_qsv=w=1280:h=736:mode=hq -f null -
fps=389
RENDER usage: 28.10 (provided by MSDK metrics_monitor)

Low Power mode: ffmpeg -hwaccel qsv -c:v h264_qsv -i ~/bbb_sunflower_1080p_30fps_normal_2000frames.h264 \
-vf scale_qsv=w=1280:h=736:mode=low_power -f null -
fps=343
RENDER usage: 0.00

Low power mode (SFC) may be disabled if not supported by
MSDK/Driver/HW, and replaced by AVS mode interanlly.

Signed-off-by: Zhong Li <zhong.li@intel.com>
2019-06-25 11:33:12 +08:00
Jun Zhao
ebcf4d354f lavfi/af_asetnsamples: Remove the redundant condition check
Redundant condition: '!A || B' is equivalent to '!A || (A && B)' but
more clearly.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-06-18 23:27:07 +08:00
Limin Wang
c9c1711f49 libavfilter/vf_blend.c: remove duplicate code with macro-defined function
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2019-06-14 13:37:45 +02:00
Limin Wang
24321b8751 libavfilter/vf_blend.c: remove duplicate code with same function
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2019-06-14 13:37:35 +02:00
Zhong Li
4208b428c4 lavf/qsv_vpp: add frame format option
1. Currently output format is hard-coded as NV12, thus means
   CSC is always done for not NV12 input such as P010.
   Follow original input format as default output.
2. Add an option to specify output format.

Signed-off-by: Zhong Li <zhong.li@intel.com>
2019-06-14 10:27:33 +08:00
James Almer
b8f1542dcb avfilter/vf_gblur: add missing preprocessor check
Fixes compilation on x86_32

Signed-off-by: James Almer <jamrial@gmail.com>
2019-06-12 10:54:59 -03:00
Ruiling Song
83f9da7768 avfilter/vf_gblur: add x86 SIMD optimizations
The horizontal pass get ~2x performance with the patch
under single thread.

Tested overall performance using the command(avx2 enabled):
./ffmpeg -i 1080p.mp4 -vf gblur -f null /dev/null
./ffmpeg -i 1080p.mp4 -vf gblur=threads=1 -f null /dev/null
For single thread, the fps improves from 43 to 60, about 40%.
For multi-thread, the fps improves from 110 to 130, about 20%.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2019-06-12 08:53:11 +08:00
Limin Wang
5fc8d87ba6 libavfilter/vf_cover_rect.c: free the allocated frame
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-11 23:53:26 +02:00
Paul B Mahol
80e68ce116 avfilter/vf_normalize: fix filtering of RGB0 formats 2019-06-10 23:11:57 +02:00
Zhong Li
e62f625163 lavf/qsvvpp: add P010 output format support
Signed-off-by: Zhong Li <zhong.li@intel.com>
2019-06-10 13:48:41 +08:00
Zhong Li
ef56c28b25 lavf/qsvvpp: add extra_hw_frames support
extra_hw_frames is needed for some cases.
(eg: qsv decoding + qsv vpp + qsv look_ahead encoding, transcoding
 failed if no extra_hw_frames supported:
 ffmpeg -hwaccel qsv -c:v h264_qsv -i bbb_sunflower_1080p_30fps_normal_2000frames.mp4 \
-vf vpp_qsv=w=1280:h=720:extra_hw_frames=100 -v verbose  -c:v h264_qsv \
-look_ahead 1 -look_ahead_depth 100 out1.mp4
)

Signed-off-by: Zhong Li <zhong.li@intel.com>
2019-06-10 13:48:06 +08:00
Paul B Mahol
a9bf656577 avfilter/vf_lut2: add slice threading 2019-06-09 14:07:00 +02:00
Mark Thompson
a53f9fde45 lavfi/vaapi: Fix build with libva 2.1 and 2.2
While the VAProcColorProperties structure was added in libva 2.1, the
colour primaries/transfer/space fields were not added until libva 2.3.
2019-06-07 21:15:29 +01:00
Xuewei Meng
78e1d7f421 libavfilter: Add derain filter
Remove the rain in the input image/video by applying the derain
methods based on convolutional neural networks. Training scripts
as well as scripts for model generation are provided in the
repository at https://github.com/XueweiMeng/derain_filter.git.

Signed-off-by: Xuewei Meng <xwmeng96@gmail.com>
2019-06-06 13:59:43 +08:00
Gyan Doshi
3be4490014 avfilter/framesync: fix shortest with eof_action=pass
Shifted check of shortest to after repeatlast,
to ensure shortest=1 is always honoured.
2019-06-06 10:19:14 +05:30
Paul B Mahol
d3f236b300 avilter/avf_showwaves: switch to activate in showwaves filter 2019-06-04 09:28:07 +02:00
Paul B Mahol
97ddc5d1f7 avfilter/af_anlmdn: add support for commands 2019-06-03 14:20:19 +02:00
Jun Zhao
0b7bfa8ad7 lavf/sr: Refine the coding style for init
We perfer the coding style like:

/* some stuff */
if (error) {
    /* error handling */
    return -(errorcode);
}
/* normal actions */
do_something()

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-06-03 13:04:23 +08:00
Jun Zhao
5c1fbc4239 lavf/sr: Don't need to check NULL before sws_freeContext
sws_freeContext have check the NULL pointer, so don't need to check
NULL before sws_freeContext.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-06-03 13:04:23 +08:00
Jun Zhao
51b0e81216 lavf/sr: Dump input pixel format in error message
Dump input pixel format in error message, it's will help to debugging

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-06-03 13:04:23 +08:00