2017-12-02 00:46:21 +03:00
|
|
|
diff --git a/gfx/ycbcr/yuv_row_win.cpp b/gfx/ycbcr/yuv_row_win.cpp
|
|
|
|
--- a/gfx/ycbcr/yuv_row_win.cpp
|
|
|
|
+++ b/gfx/ycbcr/yuv_row_win.cpp
|
2017-12-06 21:20:54 +03:00
|
|
|
@@ -6,16 +6,22 @@
|
|
|
|
#include "mozilla/SSE.h"
|
2017-12-02 00:46:21 +03:00
|
|
|
|
|
|
|
#define kCoefficientsRgbU kCoefficientsRgbY + 2048
|
|
|
|
#define kCoefficientsRgbV kCoefficientsRgbY + 4096
|
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
|
|
|
|
#if defined(MOZILLA_MAY_SUPPORT_SSE) && defined(_M_IX86)
|
2017-12-06 21:20:54 +03:00
|
|
|
+#if defined(__clang__)
|
|
|
|
+// clang-cl may erroneously discard the symbol `kCoefficientsRgbY`
|
|
|
|
+// https://bugs.llvm.org/show_bug.cgi?id=35290
|
|
|
|
+volatile auto keep_kCoefficientsRgbY_alive = &kCoefficientsRgbY;
|
|
|
|
+#endif
|
|
|
|
+
|
2017-12-02 00:46:21 +03:00
|
|
|
__declspec(naked)
|
|
|
|
void FastConvertYUVToRGB32Row_SSE(const uint8* y_buf,
|
|
|
|
const uint8* u_buf,
|
|
|
|
const uint8* v_buf,
|
|
|
|
uint8* rgb_buf,
|
|
|
|
int width) {
|
2017-12-06 21:20:54 +03:00
|
|
|
__asm {
|
|
|
|
pushad
|