mirror of
https://github.com/Cykooz/fast_image_resize.git
synced 2026-10-08 01:11:09 +00:00
Fixed link to CHANGELOG.md in the README.md.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
## [Unreleased] - ReleaseDate
|
||||
|
||||
|
||||
## [0.2.0] - 2021-08-02
|
||||
|
||||
- Fixed typo in name of CatmullRom filter type.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
Rust library for fast image resizing with using of SIMD instructions.
|
||||
|
||||
[CHANGELOG](https://github.com/Cykooz/fast_image_resize/blob/master/CHANGELOG.md)
|
||||
[CHANGELOG](https://github.com/Cykooz/fast_image_resize/blob/main/CHANGELOG.md)
|
||||
|
||||
Supported pixel formats and available optimisations:
|
||||
- `U8x4` - four `u8` components per pixel:
|
||||
|
||||
@@ -31,12 +31,12 @@ impl Avx2U8x4 {
|
||||
let initial = _mm256_set1_epi32(1 << (precision - 1));
|
||||
|
||||
#[rustfmt::skip]
|
||||
let sh1 = _mm256_set_epi8(
|
||||
let sh1 = _mm256_set_epi8(
|
||||
-1, 7, -1, 3, -1, 6, -1, 2, -1, 5, -1, 1, -1, 4, -1, 0,
|
||||
-1, 7, -1, 3, -1, 6, -1, 2, -1, 5, -1, 1, -1, 4, -1, 0,
|
||||
);
|
||||
#[rustfmt::skip]
|
||||
let sh2 = _mm256_set_epi8(
|
||||
let sh2 = _mm256_set_epi8(
|
||||
-1, 15, -1, 11, -1, 14, -1, 10, -1, 13, -1, 9, -1, 12, -1, 8,
|
||||
-1, 15, -1, 11, -1, 14, -1, 10, -1, 13, -1, 9, -1, 12, -1, 8,
|
||||
);
|
||||
|
||||
+4
-4
@@ -4,10 +4,10 @@ use std::slice;
|
||||
|
||||
use crate::errors::{CropBoxError, ImageBufferError, ImageRowsError, InvalidBufferSizeError};
|
||||
|
||||
pub type TwoRows<'a> = (&'a [u32], &'a [u32]);
|
||||
pub type FourRows<'a> = (&'a [u32], &'a [u32], &'a [u32], &'a [u32]);
|
||||
pub type RowMut<'a, 'b> = &'b mut &'a mut [u32];
|
||||
pub type FourRowsMut<'a, 'b> = (
|
||||
pub(crate) type TwoRows<'a> = (&'a [u32], &'a [u32]);
|
||||
pub(crate) type FourRows<'a> = (&'a [u32], &'a [u32], &'a [u32], &'a [u32]);
|
||||
pub(crate) type RowMut<'a, 'b> = &'b mut &'a mut [u32];
|
||||
pub(crate) type FourRowsMut<'a, 'b> = (
|
||||
&'b mut &'a mut [u32],
|
||||
&'b mut &'a mut [u32],
|
||||
&'b mut &'a mut [u32],
|
||||
|
||||
@@ -45,7 +45,7 @@ fn multiply_alpha_test(cpu_extensions: CpuExtensions) {
|
||||
.multiply_alpha(&src_image_view, &mut dst_image_view)
|
||||
.unwrap();
|
||||
|
||||
let dst_pixels: Vec<u32> = dst_image.get_pixels().to_vec();
|
||||
let dst_pixels = dst_image.get_pixels();
|
||||
let dst_rows = dst_pixels.chunks_exact(width as usize);
|
||||
for (row, &valid_pixel) in dst_rows.zip(res_pixels.iter()) {
|
||||
for &pixel in row.iter() {
|
||||
@@ -128,7 +128,7 @@ fn divide_alpha_test(cpu_extensions: CpuExtensions) {
|
||||
.divide_alpha(&src_image_view, &mut dst_image_view)
|
||||
.unwrap();
|
||||
|
||||
let dst_pixels: Vec<u32> = dst_image.get_pixels().to_vec();
|
||||
let dst_pixels = dst_image.get_pixels();
|
||||
let dst_rows = dst_pixels.chunks_exact(width as usize);
|
||||
for (row, &valid_pixel) in dst_rows.zip(res_pixels.iter()) {
|
||||
for &pixel in row.iter() {
|
||||
|
||||
Reference in New Issue
Block a user