Skip to content
Myr

stb_image: Rename SSE2/NEON IDCTs to idct_simd.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Fabian Giesen · committed by Fabian Giesen · parent d92ab86 · Browse files · 1 file+4 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−4 removed

  • other:+4 added−4 removed

1 file+4 added−4 removed

modified:stb_image.h+4 added-4 removed
1886 unmodified lines
1887#ifdef STBI_SSE21888// sse2 integer IDCT. not the fastest possible implementation but it1889// produces bit-identical results to the generic C version so it's1890// fully "transparent".1891static void stbi__idct_sse2(stbi_uc *out, int out_stride, short data[64])1891static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64])1892{1893 // This is constructed to match our regular (generic) integer IDCT exactly.1894 __m128i row0, row1, row2, row3, row4, row5, row6, row7;1895 __m128i tmp;
172 unmodified lines
2068#ifdef STBI_NEON20692070// NEON integer IDCT. should produce bit-identical2071// results to the generic C version.2072static void stbi__idct_neon(stbi_uc *out, int out_stride, short data[64])2072static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64])2073{2074 int16x8_t row0, row1, row2, row3, row4, row5, row6, row7;20752076 int16x4_t rot0_0 = vdup_n_s16(stbi__f2f(0.5411961f));
1040 unmodified lines
3117 j->resample_row_hv_2_kernel = stbi__resample_row_hv_2;31183119#ifdef STBI_SSE23120 if (stbi__sse2_available()) {3121 j->idct_block_kernel = stbi__idct_sse2;3121 j->idct_block_kernel = stbi__idct_simd;3122 #ifndef STBI_JPEG_OLD3123 j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd;3124 #endif3125 j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd;3126 }3127#endif31283129#ifdef STBI_NEON3130 j->idct_block_kernel = stbi__idct_neon;3130 j->idct_block_kernel = stbi__idct_simd;3131 #ifndef STBI_JPEG_OLD3132 j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd;3133 #endif3134 j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd;
3167 unmodified lines