1 |
;/************************************************************************** |
;/**************************************************************************** |
2 |
; * |
; * |
3 |
; * XVID MPEG-4 VIDEO CODEC |
; * XVID MPEG-4 VIDEO CODEC |
4 |
; * mmx cbp calc |
; * - MMX CBP computation - |
5 |
; * |
; * |
6 |
; * This program is an implementation of a part of one or more MPEG-4 |
; * Copyright (C) 2001-2003 Peter Ross <pross@xvid.org> |
7 |
; * Video tools as specified in ISO/IEC 14496-2 standard. Those intending |
; * 2002-2003 Pascal Massimino <skal@planet-d.net> |
|
; * to use this software module in hardware or software products are |
|
|
; * advised that its use may infringe existing patents or copyrights, and |
|
|
; * any such use would be at such party's own risk. The original |
|
|
; * developer of this software module and his/her company, and subsequent |
|
|
; * editors and their companies, will have no liability for use of this |
|
|
; * software or modifications or derivatives thereof. |
|
8 |
; * |
; * |
9 |
; * This program is free software; you can redistribute it and/or modify |
; * This program is free software; you can redistribute it and/or modify |
10 |
; * it under the terms of the GNU General Public License as published by |
; * it under the terms of the GNU General Public License as published by |
18 |
; * |
; * |
19 |
; * You should have received a copy of the GNU General Public License |
; * You should have received a copy of the GNU General Public License |
20 |
; * along with this program; if not, write to the Free Software |
; * along with this program; if not, write to the Free Software |
21 |
; * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
; * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
22 |
; * |
; * |
23 |
; *************************************************************************/ |
; * $Id$ |
|
|
|
|
;/************************************************************************** |
|
|
; * |
|
|
; * History: |
|
|
; * |
|
|
; * 14.06.2002 some further tweaks by -Skal- |
|
|
; * 24.11.2001 inital version; (c)2001 peter ross <pross@cs.rmit.edu.au> |
|
24 |
; * |
; * |
25 |
; *************************************************************************/ |
; ***************************************************************************/ |
26 |
|
|
27 |
|
BITS 32 |
28 |
|
|
29 |
bits 32 |
;============================================================================= |
30 |
|
; Macros |
31 |
section .data |
;============================================================================= |
32 |
|
|
33 |
%macro cglobal 1 |
%macro cglobal 1 |
34 |
%ifdef PREFIX |
%ifdef PREFIX |
39 |
%endif |
%endif |
40 |
%endmacro |
%endmacro |
41 |
|
|
42 |
align 16 |
;============================================================================= |
43 |
|
; Local data |
44 |
|
;============================================================================= |
45 |
|
|
46 |
|
%ifdef FORMAT_COFF |
47 |
|
SECTION .rodata data |
48 |
|
%else |
49 |
|
SECTION .rodata data align=16 |
50 |
|
%endif |
51 |
|
|
52 |
|
ALIGN 16 |
53 |
|
|
54 |
|
ignore_dc: |
55 |
|
dw 0, -1, -1, -1, -1, -1, -1, -1 |
56 |
|
|
57 |
ignore_dc dw 0, -1, -1, -1, -1, -1, -1, -1 |
;============================================================================= |
58 |
|
; Code |
59 |
|
;============================================================================= |
60 |
|
|
61 |
section .text |
SECTION .text |
62 |
|
|
63 |
cglobal calc_cbp_mmx |
cglobal calc_cbp_mmx |
64 |
|
|
65 |
;=========================================================================== |
;----------------------------------------------------------------------------- |
|
; |
|
66 |
; uint32_t calc_cbp_mmx(const int16_t coeff[6][64]); |
; uint32_t calc_cbp_mmx(const int16_t coeff[6][64]); |
67 |
; |
;----------------------------------------------------------------------------- |
|
;=========================================================================== |
|
68 |
|
|
69 |
align 16 |
ALIGN 16 |
70 |
calc_cbp_mmx: |
calc_cbp_mmx: |
71 |
push ebx |
push ebx |
72 |
push esi |
push esi |