Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(752)

Unified Diff: media/base/simd/convert_yuv_to_rgb_mmx.inc

Issue 245103003: Remove non-PIC specializations of media SIMD YUV conversion routines. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@m
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/base/simd/convert_yuva_to_argb_mmx.inc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/simd/convert_yuv_to_rgb_mmx.inc
diff --git a/media/base/simd/convert_yuv_to_rgb_mmx.inc b/media/base/simd/convert_yuv_to_rgb_mmx.inc
index e38794a814c5ce215a1dafb338d20c541dce45d5..f143574575a9764f6d23d60e6457ec62ad1c26b2 100644
--- a/media/base/simd/convert_yuv_to_rgb_mmx.inc
+++ b/media/base/simd/convert_yuv_to_rgb_mmx.inc
@@ -7,60 +7,6 @@
EXPORT SYMBOL
align function_align
-; Non-PIC code is the fastest so use this if possible.
-%ifndef PIC
-mangle(SYMBOL):
- %assign stack_offset 0
- PROLOGUE 5, 7, 3, Y, U, V, ARGB, WIDTH, TEMPU, TEMPV
- extern mangle(kCoefficientsRgbY)
- jmp .convertend
-
-.convertloop:
- movzx TEMPUd, BYTE [Uq]
- add Uq, 1
- movzx TEMPVd, BYTE [Vq]
- add Vq, 1
- movq mm0, [mangle(kCoefficientsRgbY) + 2048 + 8 * TEMPUq]
- movzx TEMPUd, BYTE [Yq]
- paddsw mm0, [mangle(kCoefficientsRgbY) + 4096 + 8 * TEMPVq]
- movzx TEMPVd, BYTE [Yq + 1]
- movq mm1, [mangle(kCoefficientsRgbY) + 8 * TEMPUq]
- add Yq, 2
- movq mm2, [mangle(kCoefficientsRgbY) + 8 * TEMPVq]
- paddsw mm1, mm0
- paddsw mm2, mm0
- psraw mm1, 6
- psraw mm2, 6
- packuswb mm1, mm2
- MOVQ [ARGBq], mm1
- add ARGBq, 8
-
-.convertend:
- sub WIDTHq, 2
- jns .convertloop
-
- ; If number of pixels is odd then compute it.
- and WIDTHq, 1
- jz .convertdone
-
- movzx TEMPUd, BYTE [Uq]
- movq mm0, [mangle(kCoefficientsRgbY) + 2048 + 8 * TEMPUq]
- movzx TEMPVd, BYTE [Vq]
- paddsw mm0, [mangle(kCoefficientsRgbY) + 4096 + 8 * TEMPVq]
- movzx TEMPUd, BYTE [Yq]
- movq mm1, [mangle(kCoefficientsRgbY) + 8 * TEMPUq]
- paddsw mm1, mm0
- psraw mm1, 6
- packuswb mm1, mm1
- movd [ARGBq], mm1
-
-.convertdone:
- RET
-%endif
-
-; With PIC code we need to load the address of mangle(kCoefficientsRgbY).
-; This code is slower than the above version.
-%ifdef PIC
mangle(SYMBOL):
%assign stack_offset 0
PROLOGUE 5, 7, 3, Y, U, V, ARGB, WIDTH, TEMP, TABLE
@@ -118,4 +64,3 @@ mangle(SYMBOL):
.convertdone:
RET
-%endif
« no previous file with comments | « no previous file | media/base/simd/convert_yuva_to_argb_mmx.inc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698