Commit Graph

7968 Commits

Author SHA1 Message Date
Paul B Mahol
d0189f8d97 avfilter/vsrc_sierpinski: add triangle type 2019-10-03 14:21:39 +02:00
Paul B Mahol
22f3b6286e avfilter: add av_cold where it is missing 2019-10-03 12:09:07 +02:00
Paul B Mahol
8ca89e52df avfilter/f_streamselect: fix memleaks of pad names 2019-10-03 11:23:23 +02:00
Paul B Mahol
d492907e78 avfilter/af_amix: fix filtering if specified weights are negative 2019-10-03 10:27:56 +02:00
Paul B Mahol
2a546fb7d5 avfilter/setpts: switch to activate
Also properly handle EOF timestamps.
Fixes #6833.
2019-10-02 21:05:25 +02:00
Paul B Mahol
9847380f5f avfilter/vf_elbg: stop leaking frame on error 2019-10-02 10:54:45 +02:00
Carl Eugen Hoyos
7ffa458d60 lavfi/movie: Use filter thread count for decoding threads.
Fixes ticket #7542.
2019-10-01 21:54:53 +02:00
Paul B Mahol
1b2ed0c392 avfilter/vf_drawbox: implement process_command 2019-10-01 20:28:11 +02:00
Paul B Mahol
027a53dc49 avfilter/vf_drawbox: reduce code duplication 2019-10-01 20:28:11 +02:00
Paul B Mahol
3bb170e530 avfilter/f_streamselect: add check case when nothing is done
Fixes #7955.
2019-10-01 18:46:20 +02:00
Paul B Mahol
f66458cfc7 avfilter/vsink_nullsink: cosmetics 2019-10-01 14:57:41 +02:00
Paul B Mahol
94b155e49b avfilter/copy: add forgotten check 2019-10-01 14:55:43 +02:00
Paul B Mahol
9cee8975c3 avfilter/asink_anullsink: cosmetics 2019-10-01 14:38:58 +02:00
Paul B Mahol
a9500441a7 avfilter/vf_copy: check for error cases and handle them 2019-10-01 13:45:29 +02:00
Paul B Mahol
c9473229c9 avfilter/af_acopy: check for error cases and handle them 2019-10-01 13:42:18 +02:00
Paul B Mahol
835fdf48e5 avfilter/vf_showpalette: fix small cosmetics issue 2019-10-01 13:24:35 +02:00
Paul B Mahol
5868e7f562 avfilter/vf_alphamere: use the name 's' for the pointer to the private context
This is shorter and consistent across filters.
2019-10-01 13:17:43 +02:00
Paul B Mahol
056bc9393e avfilter/vf_photosensitivity: fix memleak 2019-09-30 20:37:25 +02:00
Vladimir Panteleev
c888adf590 libavfilter: add photosensitivity filter 2019-09-30 20:21:27 +02:00
Paul B Mahol
a746359ede avfilter: add scroll video filter 2019-09-30 19:37:37 +02:00
Paul B Mahol
5161b279d6 avfilter/af_join: cosmetics 2019-09-30 16:52:52 +02:00
Paul B Mahol
7851e2f368 avfilter/af_join: use av_asprintf() 2019-09-30 16:45:31 +02:00
Paul B Mahol
6e9e14e62e avfilter/split: use av_asprintf() 2019-09-30 16:39:39 +02:00
Paul B Mahol
8b36968ef4 avfilter/trim: drop all audio frames instead of asserting 2019-09-30 12:58:06 +02:00
Paul B Mahol
a6e2cf5eb0 avfilter/f_metadata: do not memleak expr 2019-09-30 12:24:06 +02:00
Paul B Mahol
9c9d5bf257 avfilter/f_metadata: add ends_with() function for comparing ends of strings 2019-09-30 12:14:34 +02:00
Paul B Mahol
947e8ab329 avfilter/fifo: use the name 's' for the pointer to the private context
This is shorter and consistent across filters.
2019-09-28 22:09:56 +02:00
Paul B Mahol
216830aca4 avfilter/fifo: cosmetics 2019-09-28 22:09:56 +02:00
Limin Wang
86f0411a52 avfilter/vf_framerate: remove duplicate code with macro-based function
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-09-28 21:53:55 +02:00
Limin Wang
fd5fdca953 avfilter/vf_framerate: refine the filter_slice code for better readiablity
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-09-28 20:20:28 +02:00
Limin Wang
b4e7d3a0db avfilter/vf_framerate: limit the scene level max range
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-09-28 20:06:43 +02:00
Andreas Rheinhardt
4294dc3589 avfilter/vf_xbr: Fix left shift of negative number
Affected every usage of vf_xbr, e.g. the FATE-tests filter-2xbr,
filter-3xbr, filter-4xbr.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-28 17:24:32 +02:00
Andreas Rheinhardt
fa21194326 avfilter/vf_hqx: Fix undefined left shifts of negative numbers
Affected every usage of this filter; in particular, it affected the
FATE-tests filter-2xbr, filter-3xbr and filter-4xbr.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-28 17:24:32 +02:00
Limin Wang
b9d479bac4 avfilter/vf_scale: cosmetics
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-27 10:58:30 +02:00
James Almer
1dbd3c6116 avfilter/vf_eq: fix compilation with x86 asm disabled
Signed-off-by: James Almer <jamrial@gmail.com>
2019-09-26 12:19:43 -03:00
Ting Fu
4f589d668e avfilter/x86/vf_eq: add SSE2 version
Signed-off-by: Ting Fu <ting.fu@intel.com>
2019-09-26 08:12:36 +08:00
Ting Fu
6aff2042d6 avfilter/x86/vf_eq: Change inline assembly into nasm code
Signed-off-by: Ting Fu <ting.fu@intel.com>
2019-09-26 08:11:13 +08:00
Ting Fu
9691e2a426 checkasm/vf_eq: add test for vf_eq
Signed-off-by: Ting Fu <ting.fu@intel.com>
Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2019-09-26 08:10:31 +08:00
Paul B Mahol
ced3b8c61e avfilter/vf_zoompan: fix leaks 2019-09-25 21:48:59 +02:00
Paul B Mahol
20242bc762 avfilter/vf_zoompan: forward status back from output to input 2019-09-25 21:37:26 +02:00
Paul B Mahol
631f7acc6c avfilter/vf_stack: add slice threading 2019-09-25 19:02:57 +02:00
Paul B Mahol
44095564d4 avfilter/vf_stack: simplify main processing path 2019-09-25 18:40:56 +02:00
Paul B Mahol
402dbd4633 avfilter/Makefile: fix case for sierpinski 2019-09-25 14:15:55 +02:00
Paul B Mahol
9c3e1c1937 avfilter: add sierpinski video source 2019-09-25 14:06:26 +02:00
Paul B Mahol
55b32584b8 avfilter/vf_premultiply: forward status back from output to all input links 2019-09-25 13:07:04 +02:00
Paul B Mahol
da9890f6c7 avfilter/vf_fieldmatch: forward status back from output to all input links
Fixes #8199.
2019-09-25 13:07:04 +02:00
Paul B Mahol
2962101e40 avfilter/vf_fieldmatch: fix more leaks 2019-09-25 13:06:30 +02:00
Paul B Mahol
0d05aa052c avfilter/vf_v360: add sinusoidal format 2019-09-25 13:06:30 +02:00
Paul B Mahol
a214c17414 avfilter/vf_v360: do not use mod where it is not needed 2019-09-24 11:28:11 +02:00
Paul B Mahol
eaf3c4b8bf avfilter/vf_v360: fix regression introduced in b342678bc4 2019-09-23 12:27:41 +02:00
Paul B Mahol
4ba45a95df avfilter/vf_v360: adjust h for mercator input/output 2019-09-22 22:34:13 +02:00
Paul B Mahol
043038ea56 avfilter/vf_v360: fix xyz_to_mercator() 2019-09-22 22:32:37 +02:00
Paul B Mahol
a8925d264a avfilter/vf_v360: fix mercator_to_xyz() 2019-09-22 22:32:37 +02:00
Paul B Mahol
b4d2bea647 avfilter/v360: reduce size of some struct members 2019-09-22 19:55:31 +02:00
Paul B Mahol
51a2f02117 avfilter/vf_v360: add fixed pixel padding options 2019-09-22 14:12:51 +02:00
Paul B Mahol
79d14a3cc8 avfilter/vf_v360: remove intermediate variables 2019-09-22 14:12:51 +02:00
Paul B Mahol
a1391cb942 avfilter/vf_v360: fix comparison with float value 2019-09-21 21:35:39 +02:00
Paul B Mahol
073d22696e avfilter/vf_v360: simplify xyz_to_dfisheye() calculations 2019-09-21 21:33:03 +02:00
Paul B Mahol
b342678bc4 avfilter/vf_v360: simplify dfisheye_to_xyz() calculations 2019-09-21 21:17:37 +02:00
Paul B Mahol
a46ee096d1 avfilter/avf_showfreqs: fix check for failed allocation 2019-09-21 19:09:29 +02:00
Paul B Mahol
34046bcd5f avfilter/vf_v360: simplify ball_to_xyz() calculations 2019-09-21 16:31:32 +02:00
Paul B Mahol
ecaef69fbb avfilter/vf_v360: simplify xyz_to_ball() calculations 2019-09-21 16:31:32 +02:00
Paul B Mahol
b8dfc108a2 avfilter/vf_v360: add hammer projection 2019-09-21 15:58:03 +02:00
Paul B Mahol
76f861bbb7 avfilter/vf_v360: use lrintf() in kernel 2019-09-21 11:00:28 +02:00
Paul B Mahol
de1d6cb34f avfilter/vf_v360: fix small artifacts between corners in EAC format 2019-09-21 10:31:59 +02:00
Paul B Mahol
8b58d9cb47 avfilter/vf_v360: remove uneeded array element 2019-09-20 21:41:12 +02:00
Paul B Mahol
5c93a0a1e4 avfilter/vf_v360: add support for mirroring to ball input format 2019-09-20 21:34:46 +02:00
Paul B Mahol
9def7efdbf avfilter/vf_v360: adjust kernel after latest change 2019-09-20 21:08:57 +02:00
Paul B Mahol
bc89434a0b avfilter/vf_v360: fix various artifacts with cubemaps 2019-09-20 21:08:57 +02:00
Paul B Mahol
048c712aa1 avfilter/vf_v360: improve description about s in comments 2019-09-20 21:08:57 +02:00
Guo, Yejun
8f13a557ca libavfilter/dnn: support multiple outputs for native mode
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-09-20 14:51:57 -03:00
Guo, Yejun
75ca94f3cf libavfilter/dnn/dnn_backend_native: find the input operand according to input name
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-09-20 14:51:50 -03:00
Guo, Yejun
b2683c66b2 libavfilter/dnn: add layer maximum for native mode.
The reason to add this layer is that it is used by srcnn in vf_sr.
This layer is currently ignored in native mode. After this patch,
we can add multiple outputs support for native mode.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-09-20 10:57:18 -03:00
Marton Balint
862e020f93 avfilter/dnn: fix inclusion guard in dnn/dnn_backend_native_layer_depth2space.h
Fixes fate-source failure.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-09-19 21:30:54 +02:00
Paul B Mahol
b632ad81c5 avfilter/vf_v360: add ball projection format 2019-09-19 18:38:06 +02:00
Guo, Yejun
48133fad05 libavfilter/dnn: separate depth_to_space layer from dnn_backend_native.c to a new file
the logic is that one layer in one separated source file to make
the source files simple for maintaining.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-09-19 11:25:15 -03:00
Guo, Yejun
5f058dd693 libavfilter/dnn: separate conv2d layer from dnn_backend_native.c to a new file
the logic is that one layer in one separated source file to make
the source files simple for maintaining.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-09-19 11:09:25 -03:00
Paul B Mahol
251284e44a avfilter/vf_v360: add mercator projection 2019-09-17 22:18:30 +02:00
Paul B Mahol
6f4ec4d909 avfilter/vf_v360: add slice threading to remap calculation 2019-09-16 18:43:11 +02:00
Paul B Mahol
05ffaa252e avfilter/vf_v360: refactor creation of remap data 2019-09-16 18:43:11 +02:00
Paul B Mahol
a09213da23 avfilter/vf_v360: reverse order of remap for loops 2019-09-16 18:03:16 +02:00
Paul B Mahol
cf62110a83 avfilter/vf_v360: simplify allocating remap data 2019-09-16 17:58:08 +02:00
Paul B Mahol
c271d88257 avfilter/vf_v360: move some local variables to private filter context 2019-09-16 17:53:58 +02:00
Paul B Mahol
d87db83e1c avfilter/vf_v360: rename r_tmp variables 2019-09-16 17:50:16 +02:00
Paul B Mahol
94f187d382 avfilter/vf_stereo3d: assert that out variable is valid 2019-09-16 11:45:28 +02:00
Paul B Mahol
34a12b9978 avfilter/vf_stereo3d: merge same code in case branches 2019-09-16 11:41:50 +02:00
Paul B Mahol
ea8391e519 avfilter/vf_shuffleplanes: remove not needed line 2019-09-16 11:28:03 +02:00
Paul B Mahol
f70690e8ec avfilter/vf_ciescope: remove dead assignments 2019-09-16 11:22:16 +02:00
Paul B Mahol
fa045c3ce2 avfilter/window_func: clarify intention in dolph window calculation 2019-09-16 10:57:09 +02:00
Paul B Mahol
654601dd1d avfilter/vf_v360: add missing av_assert0() 2019-09-16 10:40:47 +02:00
Paul B Mahol
7a7aa4f79e avfilter/vf_avgblur: remove dupe assignment 2019-09-16 10:31:05 +02:00
Paul B Mahol
dc33250765 avfilter/af_headphone: return on error immediately 2019-09-16 10:27:42 +02:00
Paul B Mahol
921eb21b1d avfilter/x86/vf_360: add most of >8 depth asm 2019-09-16 10:21:16 +02:00
Paul B Mahol
5a9560dfc6 avfilter/vf_stereo3d: add tb (top-bottom) aliases 2019-09-15 10:54:00 +02:00
Paul B Mahol
7f8f886344 avfilter/vf_v360: refactor dimensions and offsets calculations 2019-09-15 10:37:42 +02:00
Paul B Mahol
45bb80dccc avfilter/vf_v360: implement stereo 3D support 2019-09-14 19:35:13 +02:00
Paul B Mahol
451cee662c avfilter/vf_v360: reduce by one cosf call less 2019-09-14 17:40:46 +02:00
Paul B Mahol
2a672a93d2 avfilter/vf_v360: define variables in for loops consistently 2019-09-14 17:33:31 +02:00
Paul B Mahol
f78abca0c2 avfilter/vf_v360: call tanf() once 2019-09-14 13:33:24 +02:00
Paul B Mahol
cb8d6a4e3e avfilter/vf_v360: implement diagonal field of view 2019-09-14 10:47:01 +02:00
Paul B Mahol
ed4ad6e1ed avfilter/vf_v360: use always float version instead of double floating-point function 2019-09-13 12:32:35 +02:00
Paul B Mahol
2b3094d61d avfilter/vf_v360: fix flat projection field of view calculation 2019-09-13 11:31:11 +02:00
Paul B Mahol
e1dd355b3d avfilter/vf_v360: add dfisheye output 2019-09-12 20:07:26 +02:00
Paul B Mahol
24d4eea921 avfilter/vf_v360: fix setting default height for stereographic 2019-09-12 18:37:38 +02:00
Paul B Mahol
801fd6e410 avfilter/vf_v360: fix errors is comments 2019-09-12 18:37:38 +02:00
Paul B Mahol
b4562301ee avfilter/vf_v360: fix M_PI_4 usage consistency 2019-09-12 18:37:38 +02:00
Paul B Mahol
efc73b13ac avfilter/vf_v360: remove pointless special case when allocating stuff 2019-09-11 16:43:10 +02:00
Paul B Mahol
7ce7002664 avfilter/vf_v360: refactor FoV calculation for stereographic
Move in out of loop.
2019-09-11 16:25:21 +02:00
Paul B Mahol
783ea9c1c5 avfilter/vf_v360: extend max limit to vertical fov 2019-09-11 15:12:56 +02:00
Paul B Mahol
cb41c2af92 avfilter/vf_v360: really fix FoV selection
Big thanks to Michael Koch for providing actual formula.
2019-09-11 15:12:56 +02:00
Jun Zhao
944d76a3e0 lavfi/sinc: fix memory leak in error handling path
free work&pi_wraps in error handling path to avoid memory leak.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-09-11 10:36:34 +08:00
Jun Zhao
44b55a8c9c lavfi/anequalizer: fix memory leak in error handling path
free the pad.name in error handling path to avoid memory leak.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-09-11 10:36:34 +08:00
Paul B Mahol
0f0f5188ac avfilter/vf_v360: remove w/h changing for flat output
Fixes crashes with bigger h/v fov.
2019-09-11 00:37:02 +02:00
Paul B Mahol
f705dc9a74 avfilter/vf_v360: increase h_fov max limit 2019-09-11 00:37:02 +02:00
Paul B Mahol
ccaeabd092 avfilter/vf_v360: fix fov calculation for stereographic output 2019-09-11 00:37:02 +02:00
Paul B Mahol
5fcb3cbaf0 avfilter/vf_v360: increase v_fov max limit 2019-09-10 20:18:10 +02:00
Paul B Mahol
329505d908 avfilter/vf_v360: add support for stereographic as input projection 2019-09-10 18:58:51 +02:00
Nikolas Bowe
b794df43f3 avfilter/vf_fps: Avoid inlink fifo build up.
When duplicating frames we need to schedule for activation again, otherwise frames can build up in the inlink fifo.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-10 17:21:54 +02:00
Paul B Mahol
558265d4bc avfilter/vf_v360: add padding to u/v/ker
Fixes use of uninitialized variables.
2019-09-09 18:40:39 +02:00
Paul B Mahol
0c9e01011b avfilter/vf_v360: add guards against NaNs
Also normalize vector after rotation, it might be needed,
otherwise one can get NaNs.
2019-09-09 18:03:17 +02:00
Paul B Mahol
799c07e5c8 avfilter/vf_v360: partialy revert previous commit
roll/pitch can do exactly same thing.
2019-09-09 17:47:03 +02:00
Paul B Mahol
976617c7d2 avfilter/vf_v360: extend stereographic projection
Add option to change central point projection.
2019-09-09 14:17:22 +02:00
Paul B Mahol
7985430c70 avfilter/vf_v360: factor vector normalization out 2019-09-09 11:07:39 +02:00
Jun Zhao
a0abcb4a31 lavfi/concat: fix logic error in framerate check
fix logic error in framerate check, it's introduced by commit
3ad5d4df9c

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-09-09 16:03:17 +08:00
Paul B Mahol
973051e3bd avfilter/vf_v360: add stereographic output projection 2019-09-08 21:07:59 +02:00
Paul B Mahol
a13b61b7fd avfilter/vf_v360: disallow too low h_fov/v_fov 2019-09-08 21:07:59 +02:00
Calvin Walton
3ad5d4df9c lavfi/concat: allow to support inputs with different frame rates
Right now, the concat filter does not set the frame_rate value on any of
the out links. As a result, the default ffmpeg behaviour kicks in - to
copy the framerate from the first input to the outputs.

