set up the kernels
| 3818 | |
| 3819 | // set up the kernels |
| 3820 | static void stbi__setup_jpeg(stbi__jpeg *j) |
| 3821 | { |
| 3822 | j->idct_block_kernel = stbi__idct_block; |
| 3823 | j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_row; |
| 3824 | j->resample_row_hv_2_kernel = stbi__resample_row_hv_2; |
| 3825 | |
| 3826 | #ifdef STBI_SSE2 |
| 3827 | if (stbi__sse2_available()) { |
| 3828 | j->idct_block_kernel = stbi__idct_simd; |
| 3829 | j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; |
| 3830 | j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; |
| 3831 | } |
| 3832 | #endif |
| 3833 | |
| 3834 | #ifdef STBI_NEON |
| 3835 | j->idct_block_kernel = stbi__idct_simd; |
| 3836 | j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; |
| 3837 | j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; |
| 3838 | #endif |
| 3839 | } |
| 3840 | |
| 3841 | // clean up the temporary component buffers |
| 3842 | static void stbi__cleanup_jpeg(stbi__jpeg *j) |
no test coverage detected