diff options
author | Anton Khirnov <anton@khirnov.net> | 2021-05-19 15:45:34 +0300 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2021-07-03 16:56:16 +0300 |
commit | 0f8e0957d23038f80c8c6193b4f940cfd0b42c9c (patch) | |
tree | e34c83784823db8d78463012d983ea925670ca63 /libswscale/swscale_internal.h | |
parent | 2730639259f5bdf81d4223cd8f4275e2939a1482 (diff) |
sws: do not reallocate scratch buffers for each slice
Diffstat (limited to 'libswscale/swscale_internal.h')
-rw-r--r-- | libswscale/swscale_internal.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index a1de95cee0..9304a5ef42 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -626,6 +626,18 @@ typedef struct SwsContext { SwsDither dither; SwsAlphaBlend alphablend; + + // scratch buffer for converting packed rgb0 sources + // filled with a copy of the input frame + fully opaque alpha, + // then passed as input to further conversion + uint8_t *rgb0_scratch; + unsigned int rgb0_scratch_allocated; + + // scratch buffer for converting XYZ sources + // filled with the input converted to rgb48 + // then passed as input to further conversion + uint8_t *xyz_scratch; + unsigned int xyz_scratch_allocated; } SwsContext; //FIXME check init (where 0) |