If a later input is higher framerate, this results in dropped frames; if
a later input is lower framerate it might cause judder.

This patch checks if all of the video inputs have the same framerate, and
if not it sets the out link to use '1/0' as the frame rate, the value
meaning "unknown/vfr".

A test is added to verify the VFR behaviour. The existing test for CFR
behaviour passes unchanged.
2019-09-08 16:48:28 +02:00
Paul B Mahol
85386c36e3 avfilter/vf_v360: add aliases for some projections 2019-09-08 10:52:35 +02:00
Limin Wang
cbc63d61b2 avfilter/vf_scale: split the scale_frame function from filter_frame for activate function support
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-08 02:15:46 +02:00
Paul B Mahol
5b12a47e08 avfilter/vf_v360: add options to h/w unflip input video 2019-09-07 22:36:28 +02:00
Paul B Mahol
a06d70350b avfilter/vf_v360: support transposed input/output 2019-09-07 22:09:17 +02:00
Limin Wang
ede15bf2e3 avfilter/vf_showinfo: display GOP timecode side data
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-06 22:06:12 +02:00
James Almer
4857688732 x86/vf_v360: use a faster horizontal add in remap4_8bit_line_avx2
Signed-off-by: James Almer <jamrial@gmail.com>
2019-09-06 12:11:46 -03:00
James Almer
2200cf1aca x86/vf_v360: make remap{1,2}_8bit_line_avx2 work on x86_32
Signed-off-by: James Almer <jamrial@gmail.com>
2019-09-06 11:11:45 -03:00
Paul B Mahol
cb8c353032 avfilter/vf_v360: add option to pick rotation order 2019-09-06 14:10:37 +02:00
Paul B Mahol
d131541445 avfilter/vf_v360: reduce allocations by reusing duplicated remaps 2019-09-06 14:10:37 +02:00
Paul B Mahol
058bbf48c6 avfilter/vf_v360: x86 SIMD for interpolations 2019-09-06 14:10:37 +02:00
Paul B Mahol
f0d8005ec5 avfilter/vf_v360: add asserts to guard against invalid conditions 2019-09-06 14:10:37 +02:00
Paul B Mahol
32dd429bc7 avfilter/vf_v360: stop using floats in interpolation 2019-09-06 14:10:37 +02:00
Paul B Mahol
28dfa1e371 avfilter/vf_v360: rewrite storing of remap positions and interpolations
In preparation of SIMD assembly.
2019-09-06 14:10:37 +02:00
Guo, Yejun
022f50d3fe libavfilter/dnn: add header into native model file
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-09-04 11:13:21 -03:00
Paul B Mahol
fbaa395917 avfilter/vf_v360: remove not needed items from ThreadData 2019-09-02 16:45:55 +02:00
Paul B Mahol
6b09030756 avfilter/vf_delogo: unbreak fate
It is not clear what was real intention of previous commit to this filter.
It was not working correctly, hopefully this is fixed now.
It never checked that new x/y/w/h are actually valid, hopeffully this is fixed now.
It uses named variables in expressions that are never set, still not fixed.
It does not set named variables that uses actual frame widht/height, making actual
expressions less usable for our users, still now fixed.
2019-09-02 16:17:46 +02:00
Paul B Mahol
e0fab59624 avfilter/vf_v360: set much smaller limit to w/h 2019-09-02 10:47:29 +02:00
Paul B Mahol
067e632349 avfilter/vf_v360: fix some small code style issues 2019-09-02 10:43:37 +02:00
Paul B Mahol
6037dfa47a avfilter/vf_v360: extend description of eac format 2019-09-02 10:36:45 +02:00
Paul B Mahol
30f4464e22 avfilter/vf_v360: rename fb format to barrel 2019-09-02 10:35:25 +02:00
Steven Liu
2183def1a5 avfilter/vf_delogo: support expr in delogo filter
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-09-02 13:35:32 +08:00
Raphaël Zumer
08dfd57fd8 avfilter: Support EBU Tech. 3213-E primaries values
Signed-off-by: Raphaël Zumer <rzumer@tebako.net>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-09-01 20:00:53 -03:00
Paul B Mahol
c79d6728a7 avfilter/vf_v360: add cubemap 1x6 layout 2019-08-31 14:52:32 +02:00
Paul B Mahol
62459d6584 avfilter/vf_stereo3d: improve dubois anaglyphs 2019-08-30 22:41:07 +02:00
Guo, Yejun
83e0b71f66 dnn: export operand info in python script and load in c code
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-08-30 11:41:30 -03:00
Guo, Yejun
2d5e39c13e dnn: change .model file format to put layer number at the end of file
currently, the layer number is at the beginning of the .model file,
so we have to scan twice in python script, the first scan to get the
layer number. Only one scan needed after put the layer number at the
end of .model file.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-08-30 11:41:30 -03:00
Guo, Yejun
09a455a246 dnn: introduce dnn operand (in c code) to hold operand infos within network
the info can be saved in dnn operand object without regenerating again and again,
and it is also needed for layer split/merge, and for memory reuse.

