summaryrefslogtreecommitdiff
path: root/libavfilter/unsharp.h
diff options
context:
space:
mode:
authorRuiling Song <ruiling.song@intel.com>2019-05-07 09:46:33 +0800
committerRuiling Song <ruiling.song@intel.com>2019-06-03 10:49:57 +0800
commit94ceeba9f991ab69b192fa8527be0965de7e254b (patch)
tree3b831124a12367300196609b914b4bb6b529298c /libavfilter/unsharp.h
parentbbad0bc5ffcfd37df2df5aec6541fa766323d6bf (diff)
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>
Diffstat (limited to 'libavfilter/unsharp.h')
-rw-r--r--libavfilter/unsharp.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/unsharp.h b/libavfilter/unsharp.h
index caff986fc1..a60b30f31a 100644
--- a/libavfilter/unsharp.h
+++ b/libavfilter/unsharp.h
@@ -37,7 +37,8 @@ typedef struct UnsharpFilterParam {
int steps_y; ///< vertical step count
int scalebits; ///< bits to shift pixel
int32_t halfscale; ///< amount to add to pixel
- uint32_t *sc[MAX_MATRIX_SIZE - 1]; ///< finite state machine storage
+ uint32_t *sr; ///< finite state machine storage within a row
+ uint32_t **sc; ///< finite state machine storage across rows
} UnsharpFilterParam;
typedef struct UnsharpContext {
@@ -47,6 +48,7 @@ typedef struct UnsharpContext {
UnsharpFilterParam luma; ///< luma parameters (width, height, amount)
UnsharpFilterParam chroma; ///< chroma parameters (width, height, amount)
int hsub, vsub;
+ int nb_threads;
int opencl;
int (* apply_unsharp)(AVFilterContext *ctx, AVFrame *in, AVFrame *out);
} UnsharpContext;