History

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).

Ruiling Song committed 7 years ago

Commit 94ceeba1 parent bbad0bc2 files · +81 −25Browse files

Showing the changes to libavfilter/unsharp.h (1 of 2 files). Show all

Unified · Split

libavfilter/unsharp.h+3−1
@@ -37,7 +37,8 @@ typedef struct UnsharpFilterParam { · 36 unmodified lines
37 int steps_y; ///< vertical step count37 int steps_y; ///< vertical step count
38 int scalebits; ///< bits to shift pixel38 int scalebits; ///< bits to shift pixel
39 int32_t halfscale; ///< amount to add to pixel39 int32_t halfscale; ///< amount to add to pixel
40 uint32_t *sc[MAX_MATRIX_SIZE - 1]; ///< finite state machine storage40 uint32_t *sr; ///< finite state machine storage within a row
41 uint32_t **sc; ///< finite state machine storage across rows
41} UnsharpFilterParam;42} UnsharpFilterParam;
42 43
43typedef struct UnsharpContext {44typedef struct UnsharpContext {
@@ -47,6 +48,7 @@ typedef struct UnsharpContext { · 3 unmodified lines
47 UnsharpFilterParam luma; ///< luma parameters (width, height, amount)48 UnsharpFilterParam luma; ///< luma parameters (width, height, amount)
48 UnsharpFilterParam chroma; ///< chroma parameters (width, height, amount)49 UnsharpFilterParam chroma; ///< chroma parameters (width, height, amount)
49 int hsub, vsub;50 int hsub, vsub;
51 int nb_threads;
50 int opencl;52 int opencl;
51 int (* apply_unsharp)(AVFilterContext *ctx, AVFrame *in, AVFrame *out);53 int (* apply_unsharp)(AVFilterContext *ctx, AVFrame *in, AVFrame *out);
52} UnsharpContext;54} UnsharpContext;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t