to make things step by step, this patch just focuses on c code,
the change within python script will be added later.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-08-30 11:41:30 -03:00
Eugene Lyapustin
20a12448aa avfilter/vf_v360: add facebook's format 2019-08-30 11:42:31 +02:00
Paul B Mahol
1232e67b16 avfilter/af_compand: change error condition into warning 2019-08-28 15:28:53 +02:00
Xuewei Meng
59da9dcd7e avfilter/vf_derain: reindent code after last commit
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-08-26 15:10:56 +08:00
Xuewei Meng
f0c97d613e libavfilter: Add dehaze-filter option in existing derain.
Add the support of dehaze filter in existing derain filter source
code. As the processing procedure in FFmpeg is the same for current
derain and dehaze, we reuse the derain filter source code. The
model training and generation scripts are in repo
https://github.com/XueweiMeng/derain_filter.git

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Xuewei Meng <xwmeng96@gmail.com>
2019-08-26 10:59:01 +08:00
Jarek Samic
b29c7bcbf6 lavfi: add deshake_opencl filter 2019-08-23 00:56:13 +01:00
Jarek Samic
5b5746b1e0 lavfi: modify avfilter_get_matrix to support separate scale factors 2019-08-22 23:11:27 +01:00
Jarek Samic
d3cd33ab1b lavfi: add utilities to reduce OpenCL boilerplate code 2019-08-22 23:11:25 +01:00
Paul B Mahol
aeae6283a9 avfilter/vf_v360: remove unused header 2019-08-21 12:53:33 +01:00
Paul B Mahol
a8ef41c1f5 avfilter/vf_v360: improve comments above headers 2019-08-21 12:53:33 +01:00
Zhong Li
74e6800381 lavfi/qsvvpp: disable pass through mode if format changed
Partly fix tiket#8065

