[FFmpeg-devel] [PATCH] avutil/imgutils: optimize image copying

Tomas Härdin git at haerdin.se
Tue May 9 12:59:56 EEST 2023


fre 2023-05-05 klockan 16:31 +0800 skrev xufuji456:
> It makes sense when copying 4K/8K video frame, got 2.7% speed up.
> When the condition is no padding and src_linesize equals to dst,
> we could copy plane instead of line by line.
> before    after   rate
> 4K video:
> 9145      8998    1.6%
> 9804      9465    3.4%
> 9645      9394    2.6%
> 8K video:
> 28411     27718   2.4%
> 31288     30056   3.9%
> 32336     31571   2.4%
> 
> Signed-off-by: xufuji456 <839789740 at qq.com>
> ---
>  libavutil/imgutils.c | 16 ++++++++++++----
>  1 file changed, 12 insertions(+), 4 deletions(-)

Nice, looks OK to me

/Tomas




More information about the ffmpeg-devel mailing list