1 |
;------------------------------------------------------------------------------ |
;/***************************************************************************** |
2 |
; |
; * |
3 |
; This file is part of XviD, a free MPEG-4 video encoder/decoder |
; * XVID MPEG-4 VIDEO CODEC |
4 |
; |
; * mmx yuv planar to yv12 conversion |
5 |
; This program is free software; you can redistribute it and/or modify it |
; * |
6 |
; under the terms of the GNU General Public License as published by |
; * Copyright (C) 2001 - Michael Militzer <isibaar@xvid.org> |
7 |
; the Free Software Foundation; either version 2 of the License, or |
; * |
8 |
; (at your option) any later version. |
; * This program is an implementation of a part of one or more MPEG-4 |
9 |
; |
; * Video tools as specified in ISO/IEC 14496-2 standard. Those intending |
10 |
; This program is distributed in the hope that it will be useful, but |
; * to use this software module in hardware or software products are |
11 |
; WITHOUT ANY WARRANTY; without even the implied warranty of |
; * advised that its use may infringe existing patents or copyrights, and |
12 |
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
; * any such use would be at such party's own risk. The original |
13 |
; GNU General Public License for more details. |
; * developer of this software module and his/her company, and subsequent |
14 |
; |
; * editors and their companies, will have no liability for use of this |
15 |
; You should have received a copy of the GNU General Public License |
; * software or modifications or derivatives thereof. |
16 |
; along with this program; if not, write to the Free Software |
; * |
17 |
; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
; * This program is free software; you can redistribute it and/or modify |
18 |
; |
; * it under the terms of the GNU General Public License as published by |
19 |
;------------------------------------------------------------------------------ |
; * the Free Software Foundation; either version 2 of the License, or |
20 |
;------------------------------------------------------------------------------ |
; * (at your option) any later version. |
21 |
; |
; * |
22 |
; yuv_to_yuv.asm, MMX optimized color conversion |
; * This program is distributed in the hope that it will be useful, |
23 |
; |
; * but WITHOUT ANY WARRANTY; without even the implied warranty of |
24 |
; Copyright (C) 2001 - Michael Militzer <isibaar@xvid.org> |
; * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
25 |
; |
; * GNU General Public License for more details. |
26 |
; For more information visit the XviD homepage: http://www.xvid.org |
; * |
27 |
; |
; * You should have received a copy of the GNU General Public License |
28 |
;------------------------------------------------------------------------------ |
; * along with this program; if not, write to the Free Software |
29 |
;------------------------------------------------------------------------------ |
; * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
30 |
; |
; * |
31 |
; Revision history: |
; * $Id$ |
32 |
; |
; * |
33 |
; 24.11.2001 initial version (Isibaar) |
; ****************************************************************************/ |
|
; 23.07.2002 thread safe (edgomez) |
|
|
; |
|
|
; $Id$ |
|
|
; |
|
|
;------------------------------------------------------------------------------ |
|
34 |
|
|
35 |
BITS 32 |
BITS 32 |
36 |
|
|
37 |
%macro cglobal 1 |
%macro cglobal 1 |
38 |
%ifdef PREFIX |
%ifdef PREFIX |
39 |
global _%1 |
global _%1 |
40 |
; $Id$ |
%define %1 _%1 |
41 |
%else |
%else |
42 |
global %1 |
global %1 |
43 |
%endif |
%endif |
81 |
mov esi, [esp + 32 + localsize] ; src -> esi |
mov esi, [esp + 32 + localsize] ; src -> esi |
82 |
mov edi, [esp + 20 + localsize] ; y_out -> edi |
mov edi, [esp + 20 + localsize] ; y_out -> edi |
83 |
mov ecx, [esp + 36 + localsize] ; width -> ecx |
mov ecx, [esp + 36 + localsize] ; width -> ecx |
84 |
%define remainder esp + 4 |
|
85 |
sub ebx, ecx ; stride - width -> ebx |
sub ebx, ecx ; stride - width -> ebx |
86 |
|
|
87 |
mov edx, ecx |
mov edx, ecx |
331 |
mov ebx, [esp + 44 + localsize] ; stride -> ebx |
mov ebx, [esp + 44 + localsize] ; stride -> ebx |
332 |
mov esi, [esp + 32 + localsize] ; src -> esi |
mov esi, [esp + 32 + localsize] ; src -> esi |
333 |
mov edi, [esp + 20 + localsize] ; y_out -> edi |
mov edi, [esp + 20 + localsize] ; y_out -> edi |
334 |
%define remainder esp + 4 |
mov ecx, [esp + 36 + localsize] ; width -> ecx |
335 |
|
|
336 |
sub ebx, ecx ; stride - width -> ebx |
sub ebx, ecx ; stride - width -> ebx |
337 |
|
|