[svn] / trunk / xvidcore / src / image / x86_asm / yv12_to_rgb24_mmx.asm Repository:
ViewVC logotype

Diff of /trunk/xvidcore/src/image/x86_asm/yv12_to_rgb24_mmx.asm

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

revision 850, Sat Feb 15 08:39:17 2003 UTC revision 851, Sat Feb 15 15:22:19 2003 UTC
# Line 1  Line 1 
1  ;/*****************************************************************************  ;------------------------------------------------------------------------------
2  ; *  ;
3  ; *  XVID MPEG-4 VIDEO CODEC  ;  This file is part of XviD, a free MPEG-4 video encoder/decoder
4  ; *      mmx yv12 to rgb24 conversion  ;
5  ; *  ;  XviD is free software; you can redistribute it and/or modify it
6  ; *  Copyright (C) 2001 - Michael Militzer <isibaar@xvid.org>  ;  under the terms of the GNU General Public License as published by
7  ; *  ;  the Free Software Foundation; either version 2 of the License, or
8  ; *  This file is part of XviD, a free MPEG-4 video encoder/decoder  ;  (at your option) any later version.
9  ; *  ;
10  ; *  XviD is free software; you can redistribute it and/or modify it  ;  XviD is distributed in the hope that it will be useful, but
11  ; *  under the terms of the GNU General Public License as published by  ;  WITHOUT ANY WARRANTY; without even the implied warranty of
12  ; *  the Free Software Foundation; either version 2 of the License, or  ;  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  ; *  (at your option) any later version.  ;  GNU General Public License for more details.
14  ; *  ;
15  ; *  This program is distributed in the hope that it will be useful,  ;  You should have received a copy of the GNU General Public License
16  ; *  but WITHOUT ANY WARRANTY; without even the implied warranty of  ;  along with this program; if not, write to the Free Software
17  ; *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  ;  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
18  ; *  GNU General Public License for more details.  ;
19  ; *  ;------------------------------------------------------------------------------
20  ; *  You should have received a copy of the GNU General Public License  ;------------------------------------------------------------------------------
21  ; *  along with this program; if not, write to the Free Software  ;
22  ; *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA  ;  yuv_to_rgb24.asm, MMX optimized color conversion
 ; *  
 ; *  Under section 8 of the GNU General Public License, the copyright  
 ; *  holders of XVID explicitly forbid distribution in the following  
 ; *  countries:  
 ; *  
 ; *    - Japan  
 ; *    - United States of America  
 ; *  
 ; *  Linking XviD statically or dynamically with other modules is making a  
 ; *  combined work based on XviD.  Thus, the terms and conditions of the  
 ; *  GNU General Public License cover the whole combination.  
 ; *  
 ; *  As a special exception, the copyright holders of XviD give you  
 ; *  permission to link XviD with independent modules that communicate with  
 ; *  XviD solely through the VFW1.1 and DShow interfaces, regardless of the  
 ; *  license terms of these independent modules, and to copy and distribute  
 ; *  the resulting combined work under terms of your choice, provided that  
 ; *  every copy of the combined work is accompanied by a complete copy of  
 ; *  the source code of XviD (the version of XviD used to produce the  
 ; *  combined work), being distributed under the terms of the GNU General  
 ; *  Public License plus this exception.  An independent module is a module  
 ; *  which is not derived from or based on XviD.  
 ; *  
 ; *  Note that people who make modified versions of XviD are not obligated  
 ; *  to grant this special exception for their modified versions; it is  
 ; *  their choice whether to do so.  The GNU General Public License gives  
 ; *  permission to release a modified version without this exception; this  
 ; *  exception also makes it possible to release a modified version which  
 ; *  carries forward this exception.  
 ; *  
 ; * $Id: yv12_to_rgb24_mmx.asm,v 1.4 2002-11-17 00:20:30 edgomez Exp $  
 ; *  
 ; ****************************************************************************/  
23  ;  ;
24    ;  Copyright (C) 2001 - Michael Militzer <isibaar@xvid.org>
25    ;
26    ;  For more information visit the XviD homepage: http://www.xvid.org
27    ;
28    ;------------------------------------------------------------------------------
29    ;------------------------------------------------------------------------------
30    ;
31    ;  Revision history :
32    ;
33    ;  13.12.2001 initial version  (Isibaar)
34    ;  23.07.2002 Thread safe version (edgomez)
35    ;
36    ; $Id: yv12_to_rgb24_mmx.asm,v 1.5 2003-02-15 15:22:18 edgomez Exp $
37    ;
38    ;------------------------------------------------------------------------------
39  ;------------------------------------------------------------------------------  ;------------------------------------------------------------------------------
40  ; NB:   n contrary to the c implementation this code does the conversion  ; NB:   n contrary to the c implementation this code does the conversion
41  ;      using direct calculations. Input data width must be a multiple of 8  ;      using direct calculations. Input data width must be a multiple of 8
# Line 162  Line 144 
144          sub ebx, ebp                    ; y_src2 -> ebx          sub ebx, ebp                    ; y_src2 -> ebx
145    
146          mov ecx, [esp + 24 + localsize] ; dst_stride -> ecx          mov ecx, [esp + 24 + localsize] ; dst_stride -> ecx
147          mov edx, ecx          shl ecx, 1
148          add ecx, edx          mov edx, ecx                            ; 2 * dst_stride -> ecx
         shl edx, 2  
         add ecx, edx                    ; 6 * dst_stride -> ecx  
         mov edx, ecx  
149          sub ecx, esi          sub ecx, esi
150          shl esi, 1          shl esi, 1
151          sub ecx, esi                    ; 6 * dst_stride - 3 * width -> ecx          sub ecx, esi                            ; 2 * dst_stride - 3 * width -> ecx
152    
153          mov [dst_dif], ecx          mov [dst_dif], ecx
154    
# Line 227  Line 206 
206          add ebx, ebp                    ; y_src2 -> ebp          add ebx, ebp                    ; y_src2 -> ebp
207    
208          mov ecx, [esp + 24 + localsize] ; dst_stride -> ecx          mov ecx, [esp + 24 + localsize] ; dst_stride -> ecx
209          mov edx, ecx          shl ecx, 1
210          add ecx, edx          mov edx, ecx                            ; 2 * dst_stride -> ecx
         shl edx, 2  
         add ecx, edx                    ; 6 * dst_stride -> ecx  
         mov edx, ecx  
211          sub ecx, esi          sub ecx, esi
212          shl esi, 1          shl esi, 1
213          sub ecx, esi                    ; 6 * dst_stride - 3 * width -> ecx          sub ecx, esi                    ; 2 * dst_stride - 3 * width -> ecx
214    
215          mov [dst_dif], ecx          mov [dst_dif], ecx
216    

Legend:
Removed from v.850  
changed lines
  Added in v.851

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