1 ; Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 ; Use of this source code is governed by a BSD-style license that can be
3 ; found in the LICENSE file.
5 %include "media/base/simd/media_export.asm"
11 %assign stack_offset 0
13 extern mangle(kCoefficientsRgbY)
15 ; Parameters are in the following order:
22 ; 7. Lookup table address
24 PROLOGUE 7, 7, 3, Y, U, V, ARGB, R1, R2, TEMP
27 %define WORD_SIZE QWORD
29 %define WORD_SIZE DWORD
35 %define SOURCE_DX WORD_SIZE [rsp]
39 %define WIDTH WORD_SIZE [rsp + gprsize]
50 movzx TEMPd, BYTE [Uq + TEMPq]
51 movq mm0, [TABLE + 2048 + 8 * TEMPq]
54 movzx TEMPd, BYTE [Vq + TEMPq]
55 paddsw mm0, [TABLE + 4096 + 8 * TEMPq]
59 movzx TEMPd, BYTE [Yq + TEMPq]
60 movq mm1, [TABLE + 8 * TEMPq]
64 movzx TEMPd, BYTE [Yq + TEMPq]
65 movq mm2, [TABLE + 8 * TEMPq]
71 MOVQ QWORD [ARGBq], mm1
78 and WIDTH, 1 ; odd number of pixels?
83 movzx TEMPd, BYTE [Uq + TEMPq]
84 movq mm0, [TABLE + 2048 + 8 * TEMPq]
87 movzx TEMPd, BYTE [Vq + TEMPq]
88 paddsw mm0, [TABLE + 4096 + 8 * TEMPq]
91 movzx TEMPd, BYTE [Yq + TEMPq]
92 movq mm1, [TABLE + 8 * TEMPq]
96 movd DWORD [ARGBq], mm1