This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Distance 1 (4992662 bytes) | |
| 3961x5942, 8-bit RGBA, 94145048 samples, alpha: false, ICC: 504 bytes | |
| Iteration 1: 519.25 ms | |
| Iteration 2: 511.83 ms | |
| Iteration 3: 531.22 ms | |
| Average at distance 1: 520.77 ms | |
| Distance 2 (3629673 bytes) | |
| 3961x5942, 8-bit RGBA, 94145048 samples, alpha: false, ICC: 504 bytes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use core::arch::x86_64::*; | |
| #[target_feature(enable = "avx2")] | |
| pub fn mul_add_precise_f32x4(a: __m128, b: __m128, c: __m128) -> __m128 { | |
| let a_low = _mm_cvtps_pd(a); | |
| let a_high = _mm_cvtps_pd(_mm_movehl_ps(a, a)); | |
| let b_low = _mm_cvtps_pd(b); | |
| let b_high = _mm_cvtps_pd(_mm_movehl_ps(b, b)); | |
| let c_low = _mm_cvtps_pd(c); | |
| let c_high = _mm_cvtps_pd(_mm_movehl_ps(c, c)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ---------------------------------------------- x86_64 --- | |
| ./assets/digital_art_portrait.jpg: 2736x4104, quality 75, 24 threads, 7 measured iterations | |
| jixel: Slow; libjxl: effort 7 | |
| jixel median 574.42 ms min 533.91 ms mean 575.18 ms 19.5 MP/s 741819 bytes | |
| libjxl median 626.64 ms min 618.86 ms mean 634.77 ms 17.9 MP/s 1159900 bytes | |
| speed: jixel is 1.09x faster than libjxl | |
| --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use afl::fuzz; | |
| use jxl::api::{ | |
| Endianness, JxlColorType, JxlDataFormat, JxlDecoder, JxlDecoderOptions, JxlPixelFormat, | |
| ProcessingResult, | |
| }; | |
| use jxl::headers::extra_channels::ExtraChannel; | |
| use jxl::image::JxlOutputBuffer; | |
| use thiserror::Error; | |
| #[derive(Debug, Error)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright (c) Radzivon Bartoshyk 5/2026. All rights reserved. | |
| * | |
| * Redistribution and use in source and binary forms, with or without modification, | |
| * are permitted provided that the following conditions are met: | |
| * | |
| * 1. Redistributions of source code must retain the above copyright notice, this | |
| * list of conditions and the following disclaimer. | |
| * | |
| * 2. Redistributions in binary form must reproduce the above copyright notice, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pub struct AutoAligner<T: Sized, const N: usize> { | |
| pub width: usize, | |
| pub height: usize, | |
| pub data: Vec<T>, | |
| } | |
| impl<T: Sized + Default + Clone + Copy, const N: usize> AutoAligner<T, N> { | |
| pub fn new(width: usize, height: usize, data: Vec<T>) -> AutoAligner<T, N> { | |
| let row_size = width * N * size_of::<T>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Copyright 2024 Radzivon Bartoshyk | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright (c) Radzivon Bartoshyk, 6/2025. All rights reserved. | |
| * | |
| * Redistribution and use in source and binary forms, with or without modification, | |
| * are permitted provided that the following conditions are met: | |
| * | |
| * 1. Redistributions of source code must retain the above copyright notice, this | |
| * list of conditions and the following disclaimer. | |
| * | |
| * 2. Redistributions in binary form must reproduce the above copyright notice, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| trait StreamingIO: Read + Seek {} | |
| struct IODynWrapper { | |
| cursor: Box<dyn StreamingIO>, | |
| buffer: Vec<u8>, | |
| position: usize, | |
| } | |
| impl Read for IODynWrapper { | |
| #[inline] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use image::{DynamicImage, ImageReader}; | |
| use num_traits::AsPrimitive; | |
| use std::fmt::Debug; | |
| #[derive(Clone, Debug)] | |
| pub struct ImageStatistics<A: Clone + Debug> { | |
| pub hist_bins: Vec<Vec<A>>, | |
| pub distinct_colors: u64, | |
| } |
NewerOlder