• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Pipewireパッケージ(ちょっと変更)


Commit MetaInfo

Révisionae3798abaaa923e6a96b16f17dc67b61cfa576b8 (tree)
l'heure2023-10-16 03:40:30
AuteurWim Taymans <wtaymans@redh...>
CommiterWim Taymans

Message de Log

audioconvert: fix unaligned address

See #3572

Change Summary

Modification

--- a/spa/plugins/audioconvert/fmt-ops-avx2.c
+++ b/spa/plugins/audioconvert/fmt-ops-avx2.c
@@ -839,14 +839,22 @@ conv_f32d_to_s16_4s_avx2(void *data, void * SPA_RESTRICT dst, const void * SPA_R
839839 out[3] = _mm256_unpackhi_epi32(out[0], out[1]); /* a2 b2 c2 d2 a3 b3 c3 d3 a6 b6 c6 d6 a7 b7 c7 d7 */
840840
841841 #ifdef __x86_64__
842- *(int64_t*)(d + 0*n_channels) = _mm256_extract_epi64(out[2], 0); /* a0 b0 c0 d0 */
843- *(int64_t*)(d + 1*n_channels) = _mm256_extract_epi64(out[2], 1); /* a1 b1 c1 d1 */
844- *(int64_t*)(d + 2*n_channels) = _mm256_extract_epi64(out[3], 0); /* a2 b2 c2 d2 */
845- *(int64_t*)(d + 3*n_channels) = _mm256_extract_epi64(out[3], 1); /* a3 b3 c3 d3 */
846- *(int64_t*)(d + 4*n_channels) = _mm256_extract_epi64(out[2], 2); /* a4 b4 c4 d4 */
847- *(int64_t*)(d + 5*n_channels) = _mm256_extract_epi64(out[2], 3); /* a5 b5 c5 d5 */
848- *(int64_t*)(d + 6*n_channels) = _mm256_extract_epi64(out[3], 2); /* a6 b6 c6 d6 */
849- *(int64_t*)(d + 7*n_channels) = _mm256_extract_epi64(out[3], 3); /* a7 b7 c7 d7 */
842+ *((int32_t*)(d + 0*n_channels+0)) = _mm256_extract_epi32(out[2],0);
843+ *((int32_t*)(d + 0*n_channels+2)) = _mm256_extract_epi32(out[2],1);
844+ *((int32_t*)(d + 1*n_channels+0)) = _mm256_extract_epi32(out[2],2);
845+ *((int32_t*)(d + 1*n_channels+2)) = _mm256_extract_epi32(out[2],3);
846+ *((int32_t*)(d + 2*n_channels+0)) = _mm256_extract_epi32(out[3],0);
847+ *((int32_t*)(d + 2*n_channels+2)) = _mm256_extract_epi32(out[3],1);
848+ *((int32_t*)(d + 3*n_channels+0)) = _mm256_extract_epi32(out[3],2);
849+ *((int32_t*)(d + 3*n_channels+2)) = _mm256_extract_epi32(out[3],3);
850+ *((int32_t*)(d + 4*n_channels+0)) = _mm256_extract_epi32(out[2],4);
851+ *((int32_t*)(d + 4*n_channels+2)) = _mm256_extract_epi32(out[2],5);
852+ *((int32_t*)(d + 5*n_channels+0)) = _mm256_extract_epi32(out[2],6);
853+ *((int32_t*)(d + 5*n_channels+2)) = _mm256_extract_epi32(out[2],7);
854+ *((int32_t*)(d + 6*n_channels+0)) = _mm256_extract_epi32(out[3],4);
855+ *((int32_t*)(d + 6*n_channels+2)) = _mm256_extract_epi32(out[3],5);
856+ *((int32_t*)(d + 7*n_channels+0)) = _mm256_extract_epi32(out[3],6);
857+ *((int32_t*)(d + 7*n_channels+2)) = _mm256_extract_epi32(out[3],7);
850858 #else
851859 _mm_storel_pi((__m64*)(d + 0*n_channels), (__m128)_mm256_extracti128_si256(out[2], 0));
852860 _mm_storeh_pi((__m64*)(d + 1*n_channels), (__m128)_mm256_extracti128_si256(out[2], 0));