gecko/gfx/ycbcr/win64_mac64.patch

58 lines
1.7 KiB
Diff
Raw Normal View History

diff --git a/gfx/ycbcr/yuv_row_mac.cpp b/gfx/ycbcr/yuv_row_mac.cpp
index 351466c..2a679cc 100644
--- a/gfx/ycbcr/yuv_row_mac.cpp
+++ b/gfx/ycbcr/yuv_row_mac.cpp
@@ -8,7 +8,10 @@
extern "C" {
-#if defined(ARCH_CPU_PPC)
+// PPC and 64 Bit builds use the C fallback. Optimized code
+// needs to be fixed for 64 bit builds. PPC has no optimized code
+// option at all.
+#if defined(ARCH_CPU_PPC) || defined(ARCH_CPU_64_BITS)
// PPC implementation uses C fallback
void FastConvertYUVToRGB32Row(const uint8* y_buf,
const uint8* u_buf,
@@ -315,6 +318,6 @@ void FastConvertYUVToRGB32Row(const uint8* y_buf,
&kCoefficientsRgbY[0][0]);
}
-#endif // ARCH_CPU_PPC
+#endif // ARCH_CPU_PPC || ARCH_CPU_64_BITS
} // extern "C"
diff --git a/gfx/ycbcr/yuv_row_win.cpp b/gfx/ycbcr/yuv_row_win.cpp
index f994931..708ef14 100644
--- a/gfx/ycbcr/yuv_row_win.cpp
+++ b/gfx/ycbcr/yuv_row_win.cpp
@@ -5,6 +5,21 @@
#include "yuv_row.h"
extern "C" {
+// 64 Bit builds use the C fallback. Optimized code
+// needs to be fixed for 64 bit builds.
+#if defined(ARCH_CPU_64_BITS)
+// PPC implementation uses C fallback
+void FastConvertYUVToRGB32Row(const uint8* y_buf,
+ const uint8* u_buf,
+ const uint8* v_buf,
+ uint8* rgb_buf,
+ int width) {
+ FastConvertYUVToRGB32Row_C(y_buf, u_buf, v_buf, rgb_buf, width);
+}
+
+#else
+
+
#define RGBY(i) { \
static_cast<int16>(1.164 * 64 * (i - 16) + 0.5), \
static_cast<int16>(1.164 * 64 * (i - 16) + 0.5), \
@@ -297,5 +312,6 @@ void FastConvertYUVToRGB32Row(const uint8* y_buf,
}
}
+#endif // ARCH_CPU_64_BITS
} // extern "C"