• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

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

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


コミットメタ情報

リビジョンf3942fca29dff77816427de79fb884f9c608221c (tree)
日時2023-10-16 02:10:45
作者Wim Taymans <wtaymans@redh...>
コミッターWim Taymans

ログメッセージ

audioconvert: fix unaligned writes

Use 16 bits writes for 16 bits samples or else we might be doing
unlaigned writes.

See #3572

変更サマリ

差分

--- a/spa/plugins/audioconvert/fmt-ops-sse2.c
+++ b/spa/plugins/audioconvert/fmt-ops-sse2.c
@@ -1143,14 +1143,15 @@ conv_f32d_to_s16_2s_sse2(void *data, void * SPA_RESTRICT dst, const void * SPA_R
11431143 t[1] = _mm_packs_epi32(t[1], t[1]);
11441144
11451145 out[0] = _mm_unpacklo_epi16(t[0], t[1]);
1146- out[1] = _mm_shuffle_epi32(out[0], _MM_SHUFFLE(0, 3, 2, 1));
1147- out[2] = _mm_shuffle_epi32(out[0], _MM_SHUFFLE(1, 0, 3, 2));
1148- out[3] = _mm_shuffle_epi32(out[0], _MM_SHUFFLE(2, 1, 0, 3));
11491146
1150- *((int32_t*)(d + 0*n_channels)) = _mm_cvtsi128_si32(out[0]);
1151- *((int32_t*)(d + 1*n_channels)) = _mm_cvtsi128_si32(out[1]);
1152- *((int32_t*)(d + 2*n_channels)) = _mm_cvtsi128_si32(out[2]);
1153- *((int32_t*)(d + 3*n_channels)) = _mm_cvtsi128_si32(out[3]);
1147+ d[0*n_channels+0] = _mm_extract_epi16(out[0], 0);
1148+ d[0*n_channels+1] = _mm_extract_epi16(out[0], 1);
1149+ d[1*n_channels+0] = _mm_extract_epi16(out[0], 2);
1150+ d[1*n_channels+1] = _mm_extract_epi16(out[0], 3);
1151+ d[2*n_channels+0] = _mm_extract_epi16(out[0], 4);
1152+ d[2*n_channels+1] = _mm_extract_epi16(out[0], 5);
1153+ d[3*n_channels+0] = _mm_extract_epi16(out[0], 6);
1154+ d[3*n_channels+1] = _mm_extract_epi16(out[0], 7);
11541155 d += 4*n_channels;
11551156 }
11561157 for(; n < n_samples; n++) {