Handle overflow in bgr to i444 conversion
SSE2 and AVX2 did not assume the case in which the last line
could read more bytes than the lane size
Handle zero-width images
All paths (x86, sse2, avx2) are not correctly handling the case
in which the image width is zero.
This conversion should trivially return true, as there is no data to process.
In debug mode, this was instead triggering a panic.
In release mode, this was triggering a segfault.
Sync C unit tests with rust ones
One unit tests was even failing, fixed it.
Benchmark: Touch output vm pages before converting the images
This ensures consistent results across conversion algorithms and operating systems.
The result is that the hidden cost of allocation and making the memory really resident is not added to the cost of the conversion algorithm.
The page size is the standard one: 4KB
Avx2: Handle panic with return values
There were accidentally some panics introduced when implementing the rust-based dispatch
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Issue #, if available:
Description of changes:
Handle overflow in bgr to i444 conversion SSE2 and AVX2 did not assume the case in which the last line could read more bytes than the lane size
Handle zero-width images All paths (x86, sse2, avx2) are not correctly handling the case in which the image width is zero. This conversion should trivially return true, as there is no data to process. In debug mode, this was instead triggering a panic. In release mode, this was triggering a segfault.
Sync C unit tests with rust ones One unit tests was even failing, fixed it.
Benchmark: Touch output vm pages before converting the images This ensures consistent results across conversion algorithms and operating systems. The result is that the hidden cost of allocation and making the memory really resident is not added to the cost of the conversion algorithm. The page size is the standard one: 4KB
Avx2: Handle panic with return values There were accidentally some panics introduced when implementing the rust-based dispatch
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.