mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
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>
This commit is contained in:
parent
bbad0bc5ff
commit
94ceeba9f9
2 changed files with 82 additions and 26 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue