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

Side by Side Diff: media/base/simd/linear_scale_yuv_to_rgb_mmx_x64.asm

Issue 242643011: Add correct support for videos with YUVJ420P color format, in the software conversion path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@yuvnopic
Patch Set: YUVJ browsertest now passes, update expectation Created 6 years, 7 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 unified diff | Download patch
OLDNEW
1 ; Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 ; Use of this source code is governed by a BSD-style license that can be
3 ; found in the LICENSE file. 3 ; found in the LICENSE file.
4 4
5 %include "media/base/simd/media_export.asm" 5 %include "media/base/simd/media_export.asm"
6 %include "third_party/x86inc/x86inc.asm" 6 %include "third_party/x86inc/x86inc.asm"
7 7
8 ; 8 ;
9 ; This file uses MMX instructions. 9 ; This file uses MMX instructions.
10 ; 10 ;
(...skipping 14 matching lines...) Expand all
25 %assign stack_offset 0 25 %assign stack_offset 0
26 extern mangle(kCoefficientsRgbY) 26 extern mangle(kCoefficientsRgbY)
27 27
28 ; Parameters are in the following order: 28 ; Parameters are in the following order:
29 ; 1. Y plane 29 ; 1. Y plane
30 ; 2. U plane 30 ; 2. U plane
31 ; 3. V plane 31 ; 3. V plane
32 ; 4. ARGB frame 32 ; 4. ARGB frame
33 ; 5. Width 33 ; 5. Width
34 ; 6. Source dx 34 ; 6. Source dx
35 ; 7. Conversion lookup table
35 36
36 PROLOGUE 6, 7, 3, Y, U, V, ARGB, WIDTH, SOURCE_DX, COMPL 37 PROLOGUE 7, 7, 3, Y, U, V, ARGB, WIDTH, SOURCE_DX, R1
37 38
38 %define TABLEq r10 39 %define TABLEq r10
39 %define Xq r11 40 %define Xq r11
40 %define INDEXq r12 41 %define INDEXq r12
41 %define COMPRd r13d 42 %define COMPRd r13d
42 %define COMPRq r13 43 %define COMPRq r13
43 %define FRACTIONq r14 44 %define FRACTIONq r14
45 %define COMPL R1
46 %define COMPLq R1q
47 %define COMPLd R1d
44 48
45 PUSH TABLEq 49 PUSH TABLEq
46 PUSH Xq 50 PUSH Xq
47 PUSH INDEXq 51 PUSH INDEXq
48 PUSH COMPRq 52 PUSH COMPRq
49 PUSH FRACTIONq 53 PUSH FRACTIONq
50 54
51 %macro EPILOGUE 0 55 %macro EPILOGUE 0
52 POP FRACTIONq 56 POP FRACTIONq
53 POP COMPRq 57 POP COMPRq
54 POP INDEXq 58 POP INDEXq
55 POP Xq 59 POP Xq
56 POP TABLEq 60 POP TABLEq
57 %endmacro 61 %endmacro
58 62
59 LOAD_SYM TABLEq, mangle(kCoefficientsRgbY) 63 mov TABLEq, R1q
60 64
61 imul WIDTHq, SOURCE_DXq ; source_width = width * source_dx 65 imul WIDTHq, SOURCE_DXq ; source_width = width * source_dx
62 xor Xq, Xq ; x = 0 66 xor Xq, Xq ; x = 0
63 cmp SOURCE_DXq, 0x20000 67 cmp SOURCE_DXq, 0x20000
64 jl .lscaleend 68 jl .lscaleend
65 mov Xq, 0x8000 ; x = 0.5 for 1/2 or less 69 mov Xq, 0x8000 ; x = 0.5 for 1/2 or less
66 jmp .lscaleend 70 jmp .lscaleend
67 71
68 .lscaleloop: 72 .lscaleloop:
69 ; Interpolate U 73 ; Interpolate U
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 144
141 .lscalelastpixel: 145 .lscalelastpixel:
142 paddsw mm1, mm0 146 paddsw mm1, mm0
143 psraw mm1, 6 147 psraw mm1, 6
144 packuswb mm1, mm1 148 packuswb mm1, mm1
145 movd [ARGBq], mm1 149 movd [ARGBq], mm1
146 150
147 .epilogue 151 .epilogue
148 EPILOGUE 152 EPILOGUE
149 RET 153 RET
OLDNEW
« no previous file with comments | « media/base/simd/linear_scale_yuv_to_rgb_mmx.inc ('k') | media/base/simd/scale_yuv_to_rgb_mmx.asm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698