Jun Zhao
e282b7ed7b
lavf/showinfo: use error level when get invalid sidedata
...
Use error level when get invalid sidedata, and remove a unnecessary
newline in error message.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
5 years ago
Jun Zhao
6f6769f3ec
lavf/showinfo: support mastering display sidedata
...
support mastering display sidedata.
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
5 years ago
Linjie Fu
af3ddd581f
lavf/vf_vpp_qsv: add support for QSV transpose filter
...
Add transpose support for qsv_vpp with rotate and hflip:
- rotate: [0, 3] support clockwise rotation of 0, 90, 180, 270;
- hflip: [0, 1] support horizontal flip;
Configure with:
{"cclock_hflip","clock","cclock","clock_hflip","reversal","hflip","vflip"}
CMD:
ffmpeg -hwaccel qsv -c:v h264_qsv -i input.h264
-vf 'format=qsv,vpp_qsv=transpose=clock' -c:v h264_qsv output.h264
ffmpeg -init_hw_device qsv=hw -filter_hw_device hw -c:v h264_qsv -i input.h264
-vf 'hwupload=extra_hw_frames=64,format=qsv,vpp_qsv=transpose=cclock_hflip'
-f rawvideo -pix_fmt nv12 ./transpose.yuv
Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Zhong Li <zhong.li@intel.com>
5 years ago
Ruiling Song
98e419cbf5
avfilter/vf_convolution: add x86 SIMD for filter_3x3()
...
Tested using a simple command (apply edge enhance):
./ffmpeg_g -i ~/Downloads/bbb_sunflower_1080p_30fps_normal.mp4 \
-vf convolution="0 0 0 -1 1 0 0 0 0:0 0 0 -1 1 0 0 0 0:0 0 0 -1 1 0 0 0 0:0 0 0 -1 1 0 0 0 0:5:1:1:1:0:128:128:128" \
-an -vframes 1000 -f null /dev/null
The fps increase from 151 to 270 on my local machine.
Signed-off-by: Ruiling Song <ruiling.song@intel.com>
5 years ago
Andriy Gelman
f60b1211b2
lavfi/zmq: Avoid mem copy past the end of input buffer
5 years ago
Rodger Combs
a0c1970781
lavfi/vf_thumbnail_cuda: fix operator precedence bug
...
Discovered via a warning when building with clang
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
5 years ago
Guo, Yejun
ccbab41039
dnn: convert tf.pad to native model in python script, and load/execute it in the c code.
...
since tf.pad is enabled, the conv2d(valid) changes back to its original behavior.
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
5 years ago
Guo, Yejun
df8db34552
dnn: add layer pad which is equivalent to tf.pad
...
the reason to add this layer first is that vf_sr uses it in its
tensorflow model, and the next plan is to update the python script
to convert tf.pad into native model.
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
5 years ago
Gyan Doshi
43891ea8ab
avfilter/fade: don't allow nb_frames == 0
...
In filter init, there's a division by nb_frames but value isn't checked.
5 years ago
Mark Thompson
20fed2f0ab
lavfi: addroi filter
...
This can be used to add region of interest side data to video frames.
5 years ago
Guo, Yejun
1b9064e3f4
libavfilter/dnn: move dnn files from libavfilter to libavfilter/dnn
...
it is expected that there will be more files to support native mode,
so put all the dnn codes under libavfilter/dnn
The main change of this patch is to move the file location, see below:
modified: libavfilter/Makefile
new file: libavfilter/dnn/Makefile
renamed: libavfilter/dnn_backend_native.c -> libavfilter/dnn/dnn_backend_native.c
renamed: libavfilter/dnn_backend_native.h -> libavfilter/dnn/dnn_backend_native.h
renamed: libavfilter/dnn_backend_tf.c -> libavfilter/dnn/dnn_backend_tf.c
renamed: libavfilter/dnn_backend_tf.h -> libavfilter/dnn/dnn_backend_tf.h
renamed: libavfilter/dnn_interface.c -> libavfilter/dnn/dnn_interface.c
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
5 years ago
Paul B Mahol
73afea3ccc
avfilter/af_dynaudnorm: add more descriptive aliases for options
5 years ago
Paul B Mahol
3883c9d147
avfilter/vf_ciescope: add DCI-P3
5 years ago
Limin Wang
b696caba1a
avformat/f_select: add support for more pixel formats for scene change score calculations
...
This avoids automatic conversions to rgb if scene change score is used in the expression.
Below is the tested results for the new added pixel format without autoscale to rgb24:
1. AV_PIX_FMT_YUVJ420P
time ./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f lavfi \
"sws_flags=+accurate_rnd+bitexact;movie=../fate-suite/svq3/Vertical400kbit.sorenson3.mov,select=gt(scene\,.25)"
master:
pkt_pts=1620|tag:lavfi.scene_score=1.000000
pkt_pts=4140|tag:lavfi.scene_score=0.875036
pkt_pts=5800|tag:lavfi.scene_score=1.000000
pkt_pts=6720|tag:lavfi.scene_score=0.461625
pkt_pts=8160|tag:lavfi.scene_score=1.000000
pkt_pts=9760|tag:lavfi.scene_score=1.000000
pkt_pts=14080|tag:lavfi.scene_score=0.838916
pkt_pts=15700|tag:lavfi.scene_score=1.000000
pkt_pts=18500|tag:lavfi.scene_score=0.474948
pkt_pts=20040|tag:lavfi.scene_score=0.379700
pkt_pts=21760|tag:lavfi.scene_score=1.000000
./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f 0.71s user 0.01s system 99% cpu 0.721 total
patch applied:
pkt_pts=1620|tag:lavfi.scene_score=1.000000
pkt_pts=4140|tag:lavfi.scene_score=0.668643
pkt_pts=5800|tag:lavfi.scene_score=0.996721
pkt_pts=6720|tag:lavfi.scene_score=0.357390
pkt_pts=8160|tag:lavfi.scene_score=0.886268
pkt_pts=9760|tag:lavfi.scene_score=0.926219
pkt_pts=14080|tag:lavfi.scene_score=0.650033
pkt_pts=15700|tag:lavfi.scene_score=1.000000
pkt_pts=18500|tag:lavfi.scene_score=0.316402
pkt_pts=20040|tag:lavfi.scene_score=0.269509
pkt_pts=21760|tag:lavfi.scene_score=1.000000
./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f 0.19s user 0.01s system 81% cpu 0.240 total
2. AV_PIX_FMT_YUV420P
time ./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f lavfi \
"sws_flags=+accurate_rnd+bitexact;movie=../Passengers_Breakfast_1080-sdr.mkv,select=gt(scene\,.2)"
master:
pkt_pts=3587|tag:lavfi.scene_score=0.462364
pkt_pts=4838|tag:lavfi.scene_score=0.419519
pkt_pts=6548|tag:lavfi.scene_score=0.397027
pkt_pts=9968|tag:lavfi.scene_score=0.419245
pkt_pts=12471|tag:lavfi.scene_score=0.413084
pkt_pts=16225|tag:lavfi.scene_score=0.506370
pkt_pts=19645|tag:lavfi.scene_score=0.507538
pkt_pts=22314|tag:lavfi.scene_score=0.504319
pkt_pts=24817|tag:lavfi.scene_score=0.417544
pkt_pts=25651|tag:lavfi.scene_score=0.413916
pkt_pts=26652|tag:lavfi.scene_score=0.487707
18.58s user 0.07s system 99% cpu 18.663 total
patch applied:
pkt_pts=3587|tag:lavfi.scene_score=0.272173
pkt_pts=4838|tag:lavfi.scene_score=0.247841
pkt_pts=6548|tag:lavfi.scene_score=0.233134
pkt_pts=9968|tag:lavfi.scene_score=0.247253
pkt_pts=12471|tag:lavfi.scene_score=0.244129
pkt_pts=16225|tag:lavfi.scene_score=0.302531
pkt_pts=19645|tag:lavfi.scene_score=0.303560
pkt_pts=22314|tag:lavfi.scene_score=0.301861
pkt_pts=24817|tag:lavfi.scene_score=0.249331
pkt_pts=25651|tag:lavfi.scene_score=0.247096
pkt_pts=26652|tag:lavfi.scene_score=0.287728
10.90s user 0.06s system 99% cpu 10.967 total
3. AV_PIX_FMT_YUV422P
time ./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f lavfi \
"sws_flags=+accurate_rnd+bitexact;movie=../Passengers_Breakfast_1080-sdr.mkv,format=yuv422p,select=gt(scene\,.2)"
master:
patched applied:
pkt_pts=3587|tag:lavfi.scene_score=0.224017
pkt_pts=4838|tag:lavfi.scene_score=0.204225
pkt_pts=9968|tag:lavfi.scene_score=0.204636
pkt_pts=12471|tag:lavfi.scene_score=0.202772
pkt_pts=16225|tag:lavfi.scene_score=0.248765
pkt_pts=19645|tag:lavfi.scene_score=0.250144
pkt_pts=22314|tag:lavfi.scene_score=0.248802
pkt_pts=24817|tag:lavfi.scene_score=0.208362
pkt_pts=25651|tag:lavfi.scene_score=0.205777
pkt_pts=26652|tag:lavfi.scene_score=0.230742
4. AV_PIX_FMT_YUV420P10
time ./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f lavfi \
"sws_flags=+accurate_rnd+bitexact;movie=../Passengers_Breakfast_4k.mkv,select=gt(scene\,.2)"
master:
pkt_pts=3587|tag:lavfi.scene_score=0.269890
pkt_pts=4838|tag:lavfi.scene_score=0.248957
pkt_pts=6548|tag:lavfi.scene_score=0.234619
pkt_pts=9969|tag:lavfi.scene_score=0.224912
pkt_pts=12471|tag:lavfi.scene_score=0.225158
pkt_pts=16225|tag:lavfi.scene_score=0.289809
pkt_pts=19645|tag:lavfi.scene_score=0.285013
pkt_pts=22314|tag:lavfi.scene_score=0.280295
pkt_pts=24817|tag:lavfi.scene_score=0.206486
pkt_pts=25651|tag:lavfi.scene_score=0.208556
pkt_pts=26652|tag:lavfi.scene_score=0.249577
./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f 76.03s user 0.22s system 99% cpu 1:16.27 total
patch applied
pkt_pts=3587|tag:lavfi.scene_score=0.269890
pkt_pts=4838|tag:lavfi.scene_score=0.248957
pkt_pts=6548|tag:lavfi.scene_score=0.234619
pkt_pts=9969|tag:lavfi.scene_score=0.224912
pkt_pts=12471|tag:lavfi.scene_score=0.225158
pkt_pts=16225|tag:lavfi.scene_score=0.289809
pkt_pts=19645|tag:lavfi.scene_score=0.285013
pkt_pts=22314|tag:lavfi.scene_score=0.280295
pkt_pts=24817|tag:lavfi.scene_score=0.206486
pkt_pts=25651|tag:lavfi.scene_score=0.208556
pkt_pts=26652|tag:lavfi.scene_score=0.249577
./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f 50.27s user 0.20s system 99% cpu 50.476 total
5. AV_PIX_FMT_RGBA, AV_PIX_FMT_ABGR, AV_PIX_FMT_BGRA, AV_PIX_FMT_GRAY8
are tested by format= with the fate sample: Vertical400kbit.sorenson3.mov like below:
time ./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f lavfi \
"sws_flags=+accurate_rnd+bitexact;movie=../fate-suite/svq3/Vertical400kbit.sorenson3.mov,format=rgba,select=gt(scene\,.25)"
patch applied:
pkt_pts=1620|tag:lavfi.scene_score=1.000000
pkt_pts=4140|tag:lavfi.scene_score=0.656277
pkt_pts=5800|tag:lavfi.scene_score=1.000000
pkt_pts=6720|tag:lavfi.scene_score=0.346218
pkt_pts=8160|tag:lavfi.scene_score=0.987686
pkt_pts=9760|tag:lavfi.scene_score=1.000000
pkt_pts=14080|tag:lavfi.scene_score=0.629187
pkt_pts=15700|tag:lavfi.scene_score=1.000000
pkt_pts=18500|tag:lavfi.scene_score=0.356211
pkt_pts=20040|tag:lavfi.scene_score=0.284775
pkt_pts=21760|tag:lavfi.scene_score=1.000000
6. AV_PIX_FMT_YUVJ422P
time ./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f lavfi \
"sws_flags=+accurate_rnd+bitexact;movie=../fate-suite/svq3/Vertical400kbit.sorenson3.mov,format=yuvj422p,select=gt(scene\,.25)"
patch applied:
pkt_pts=1620|tag:lavfi.scene_score=0.838281
pkt_pts=4140|tag:lavfi.scene_score=0.541382
pkt_pts=5800|tag:lavfi.scene_score=0.780588
pkt_pts=6720|tag:lavfi.scene_score=0.298274
pkt_pts=8160|tag:lavfi.scene_score=0.699106
pkt_pts=9760|tag:lavfi.scene_score=0.730136
pkt_pts=14080|tag:lavfi.scene_score=0.537742
pkt_pts=15700|tag:lavfi.scene_score=0.811946
pkt_pts=18500|tag:lavfi.scene_score=0.263382
pkt_pts=21760|tag:lavfi.scene_score=0.880773
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
5 years ago
Limin Wang
53462cea2f
avformat/f_select: support scenecut with more pixel formats
...
This patch does not make other pixel formats usable yet to make sure the test
result is the same with rgb32 format.
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
5 years ago
Michael Niedermayer
80bb65fafa
Bump minor versions again on master to keep 4.2 versions separate from master
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years ago
Michael Niedermayer
22db337a40
Bump minor versions to separate 4.2 from master
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years ago
Jun Zhao
7eec3d22fc
lavfi/showinfo: support regions of interest sidedata
...
support regions of interest sidedata
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
5 years ago
Paul B Mahol
97698b15a2
avfilter/vf_hysteresis: use time_base from framesync
...
Fixes non-monotonous timestamps.
5 years ago
Paul B Mahol
54fc8d370e
avfilter/vf_remap: add option to control output format
5 years ago
Paul B Mahol
be822eb6f8
avfilter/vf_remap: use time_base from framesync
...
Fixes non-monotonous timestamps.
5 years ago
Paul B Mahol
077bf9058f
avfilter/vf_displace: use time_base from framesync
...
Fixes non-monotonous timestamps.
5 years ago
Paul B Mahol
6882427841
avfilter/vf_midequalizer: always use framesync timestamps
5 years ago
Paul B Mahol
74236f675e
avfilter/vf_maskedmerge: always use framesync timestamps
5 years ago
Paul B Mahol
3d78ad43f7
avfilter/vf_threshold: use time_base from framesync
...
Fixes non-monotonous timestamps.
5 years ago
Paul B Mahol
37e69b40df
avfilter/vf_blend: add 9bit support
5 years ago
Paul B Mahol
80dacbedba
avfilter/af_aiir: calculate group delay too
5 years ago
Paul B Mahol
60e6db2f5b
avfilter/af_aiir: do not ignore k option for audio filtering
...
Previously it was used only for displaying frequency response.
5 years ago
Paul B Mahol
74d4fd0822
avfilter/avf_showfreqs: make selecting window size simpler
...
The previous solution was very bad.
5 years ago
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.
5 years ago
Paul B Mahol
9e78c73d86
avfilter/vf_readeia608: implement lowpass operation prior to processing lines
5 years ago
Paul B Mahol
dc481105a1
avfilter/vf_tinterlace: re-enable lowpass option
5 years ago
Paul B Mahol
2a801e8856
avfilter/af_aiir: implement mix option
5 years ago
Paul B Mahol
034a9d2507
avfilter/af_biquads: clip gain picked from command to sane values
5 years ago
Paul B Mahol
7b2d39fc27
avfilter/af_biquads: implement mix option to all filters
5 years ago
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 .
5 years ago
Paul B Mahol
b9a6106842
avfilter/af_afftfilt: remove invalid scaling
5 years ago
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>
5 years ago
Paul B Mahol
0f39ef4db2
avfilter/vf_lut: fix regression with >8bit planar filtering
5 years ago
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>
5 years ago
Paul B Mahol
1ac643f066
avfilter/vf_lut2: use time_base from framesync
...
Fixes non-monotonous timestamps.
5 years ago
Paul B Mahol
cc5c636780
avfilter/vf_midequalizer: use time_base from framesync
...
Fixes non-monotonous timestamps.
5 years ago
Paul B Mahol
d49d7d238f
avfilter/vf_blend: use time_base from framesync
...
Fixes non-monotonous timestamps.
5 years ago
Paul B Mahol
d71dafb2ab
avfilter/vf_maskedclamp: use time_base from framesync
...
Fixes non-monotonous timestamps.
5 years ago
Paul B Mahol
8a0636a93b
avfilter/vf_maskedmerge: use time_base from framesync
...
Fixes non-monotonous timestamps.
5 years ago
Paul B Mahol
93a73df54d
avfilter/af_deesser: remove extra ;
5 years ago
Paul B Mahol
bd5e92ef8a
avfilter: add deesser audio filter
5 years ago
Paul B Mahol
1b262004d3
avfilter/af_silenceremove: use input timestamp for timestamp recalculation
5 years ago
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>
5 years ago
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>
5 years ago