[svn] / branches / dev-api-4 / xvidcore / src / image / x86_asm / colorspace_yuyv_mmx.asm Repository:
ViewVC logotype

Diff of /branches/dev-api-4/xvidcore/src/image/x86_asm/colorspace_yuyv_mmx.asm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1191, Mon Oct 27 01:03:43 2003 UTC revision 1192, Tue Oct 28 22:23:03 2003 UTC
# Line 1  Line 1 
1  ;/**************************************************************************  ;/****************************************************************************
2  ; *  ; *
3  ; *     XVID MPEG-4 VIDEO CODEC  ; *     XVID MPEG-4 VIDEO CODEC
4  ; *     colorspace  ; *  - MMX and XMM YUYV<->YV12 conversion -
5  ; *  ; *
6  ; *     This program is free software; you can redistribute it and/or modify  ; *  Copyright(C) 2002 Peter Ross <pross@xvid.org>
7  ; *     it under the terms of the GNU General Public License as published by  ; *
8    ; *  This program is free software; you can redistribute it and/or modify it
9    ; *  under the terms of the GNU General Public License as published by
10  ; *     the Free Software Foundation; either version 2 of the License, or  ; *     the Free Software Foundation; either version 2 of the License, or
11  ; *     (at your option) any later version.  ; *     (at your option) any later version.
12  ; *  ; *
# Line 15  Line 17 
17  ; *  ; *
18  ; *     You should have received a copy of the GNU General Public License  ; *     You should have received a copy of the GNU General Public License
19  ; *     along with this program; if not, write to the Free Software  ; *     along with this program; if not, write to the Free Software
20  ; *     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  ; *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 ; *  
 ; *************************************************************************/  
   
 ;/**************************************************************************  
21  ; *  ; *
22  ; *     History:  ; * $Id: colorspace_yuyv_mmx.asm,v 1.2.2.1 2003-10-28 22:23:03 edgomez Exp $
23  ; *  ; *
24  ; *     10.10.2001      initial version; (c)2002 peter ross <pross@xvid.org>  ; ***************************************************************************/
 ; *  
 ; *************************************************************************/  
   
25    
26  bits 32  BITS 32
27    
28  %macro cglobal 1  %macro cglobal 1
29          %ifdef PREFIX          %ifdef PREFIX
# Line 39  Line 34 
34          %endif          %endif
35  %endmacro  %endmacro
36    
37    ;=============================================================================
38    ; Read only data
39    ;=============================================================================
40    
41  section .data  SECTION .rodata
 align 16  
   
42    
43    ;-----------------------------------------------------------------------------
 ;===========================================================================  
44  ; yuyv/uyvy mask for extracting yuv components  ; yuyv/uyvy mask for extracting yuv components
45  ;===========================================================================  ;-----------------------------------------------------------------------------
46  ;                               y     u     y     v     y     u     y     v  ;                               y     u     y     v     y     u     y     v
 yuyv_mask       db      0xff, 0,    0xff, 0,    0xff, 0,    0xff, 0  
 mmx_one         dw      1,      1,      1,      1  
   
   
   
 section .text  
   
 %include "colorspace_mmx.inc"  
47    
48    ALIGN 16
49    yuyv_mask:      db 0xff,  0,  0xff,   0,   0xff,  0,   0xff,  0
50    mmx_one:    dw 1, 1, 1, 1
51    
52    ;=============================================================================
53    ; helper macros used with colorspace_mmx.inc
54    ;=============================================================================
55    
56  ;====================================================================  ;-----------------------------------------------------------------------------
57  ; YUYV_TO_YV12( TYPE, PAVG )  ; YUYV_TO_YV12( TYPE, PAVG )
58  ;  ;
59  ; TYPE  0=yuyv, 1=uyvy  ; TYPE  0=yuyv, 1=uyvy
60  ; PAVG  0=mmx, pavgusb=3dnow, pavgb=xmm  ; PAVG  0=mmx, pavgusb=3dnow, pavgb=xmm
61  ;  ;
62  ; bytes=2, pixels = 8, vpixels=2  ; bytes=2, pixels = 8, vpixels=2
63  ;====================================================================  ;-----------------------------------------------------------------------------
64    
65  %macro YUYV_TO_YV12_INIT                2  %macro YUYV_TO_YV12_INIT                2
66                  movq mm7, [yuyv_mask]                  movq mm7, [yuyv_mask]
67  %endmacro  %endmacro
# Line 160  Line 155 
155                  movd [ebx],mm5                  movd [ebx],mm5
156                  movd [ecx],mm4                  movd [ecx],mm4
157  %endmacro  %endmacro
 ;====================================================================  
   
158    
159  ;------------------------------------------------------------------------------  ;-----------------------------------------------------------------------------
160  ; YV12_TO_YUYV( TYPE )  ; YV12_TO_YUYV( TYPE )
161  ;  ;
162  ; TYPE  0=yuyv, 1=uyvy  ; TYPE  0=yuyv, 1=uyvy
163  ;  ;
164  ; bytes=2, pixels = 8, vpixels=2  ; bytes=2, pixels = 8, vpixels=2
165  ;------------------------------------------------------------------------------  ;-----------------------------------------------------------------------------
166    
167  %macro YV12_TO_YUYV_INIT                2  %macro YV12_TO_YUYV_INIT                2
168  %endmacro  %endmacro
169    
# Line 206  Line 200 
200                  movq [edi+edx+8], mm7                  movq [edi+edx+8], mm7
201  %endif  %endif
202  %endmacro  %endmacro
 ;------------------------------------------------------------------------------  
   
203    
204  ;------------------------------------------------------------------------------  ;------------------------------------------------------------------------------
205  ; YV12_TO_YUYVI( TYPE )  ; YV12_TO_YUYVI( TYPE )
# Line 216  Line 208 
208  ;  ;
209  ; bytes=2, pixels = 8, vpixels=4  ; bytes=2, pixels = 8, vpixels=4
210  ;------------------------------------------------------------------------------  ;------------------------------------------------------------------------------
211    
212  %macro YV12_TO_YUYVI_INIT               2  %macro YV12_TO_YUYVI_INIT               2
213  %endmacro  %endmacro
214    
# Line 297  Line 290 
290                  pop esi                  pop esi
291  %endif  %endif
292  %endmacro  %endmacro
 ;------------------------------------------------------------------------------  
293    
294    ;=============================================================================
295    ; Code
296    ;=============================================================================
297    
298    SECTION .text
299    
300    %include "colorspace_mmx.inc"
301    
302  ; input  ; input
303    

Legend:
Removed from v.1191  
changed lines
  Added in v.1192

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4