Skip to content
Snippets Groups Projects

Support for SIMD operations for RGG1555

Merged João Magalhães requested to merge joamag/simd into master
+ 6
2
@@ -262,8 +262,9 @@ mod tests {
000, 000, 255, // Blue
255, 255, 000, // Yellow
255, 000, 000, // Red
020, 020, 200, // Blueish
];
let mut rgb1555_pixels: Vec<u8> = vec![0; 34];
let mut rgb1555_pixels: Vec<u8> = vec![0; 36];
rgb888_to_rgb1555_scalar(&rgb888_pixels, &mut rgb1555_pixels);
@@ -285,6 +286,7 @@ mod tests {
0b00011111, 0b10000000, // Blue
0b11100000, 0b11111111, // Yellow
0b00000000, 0b11111100, // Red
0b01011001, 0b10001000, // Blueish
];
assert_eq!(rgb1555_pixels, expected_rgb1555);
@@ -313,8 +315,9 @@ mod tests {
000, 000, 255, // Blue
255, 255, 000, // Yellow
255, 000, 000, // Red
020, 020, 200, // Blueish
];
let mut rgb1555_pixels: Vec<u8> = vec![0; 34];
let mut rgb1555_pixels: Vec<u8> = vec![0; 36];
rgb888_to_rgb1555_simd(&rgb888_pixels, &mut rgb1555_pixels);
@@ -336,6 +339,7 @@ mod tests {
0b00011111, 0b10000000, // Blue
0b11100000, 0b11111111, // Yellow
0b00000000, 0b11111100, // Red
0b01011001, 0b10001000, // Blueish
];
assert_eq!(rgb1555_pixels, expected_rgb1555);
Loading