Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH v2 0/2] checkasm: added additional dstW tests for hscale
@ 2022-05-25  1:21 Swinney, Jonathan
  2022-05-25  7:54 ` Martin Storsjö
  0 siblings, 1 reply; 2+ messages in thread
From: Swinney, Jonathan @ 2022-05-25  1:21 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Martin Storsjö, Pop, Sebastian

This is a resubmission of changes to the hscale function for aarch64. I added a test as a separate patch so that it would be easier to get consistent before and after performance data. After Martin already submitted the improvement to the final section which adds up the results, the additional performance gains of the changes to the filterSize == 8 were marginal, so I took them out of this patch to show only the work with clear improvement. I may submit changes to the other function in the future.

I also removed my changes to vertical scaling from the patch series because there are some problems with the existing checkasm for yuv2planeX in aarch64. Martin, do you know why there is a different reference function used for testing in tests/checkasm/sw_scale.c than the one in libswscale/output.c? I haven't figured out how to reconcile these differences so I will resubmit that change later once I do.

Thanks again for your reviews!

Jonathan Swinney

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [FFmpeg-devel] [PATCH v2 0/2] checkasm: added additional dstW tests for hscale
  2022-05-25  1:21 [FFmpeg-devel] [PATCH v2 0/2] checkasm: added additional dstW tests for hscale Swinney, Jonathan
@ 2022-05-25  7:54 ` Martin Storsjö
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Storsjö @ 2022-05-25  7:54 UTC (permalink / raw)
  To: Swinney, Jonathan; +Cc: Pop, Sebastian, ffmpeg-devel

On Wed, 25 May 2022, Swinney, Jonathan wrote:

> This is a resubmission of changes to the hscale function for aarch64. I 
> added a test as a separate patch so that it would be easier to get 
> consistent before and after performance data. After Martin already 
> submitted the improvement to the final section which adds up the 
> results, the additional performance gains of the changes to the 
> filterSize == 8 were marginal, so I took them out of this patch to show 
> only the work with clear improvement. I may submit changes to the other 
> function in the future.
>
> I also removed my changes to vertical scaling from the patch series 
> because there are some problems with the existing checkasm for 
> yuv2planeX in aarch64. Martin, do you know why there is a different 
> reference function used for testing in tests/checkasm/sw_scale.c than 
> the one in libswscale/output.c? I haven't figured out how to reconcile 
> these differences so I will resubmit that change later once I do.

It looks to me like that there's some amount of functions that aren't 
bitexact there, see the comment:

     // The reference function is not the scalar function selected when mmx
     // is deactivated as the SIMD functions do not give the same result as
     // the scalar ones due to rounding. The SIMD functions are activated by
     // the flag SWS_ACCURATE_RND

This is a bit tricky...

If I understand it, the test tries to do a bitexact test of what the 
non-bitexact function does, and thus provides a separate C replacement 
that does rounding in the same way as this specific SIMD function.


I think a more comprehensive test would work like this:

- Initialize sws with SWS_ACCURATE_RND
- Do the regular check_func()
- Test that the output indeed is exact compared with the reference (the
   default C function used in swscale)

If I understand correctly, the x86 routines are inexact and wouldn't be 
tested by this. Therefore, afterwards, the test could do this:

- Initialize sws without SWS_ACCURATE_RND
- Call check_func("yuv2yuv..._inexact") to get a separate function name
   and reference for that
- Do a fuzzy test for the output, i.e. allow each pixel to be off by e.g.
   1 from the expected reference value.

This would be less strict for the current x86 routines, as it doesn't 
check that it rounds exactly like the specific reference in the test, but 
would allow testing all exact functions, and all inexact functions even if 
they round differently.

// Martin

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-25  7:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-25  1:21 [FFmpeg-devel] [PATCH v2 0/2] checkasm: added additional dstW tests for hscale Swinney, Jonathan
2022-05-25  7:54 ` Martin Storsjö

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git