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

Side by Side Diff: media/base/simd/convert_rgb_to_yuv_ssse3.inc

Issue 15151002: Streamline SIMD targets in media.gyp (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add Win64 hack. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « media/base/simd/convert_rgb_to_yuv_ssse3.asm ('k') | media/base/simd/convert_yuv_to_rgb.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ; 5 ;
6 ; void SYMBOL(const uint8* argb, uint8* y, uint8* u, uint8* v, int width); 6 ; void SYMBOL(const uint8* argb, uint8* y, uint8* u, uint8* v, int width);
7 ; 7 ;
8 ; The main code that converts RGB pixels to YUV pixels. This function roughly 8 ; The main code that converts RGB pixels to YUV pixels. This function roughly
9 ; consists of three parts: converting one ARGB pixel to YUV pixels, converting 9 ; consists of three parts: converting one ARGB pixel to YUV pixels, converting
10 ; two ARGB pixels to YUV pixels, and converting four ARGB pixels to YUV pixels. 10 ; two ARGB pixels to YUV pixels, and converting four ARGB pixels to YUV pixels.
11 ; To write the structure of this function in C, it becomes the snippet listed 11 ; To write the structure of this function in C, it becomes the snippet listed
12 ; below. 12 ; below.
13 ; 13 ;
14 ; if (width & 1) { 14 ; if (width & 1) {
15 ; --width; 15 ; --width;
16 ; // Convert one ARGB pixel to one Y pixel, one U pixel, and one V pixel. 16 ; // Convert one ARGB pixel to one Y pixel, one U pixel, and one V pixel.
17 ; } 17 ; }
18 ; 18 ;
19 ; if (width & 2) { 19 ; if (width & 2) {
20 ; width -= 2; 20 ; width -= 2;
21 ; // Convert two ARGB pixels to two Y pixels, one U pixel, and one V pixel. 21 ; // Convert two ARGB pixels to two Y pixels, one U pixel, and one V pixel.
22 ; } 22 ; }
23 ; 23 ;
24 ; while (width) { 24 ; while (width) {
25 ; width -= 4; 25 ; width -= 4;
26 ; // Convert four ARGB pixels to four Y pixels, two U pixels, and two V 26 ; // Convert four ARGB pixels to four Y pixels, two U pixels, and two V
27 ; // pixels. 27 ; // pixels.
28 ; } 28 ; }
29 ; 29 ;
30 global mangle(SYMBOL) PRIVATE 30 EXPORT SYMBOL
31 align function_align 31 align function_align
32 32
33 mangle(SYMBOL): 33 mangle(SYMBOL):
34 %assign stack_offset 0 34 %assign stack_offset 0
35 PROLOGUE 5, 6, 8, ARGB, Y, U, V, WIDTH, TEMP 35 PROLOGUE 5, 6, 8, ARGB, Y, U, V, WIDTH, TEMP
36 36
37 ; Initialize constants used in this function. (We use immediates to avoid 37 ; Initialize constants used in this function. (We use immediates to avoid
38 ; dependency onto GOT.) 38 ; dependency onto GOT.)
39 LOAD_XMM XMM_CONST_Y0, 0x00420219 39 LOAD_XMM XMM_CONST_Y0, 0x00420219
40 LOAD_XMM XMM_CONST_Y1, 0x00007F00 40 LOAD_XMM XMM_CONST_Y1, 0x00007F00
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 %if SUBSAMPLING == 0 191 %if SUBSAMPLING == 0
192 .convert_four_pixels_unaligned_next: 192 .convert_four_pixels_unaligned_next:
193 %endif 193 %endif
194 194
195 test WIDTHq, WIDTHq 195 test WIDTHq, WIDTHq
196 jnz .convert_four_pixels_unaligned 196 jnz .convert_four_pixels_unaligned
197 197
198 .convert_finish: 198 .convert_finish:
199 ; Just exit this function since this is a void function. 199 ; Just exit this function since this is a void function.
200 RET 200 RET
OLDNEW
« no previous file with comments | « media/base/simd/convert_rgb_to_yuv_ssse3.asm ('k') | media/base/simd/convert_yuv_to_rgb.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698