Signed-off-by: Zhong Li <zhong.li@intel.com>
2019-08-20 14:11:26 +08:00
Zhong Li
d252d1c2e9 lavfi/scale_qsv: change alignment to be 16 bytes
32 bytes alignment is not needed and increases the failure possibilty of
SFC (low power scaling mode)

Signed-off-by: Zhong Li <zhong.li@intel.com>
2019-08-20 13:38:12 +08:00
Jun Zhao
1b0a8e48f1 lavfi/dnn/dnn_backend_native: fix memory leak in error path
fix memory leak in error path

Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-08-20 10:07:38 +08:00
Jun Zhao
f156f4ab23 lavfi/avfiltergraph: add check before free the format
ff_merge_samplerates will be deallocate a or b in some case, so
add a check before free the format.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-08-20 10:06:17 +08:00
Jun Zhao
df6876d691 lavfi/af_adeclick: fix double free after ff_filter_frame fail
ff_filter_frame fail will free the frame, so we just returen after this
function fail.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-08-20 10:05:03 +08:00
Guo, Yejun
67889d4715 libavfilter/dnn/dnn_backend_tf: add tf.pad support for tensorflow backend with native model.
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-08-19 11:37:16 -03:00
Guo, Yejun
29aeeb3e3e libavfilter/dnn/dnn_backend_tf: fix typo that variable uninitialized.
if it is initialized randomly, the tensorflow lib will report
error message such as:
Attempt to add output -7920 of depth_to_space4 not in range [0, 1) to node with type Identity

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-08-19 11:37:16 -03:00
Eugene Lyapustin
596ecc295f avfilter/vf_v360: add dual fisheye format
Signed-off-by: Eugene Lyapustin <unishifft@gmail.com>
2019-08-19 09:07:38 +01:00
Eugene Lyapustin
d044252aac avfilter/vf_v360: add padding option for cubemap
Signed-off-by: Eugene Lyapustin <unishifft@gmail.com>
2019-08-19 09:06:27 +01:00
Eugene Lyapustin
b26094e217 avfilter: add v360 filter
Signed-off-by: Eugene Lyapustin <unishifft@gmail.com>
2019-08-19 09:06:07 +01:00
Limin Wang
6866c54ee4 avfilter/showinfo: support Content Light Level information
show real information instead of the unknown side data type message for HDR10 stream

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-08-17 14:47:13 -03:00
Limin Wang
ad3ef00ce5 avfilter/f_select: yuv will use Y plane only for scenecut detect
At the moment scene change detection score uses all planes to detect scene
changes. In this regard this is similar how the frozen frames detection works.
However, in classic encoding scene change detection typically only uses the Y
plane.

