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

Unified Diff: media/base/simd/linear_scale_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 | « media/base/simd/convert_yuva_to_argb_mmx.inc ('k') | media/base/simd/scale_yuv_to_rgb_mmx.inc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/simd/linear_scale_yuv_to_rgb_mmx.inc
diff --git a/media/base/simd/linear_scale_yuv_to_rgb_mmx.inc b/media/base/simd/linear_scale_yuv_to_rgb_mmx.inc
index 493e9b3694db47f41e3a16a32ac2aa324e3a8dc1..dce591d78044e26bd5c6122f65c13e30493d4af1 100644
--- a/media/base/simd/linear_scale_yuv_to_rgb_mmx.inc
+++ b/media/base/simd/linear_scale_yuv_to_rgb_mmx.inc
@@ -37,33 +37,19 @@ PROLOGUE 6, 7, 3, Y, R0, R1, ARGB, R2, R3, TEMP
%define SOURCE_DX_ARG_REGq R3q ; Source dx argument
%define WIDTH_ARG_REGq R2q ; Width argument
-%ifdef PIC
-; PIC code shared COMPR, U and V with the same register. Need to be careful in the
-; code they don't mix up. This allows R3q to be used for YUV table.
%define COMPRq R0q ; Component B value
%define COMPRd R0d ; Component B value
%define Uq R0q ; U plane address
%define Vq R0q ; V plane address
%define U_PLANE WORD_SIZE [rsp + 3 * gprsize]
%define TABLE R3q ; Address of the table
-%else
-; Non-PIC code defines.
-%define COMPRq R3q ; Component B value
-%define COMPRd R3d ; Component B value
-%define Uq R0q ; U plane address
-%define Vq R3q ; V plane address
-%define TABLE mangle(kCoefficientsRgbY)
-%endif
-; Defines for stack variables. These are used in both PIC and non-PIC code.
+; Defines for stack variables.
%define V_PLANE WORD_SIZE [rsp + 2 * gprsize]
%define SOURCE_DX WORD_SIZE [rsp + gprsize]
%define SOURCE_WIDTH WORD_SIZE [rsp]
-; Handle stack variables differently for PIC and non-PIC code.
-
-%ifdef PIC
-; Define stack usage for PIC code. PIC code push U plane onto stack.
+; Define stack usage.
PUSH U_ARG_REGq
PUSH V_ARG_REGq
PUSH SOURCE_DX_ARG_REGq
@@ -74,20 +60,9 @@ PROLOGUE 6, 7, 3, Y, R0, R1, ARGB, R2, R3, TEMP
mov TEMPq, SOURCE_DX_ARG_REGq ; Need to save source_dx first
LOAD_SYM TABLE, mangle(kCoefficientsRgbY)
%define SOURCE_DX_ARG_REGq TEMPq ; Overwrite SOURCE_DX_ARG_REGq to TEMPq
-%else
-; Define stack usage. Non-PIC code just push 3 registers to stack.
- PUSH V_ARG_REGq
- PUSH SOURCE_DX_ARG_REGq
- imul WIDTH_ARG_REGq, SOURCE_DX_ARG_REGq ; source_width = width * source_dx
- PUSH WIDTH_ARG_REGq
-%endif
%macro EPILOGUE 0
-%ifdef PIC
ADD rsp, 4 * gprsize
-%else
- ADD rsp, 3 * gprsize
-%endif
%endmacro
xor Xq, Xq ; x = 0
@@ -97,9 +72,7 @@ PROLOGUE 6, 7, 3, Y, R0, R1, ARGB, R2, R3, TEMP
jmp .lscaleend
.lscaleloop:
-%ifdef PIC
- mov Uq, U_PLANE ; PIC code saves U_PLANE on stack.
-%endif
+ mov Uq, U_PLANE
; Define macros for scaling YUV components since they are reused.
%macro SCALEUV 1
« no previous file with comments | « media/base/simd/convert_yuva_to_argb_mmx.inc ('k') | media/base/simd/scale_yuv_to_rgb_mmx.inc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698