Re: [FFmpeg-devel] Performances improvement in "image_copy_plane"

2022-07-14 Thread Marco Vianini
On Wednesday, July 13, 2022 at 06:16:15 PM GMT+2, James Almer wrote: On 7/13/2022 12:54 PM, Marco Vianini wrote: > Sorry, my mail client was using html format. > I hope now the mail will be sent correctly. > > > You can get a very big improvement of performances in the special (but

Re: [FFmpeg-devel] Performances improvement in "image_copy_plane"

2022-07-13 Thread James Almer
On 7/13/2022 12:54 PM, Marco Vianini wrote: Sorry, my mail client was using html format. I hope now the mail will be sent correctly. You can get a very big improvement of performances in the special (but very likely) case of: "(dst_linesize == bytewidth && src_linesize == bytewidth)" In this

Re: [FFmpeg-devel] Performances improvement in "image_copy_plane"

2022-07-13 Thread Marco Vianini
On Wednesday, July 13, 2022 at 05:08:27 PM GMT+2, Paul B Mahol wrote: On Wed, Jul 13, 2022 at 5:02 PM Marco Vianini < marco_vianini-at-yahoo...@ffmpeg.org> wrote: >  I did following tests on Windows 10 64bit.I compiled code in Release. > I copied my pc camera frames 1000 times (reso

Re: [FFmpeg-devel] Performances improvement in "image_copy_plane"

2022-07-13 Thread Timo Rothenpieler
On 13.07.2022 11:38, Marco Vianini wrote: You can get a very big improvement of performances in the special (but very likely) case of: "(dst_linesize == bytewidth && src_linesize == bytewidth)" Isn't all that matters dst_linesize == src_linesize, and then you can memcpy() the whole plane?

Re: [FFmpeg-devel] Performances improvement in "image_copy_plane"

2022-07-13 Thread Paul B Mahol
On Wed, Jul 13, 2022 at 5:02 PM Marco Vianini < marco_vianini-at-yahoo...@ffmpeg.org> wrote: > I did following tests on Windows 10 64bit.I compiled code in Release. > I copied my pc camera frames 1000 times (resolution 1920x1080): > With Coalesce (MY PATCH):copy_cnt=100 size=1920x1080 > tot_time

Re: [FFmpeg-devel] Performances improvement in "image_copy_plane"

2022-07-13 Thread Marco Vianini
I did following tests on Windows 10 64bit.I compiled code in Release. I copied my pc camera frames 1000 times (resolution 1920x1080): With Coalesce (MY PATCH):copy_cnt=100  size=1920x1080 tot_time_copy(us)=36574 (average=365.74)copy_cnt=200  size=1920x1080 tot_time_copy(us)=78207 (average=391.03

Re: [FFmpeg-devel] Performances improvement in "image_copy_plane"

2022-07-13 Thread Paul B Mahol
On Wed, Jul 13, 2022 at 11:38 AM Marco Vianini < marco_vianini-at-yahoo...@ffmpeg.org> wrote: > You can get a very big improvement of performances in the special (but > very likely) case of: "(dst_linesize == bytewidth && src_linesize == > bytewidth)" > > In this case in fact We can "Coalesce row

[FFmpeg-devel] Performances improvement in "image_copy_plane"

2022-07-13 Thread Marco Vianini
You can get a very big improvement of performances in the special (but very likely) case of: "(dst_linesize == bytewidth && src_linesize == bytewidth)" In this case in fact We can "Coalesce rows", that is using ONLY ONE MEMCPY, instead of a smaller memcpy for every row (that is looping for heig