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
3737 int steps_y; ///< vertical step count
3838 int scalebits; ///< bits to shift pixel
3939 int32_t halfscale; ///< amount to add to pixel
40− uint32_t *sc[MAX_MATRIX_SIZE - 1]; ///< finite state machine storage
40+ uint32_t *sr; ///< finite state machine storage within a row
41+ uint32_t **sc; ///< finite state machine storage across rows
4142 } UnsharpFilterParam;
4243
4344 typedef struct UnsharpContext {
@@ -47,6 +48,7 @@ typedef struct UnsharpContext { · 3 unmodified lines
4748 UnsharpFilterParam luma; ///< luma parameters (width, height, amount)
4849 UnsharpFilterParam chroma; ///< chroma parameters (width, height, amount)
4950 int hsub, vsub;
51+ int nb_threads;
5052 int opencl;
5153 int (* apply_unsharp)(AVFilterContext *ctx, AVFrame *in, AVFrame *out);
5254 } 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