summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfbarchard@chromium.org <fbarchard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-11 23:48:23 +0000
committerfbarchard@chromium.org <fbarchard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-11 23:48:23 +0000
commit00d36ed64617bfc8668152343078734235936cce (patch)
treee0e6ba017e1093a3b4c360ea978edf7e77a8ad4f
parente17c5e6c785db21eb0a276534c24d10a9daaad08 (diff)
downloadchromium_src-00d36ed64617bfc8668152343078734235936cce.zip
chromium_src-00d36ed64617bfc8668152343078734235936cce.tar.gz
chromium_src-00d36ed64617bfc8668152343078734235936cce.tar.bz2
declare text segment for gcc assembly
BUG=51843 TEST=build chrome on gentoo Review URL: http://codereview.chromium.org/3173008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55809 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--media/base/yuv_row_posix.cc33
1 files changed, 9 insertions, 24 deletions
diff --git a/media/base/yuv_row_posix.cc b/media/base/yuv_row_posix.cc
index 306d3d7..24317de 100644
--- a/media/base/yuv_row_posix.cc
+++ b/media/base/yuv_row_posix.cc
@@ -21,6 +21,7 @@ void FastConvertYUVToRGB32Row(const uint8* y_buf, // rdi
uint8* rgb_buf, // rcx
int width) { // r8
asm(
+ ".text\n"
"jmp convertend\n"
"convertloop:"
"movzb (%1),%%r10\n"
@@ -80,6 +81,7 @@ void ScaleYUVToRGB32Row(const uint8* y_buf, // rdi
int width, // r8
int source_dx) { // r9
asm(
+ ".text\n"
"xor %%r11,%%r11\n"
"sub $0x2,%4\n"
"js scalenext\n"
@@ -149,6 +151,7 @@ void LinearScaleYUVToRGB32Row(const uint8* y_buf,
int width,
int source_dx) {
asm(
+ ".text\n"
"xor %%r11,%%r11\n" // x = 0
"sub $0x2,%4\n"
"js .lscalenext\n"
@@ -270,6 +273,7 @@ void FastConvertYUVToRGB32Row(const uint8* y_buf,
uint8* rgb_buf,
int width);
asm(
+ ".text\n"
".global FastConvertYUVToRGB32Row\n"
"FastConvertYUVToRGB32Row:\n"
"pusha\n"
@@ -329,6 +333,7 @@ void ScaleYUVToRGB32Row(const uint8* y_buf,
int width,
int source_dx);
asm(
+ ".text\n"
".global ScaleYUVToRGB32Row\n"
"ScaleYUVToRGB32Row:\n"
"pusha\n"
@@ -402,6 +407,7 @@ void LinearScaleYUVToRGB32Row(const uint8* y_buf,
int width,
int source_dx);
asm(
+ ".text\n"
".global LinearScaleYUVToRGB32Row\n"
"LinearScaleYUVToRGB32Row:\n"
"pusha\n"
@@ -514,7 +520,7 @@ extern void PICConvertYUVToRGB32Row(const uint8* y_buf,
int width,
int16 *kCoefficientsRgbY);
asm(
-
+ ".text\n"
#if defined(OS_MACOSX)
"_PICConvertYUVToRGB32Row:\n"
#else
@@ -588,6 +594,7 @@ extern void PICScaleYUVToRGB32Row(const uint8* y_buf,
int16 *kCoefficientsRgbY);
asm(
+ ".text\n"
#if defined(OS_MACOSX)
"_PICScaleYUVToRGB32Row:\n"
#else
@@ -676,6 +683,7 @@ void PICLinearScaleYUVToRGB32Row(const uint8* y_buf,
int source_dx,
int16 *kCoefficientsRgbY);
asm(
+ ".text\n"
#if defined(OS_MACOSX)
"_PICLinearScaleYUVToRGB32Row:\n"
#else
@@ -833,29 +841,6 @@ static inline void YuvPixel(uint8 y,
(packuswb(a) << 24);
}
-#if TEST_MMX_YUV
-static inline void YuvPixel(uint8 y,
- uint8 u,
- uint8 v,
- uint8* rgb_buf) {
-
- asm {
- movzx eax, u
- movq mm0, [kCoefficientsRgbY+2048 + 8 * eax]
- movzx eax, v
- paddsw mm0, [kCoefficientsRgbY+4096 + 8 * eax]
- movzx eax, y
- movq mm1, [kCoefficientsRgbY + 8 * eax]
- paddsw mm1, mm0
- psraw mm1, 6
- packuswb mm1, mm1
- mov eax, rgb_buf
- movd [eax], mm1
- emms
- }
-}
-#endif
-
void FastConvertYUVToRGB32Row(const uint8* y_buf,
const uint8* u_buf,
const uint8* v_buf,