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:
23 PROLOGUE 6, 7, 3, Y, U, V, ARGB, R1, R2, TEMP
26 %define WORD_SIZE QWORD
28 %define WORD_SIZE DWORD
34 %define SOURCE_DX WORD_SIZE [rsp]
36 LOAD_SYM R1q, mangle(kCoefficientsRgbY)
37 %define WIDTH WORD_SIZE [rsp + gprsize]
48 movzx TEMPd, BYTE [Uq + TEMPq]
49 movq mm0, [TABLE + 2048 + 8 * TEMPq]
52 movzx TEMPd, BYTE [Vq + TEMPq]
53 paddsw mm0, [TABLE + 4096 + 8 * TEMPq]
57 movzx TEMPd, BYTE [Yq + TEMPq]
58 movq mm1, [TABLE + 8 * TEMPq]
62 movzx TEMPd, BYTE [Yq + TEMPq]
63 movq mm2, [TABLE + 8 * TEMPq]
69 MOVQ QWORD [ARGBq], mm1
76 and WIDTH, 1 ; odd number of pixels?
81 movzx TEMPd, BYTE [Uq + TEMPq]
82 movq mm0, [TABLE + 2048 + 8 * TEMPq]
85 movzx TEMPd, BYTE [Vq + TEMPq]
86 paddsw mm0, [TABLE + 4096 + 8 * TEMPq]
89 movzx TEMPd, BYTE [Yq + TEMPq]
90 movq mm1, [TABLE + 8 * TEMPq]
94 movd DWORD [ARGBq], mm1