We might get more resonable scores for scene change if we also use only
the Y plane for calculating the score if the pixel format is YUV. Although
this will require additional work once packed YUV formats are added,
because for the moment the generic scene sad score calculation has no way
to ignore some components in a packed format.

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-08-17 17:15:19 +02:00
Andreas Rheinhardt
8fcc5d963e avfilter/vf_convolution: Fix build failures
98e419cb added SIMD for the convolution filter for x64 systems. As
usual, it used a check of the form
if (ARCH_X86_64)
    ff_convolution_init_x86(s);
and thereby relied on the compiler eliminating this pseudo-runtime check
at compiletime for non x64 systems (for which ff_convolution_init_x86
isn't defined) to compile. But vf_convolution.c contains more than one
filter and if the convolution filter is disabled, but one of the other
filters (prewitt, sobel, roberts) is enabled, the build will fail on x64,
because ff_convolution_init_x86 isn't defined in this case.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2019-08-14 14:37:47 +08:00
Lars Kiesow
74d4bc0fa0 libavfilter/vf_scale: Ensure scaled video is divisible by n
This patch adds a new option to the scale filter which ensures that the
output resolution is divisible by the given integer when used together
with `force_original_aspect_ratio`. This works similar to using `-n` in
the `w` and `h` options.

This option respects the value set for `force_original_aspect_ratio`,
increasing or decreasing the resolution accordingly.

The use case for this is to set a fixed target resolution using `w` and
`h`, to use the `force_original_aspect_ratio` option to make sure that
the video always fits in the defined bounding box regardless of aspect
ratio, but to also make sure that the calculated output resolution is
divisible by n so in can be encoded with certain encoders/options if
that is required.

Signed-off-by: Lars Kiesow <lkiesow@uos.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-08-13 16:48:38 +02:00
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>
2019-08-08 17:57:25 +08:00
Jun Zhao
6f6769f3ec lavf/showinfo: support mastering display sidedata
support mastering display sidedata.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-08-08 17:57:12 +08:00
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>
2019-08-07 20:58:49 +08:00
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>
2019-08-07 14:31:28 +08:00
Andriy Gelman
f60b1211b2 lavfi/zmq: Avoid mem copy past the end of input buffer 2019-08-01 19:10:05 +02:00
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>
2019-07-30 15:17:22 +02:00
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>
2019-07-29 12:34:19 -03:00
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>
2019-07-29 12:34:19 -03:00
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.
2019-07-29 12:46:59 +05:30
Mark Thompson
20fed2f0ab lavfi: addroi filter
This can be used to add region of interest side data to video frames.
2019-07-28 22:34:33 +01:00
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>
2019-07-26 13:07:43 -03:00
Paul B Mahol
73afea3ccc avfilter/af_dynaudnorm: add more descriptive aliases for options 2019-07-24 15:20:47 +01:00
Paul B Mahol
3883c9d147 avfilter/vf_ciescope: add DCI-P3 2019-07-22 22:56:21 +01:00
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>
2019-07-22 22:54:51 +02:00
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>
2019-07-22 22:54:51 +02:00
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>
2019-07-21 18:36:31 +02:00
Michael Niedermayer
22db337a40 Bump minor versions to separate 4.2 from master
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-07-21 18:36:18 +02:00
Jun Zhao
7eec3d22fc lavfi/showinfo: support regions of interest sidedata
support regions of interest sidedata

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-07-21 10:05:27 +08:00
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
Zhong Li
165eabf19b lavf/qsv: use av_cold for init/uninit
Signed-off-by: Zhong Li <zhong.li@intel.com>
2019-06-03 05:39:06 +08:00
Ruiling Song
94ceeba9f9 avfilter/vf_unsharp: enable slice threading
benchmarking with a simple command:
ffmpeg -i 1080p.mp4 -vf unsharp=la=3:ca=3 -an -f null /dev/null
with the patch, the fps increase from 50 to 120 on my local machine (i7-6770HQ).

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2019-06-03 10:49:57 +08:00
Jun Zhao
bbad0bc5ff lavfi/lut: Add slice threading support
Used the command for 1080p h264 clip as follow:

a). ffmpeg -i input -vf lutyuv="u=128:v=128" -f null /dev/null
b). ffmpeg -i input -vf lutrgb="g=0:b=0" -f null /dev/null

after enabled the slice threading, the fps change from:

a). 144fps to 258fps (lutyuv)
b). 94fps  to 153fps (lutrgb)

in Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-06-03 09:38:28 +08:00
Jun Zhao
360bee8ca4 lavfi/colorlevels: Add slice threading support
Add slice threading support, use the command like:

./ffmpeg -i input -vf colorlevels -f null /dev/null

with 1080p h264 clip, the fps from 39 fps to 79 fps
in the local(Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz)

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-06-03 09:36:14 +08:00
Mark Thompson
ef2f89bbcc vf_scale_vaapi: Add options to configure output colour properties
The "out_color_matrix" and "out_range" properties match the same options
in vf_scale; the others attempt to follow the same pattern.
2019-06-02 17:30:41 +01:00