1 |
; Originally provided by Intel at AP-922 |
;/***************************************************************************** |
2 |
; http://developer.intel.com/vtune/cbts/strmsimd/922down.htm |
; * |
3 |
; (See more app notes at http://developer.intel.com/vtune/cbts/strmsimd/appnotes.htm) |
; * XVID MPEG-4 VIDEO CODEC |
4 |
; but in a limited edition. |
; * mmx version - inverse discrete cosine transformation |
5 |
; New macro implements a column part for precise iDCT |
; * |
6 |
; The routine precision now satisfies IEEE standard 1180-1990. |
; * Initial version provided by Intel at AppNote AP-922 |
7 |
; |
; * Copyright (C) 1999 Intel Corporation, |
8 |
; Copyright (c) 2000-2001 Peter Gubanov <peter@elecard.net.ru> |
; * |
9 |
; Rounding trick Copyright (c) 2000 Michel Lespinasse <walken@zoy.org> |
; * Modifications |
10 |
; |
; * Copyright (c) 2000-2001 Peter Gubanov <peter@elecard.net.ru> |
11 |
; http://www.elecard.com/peter/idct.html |
; * Copyright (c) 2000 Michel Lespinasse <walken@zoy.org> |
12 |
; http://www.linuxvideo.org/mpeg2dec/ |
; * |
13 |
; |
; * ported to NASM and some minor changes |
14 |
|
; * Copyright (C) 2001 Peter Ross <pross@xvid.org> |
15 |
|
; * |
16 |
|
; * This file is part of XviD, a free MPEG-4 video encoder/decoder |
17 |
|
; * |
18 |
|
; * XviD is free software; you can redistribute it and/or modify it |
19 |
|
; * under the terms of the GNU General Public License as published by |
20 |
|
; * the Free Software Foundation; either version 2 of the License, or |
21 |
|
; * (at your option) any later version. |
22 |
|
; * |
23 |
|
; * This program is distributed in the hope that it will be useful, |
24 |
|
; * but WITHOUT ANY WARRANTY; without even the implied warranty of |
25 |
|
; * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
26 |
|
; * GNU General Public License for more details. |
27 |
|
; * |
28 |
|
; * You should have received a copy of the GNU General Public License |
29 |
|
; * along with this program; if not, write to the Free Software |
30 |
|
; * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
31 |
|
; * |
32 |
|
; * Under section 8 of the GNU General Public License, the copyright |
33 |
|
; * holders of XVID explicitly forbid distribution in the following |
34 |
|
; * countries: |
35 |
|
; * |
36 |
|
; * - Japan |
37 |
|
; * - United States of America |
38 |
|
; * |
39 |
|
; * Linking XviD statically or dynamically with other modules is making a |
40 |
|
; * combined work based on XviD. Thus, the terms and conditions of the |
41 |
|
; * GNU General Public License cover the whole combination. |
42 |
|
; * |
43 |
|
; * As a special exception, the copyright holders of XviD give you |
44 |
|
; * permission to link XviD with independent modules that communicate with |
45 |
|
; * XviD solely through the VFW1.1 and DShow interfaces, regardless of the |
46 |
|
; * license terms of these independent modules, and to copy and distribute |
47 |
|
; * the resulting combined work under terms of your choice, provided that |
48 |
|
; * every copy of the combined work is accompanied by a complete copy of |
49 |
|
; * the source code of XviD (the version of XviD used to produce the |
50 |
|
; * combined work), being distributed under the terms of the GNU General |
51 |
|
; * Public License plus this exception. An independent module is a module |
52 |
|
; * which is not derived from or based on XviD. |
53 |
|
; * |
54 |
|
; * Note that people who make modified versions of XviD are not obligated |
55 |
|
; * to grant this special exception for their modified versions; it is |
56 |
|
; * their choice whether to do so. The GNU General Public License gives |
57 |
|
; * permission to release a modified version without this exception; this |
58 |
|
; * exception also makes it possible to release a modified version which |
59 |
|
; * carries forward this exception. |
60 |
|
; * |
61 |
|
; * $Id$ |
62 |
|
; * |
63 |
|
; *************************************************************************/ |
64 |
|
|
65 |
;============================================================================= |
;============================================================================= |
66 |
; |
; |
67 |
; These examples contain code fragments for first stage iDCT 8x8 |
; These examples contain code fragments for first stage iDCT 8x8 |
68 |
; (for rows) and first stage DCT 8x8 (for columns) |
; (for rows) and first stage DCT 8x8 (for columns) |
69 |
; |
; |
70 |
;============================================================================= |
;============================================================================= |
|
; |
|
|
; 04.11.2001 nasm conversion; peter ross <pross@cs.rmit.edu.au> |
|
|
; |
|
71 |
|
|
72 |
bits 32 |
bits 32 |
73 |
|
|
92 |
%define SHIFT_FRW_ROW BITS_FRW_ACC + 17 |
%define SHIFT_FRW_ROW BITS_FRW_ACC + 17 |
93 |
%define RND_FRW_ROW 262144 * (BITS_FRW_ACC - 1) ; 1 << (SHIFT_FRW_ROW-1) |
%define RND_FRW_ROW 262144 * (BITS_FRW_ACC - 1) ; 1 << (SHIFT_FRW_ROW-1) |
94 |
|
|
95 |
|
%ifdef FORMAT_COFF |
96 |
|
section .data data |
97 |
|
%else |
98 |
section .data data align=16 |
section .data data align=16 |
99 |
|
%endif |
100 |
|
|
101 |
align 16 |
align 16 |
102 |
|
|