Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
b29c7bcb
Commit
b29c7bcb
authored
Aug 08, 2019
by
Jarek Samic
Committed by
Mark Thompson
Aug 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi: add deshake_opencl filter
parent
5b5746b1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
2924 additions
and
1 deletion
+2924
-1
configure
configure
+1
-0
filters.texi
doc/filters.texi
+69
-0
Makefile
libavfilter/Makefile
+2
-0
allfilters.c
libavfilter/allfilters.c
+1
-0
deshake.cl
libavfilter/opencl/deshake.cl
+647
-0
opencl_source.h
libavfilter/opencl_source.h
+1
-0
version.h
libavfilter/version.h
+1
-1
vf_deshake_opencl.c
libavfilter/vf_deshake_opencl.c
+2202
-0
No files found.
configure
View file @
b29c7bcb
...
...
@@ -3454,6 +3454,7 @@ delogo_filter_deps="gpl"
denoise_vaapi_filter_deps
=
"vaapi"
derain_filter_select
=
"dnn"
deshake_filter_select
=
"pixelutils"
deshake_opencl_filter_deps
=
"opencl"
dilation_opencl_filter_deps
=
"opencl"
drawtext_filter_deps
=
"libfreetype"
drawtext_filter_suggest
=
"libfontconfig libfribidi"
...
...
doc/filters.texi
View file @
b29c7bcb
...
...
@@ -19795,6 +19795,75 @@ Make every semi-green pixel in the input transparent with some slight blending:
@end example
@end itemize
@section deshake_opencl
Feature-point based video stabilization filter.
The filter accepts the following options:
@table @option
@item tripod
Simulates a tripod by preventing any camera movement whatsoever from the original frame. Defaults to @code{0}.
@item debug
Whether or not additional debug info should be displayed, both in the processed output and in the console.
Note that in order to see console debug output you will also need to pass @code{-v verbose} to ffmpeg.
Viewing point matches in the output video is only supported for RGB input.
Defaults to @code{0}.
@item adaptive_crop
Whether or not to do a tiny bit of cropping at the borders to cut down on the amount of mirrored pixels.
Defaults to @code{1}.
@item refine_features
Whether or not feature points should be refined at a sub-pixel level.
This can be turned off for a slight performance gain at the cost of precision.
Defaults to @code{1}.
@item smooth_strength
The strength of the smoothing applied to the camera path from @code{0.0} to @code{1.0}.
@code{1.0} is the maximum smoothing strength while values less than that result in less smoothing.
@code{0.0} causes the filter to adaptively choose a smoothing strength on a per-frame basis.
Defaults to @code{0.0}.
@item smooth_window_multiplier
Controls the size of the smoothing window (the number of frames buffered to determine motion information from).
The size of the smoothing window is determined by multiplying the framerate of the video by this number.
Acceptable values range from @code{0.1} to @code{10.0}.
Larger values increase the amount of motion data available for determining how to smooth the camera path,
potentially improving smoothness, but also increase latency and memory usage.
Defaults to @code{2.0}.
@end table
@subsection Examples
@itemize
@item
Stabilize a video with a fixed, medium smoothing strength:
@example
-i INPUT -vf "
hwupload
,
deshake_opencl
=
smooth_strength
=
0.5
,
hwdownload
" OUTPUT
@end example
@item
Stabilize a video with debugging (both in console and in rendered video):
@example
-i INPUT -filter_complex "
[
0
:
v
]
format
=
rgba
,
hwupload
,
deshake_opencl
=
debug
=
1
,
hwdownload
,
format
=
rgba
,
format
=
yuv420p
" -v verbose OUTPUT
@end example
@end itemize
@section nlmeans_opencl
Non-local Means denoise filter through OpenCL, this filter accepts same options as @ref{nlmeans}.
...
...
libavfilter/Makefile
View file @
b29c7bcb
...
...
@@ -211,6 +211,8 @@ OBJS-$(CONFIG_DEINTERLACE_VAAPI_FILTER) += vf_deinterlace_vaapi.o vaapi_vpp
OBJS-$(CONFIG_DEJUDDER_FILTER)
+=
vf_dejudder.o
OBJS-$(CONFIG_DELOGO_FILTER)
+=
vf_delogo.o
OBJS-$(CONFIG_DENOISE_VAAPI_FILTER)
+=
vf_misc_vaapi.o
vaapi_vpp.o
OBJS-$(CONFIG_DESHAKE_OPENCL_FILTER)
+=
vf_deshake_opencl.o
opencl.o
\
opencl/deshake.o
OBJS-$(CONFIG_DESHAKE_FILTER)
+=
vf_deshake.o
OBJS-$(CONFIG_DESPILL_FILTER)
+=
vf_despill.o
OBJS-$(CONFIG_DETELECINE_FILTER)
+=
vf_detelecine.o
...
...
libavfilter/allfilters.c
View file @
b29c7bcb
...
...
@@ -200,6 +200,7 @@ extern AVFilter ff_vf_delogo;
extern
AVFilter
ff_vf_denoise_vaapi
;
extern
AVFilter
ff_vf_derain
;
extern
AVFilter
ff_vf_deshake
;
extern
AVFilter
ff_vf_deshake_opencl
;
extern
AVFilter
ff_vf_despill
;
extern
AVFilter
ff_vf_detelecine
;
extern
AVFilter
ff_vf_dilation
;
...
...
libavfilter/opencl/deshake.cl
0 → 100644
View file @
b29c7bcb
This diff is collapsed.
Click to expand it.
libavfilter/opencl_source.h
View file @
b29c7bcb
...
...
@@ -23,6 +23,7 @@ extern const char *ff_opencl_source_avgblur;
extern
const
char
*
ff_opencl_source_colorkey
;
extern
const
char
*
ff_opencl_source_colorspace_common
;
extern
const
char
*
ff_opencl_source_convolution
;
extern
const
char
*
ff_opencl_source_deshake
;
extern
const
char
*
ff_opencl_source_neighbor
;
extern
const
char
*
ff_opencl_source_nlmeans
;
extern
const
char
*
ff_opencl_source_overlay
;
...
...
libavfilter/version.h
View file @
b29c7bcb
...
...
@@ -31,7 +31,7 @@
#define LIBAVFILTER_VERSION_MAJOR 7
#define LIBAVFILTER_VERSION_MINOR 58
#define LIBAVFILTER_VERSION_MICRO 10
0
#define LIBAVFILTER_VERSION_MICRO 10
1
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
...
...
libavfilter/vf_deshake_opencl.c
0 → 100644
View file @
b29c7bcb
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment