]> git.sesse.net Git - x264/blob - common/cpu.h
remove colorspace conversion support, because it has no business in any codec
[x264] / common / cpu.h
1 /*****************************************************************************
2  * cpu.h: h264 encoder library
3  *****************************************************************************
4  * Copyright (C) 2003 Laurent Aimar
5  * $Id: cpu.h,v 1.1 2004/06/03 19:27:06 fenrir Exp $
6  *
7  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
8  *
9  * 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
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
22  *****************************************************************************/
23
24 #ifndef _CPU_H
25 #define _CPU_H 1
26
27 uint32_t x264_cpu_detect( void );
28 int      x264_cpu_num_processors( void );
29
30 /* probably MMX(EXT) centric but .... */
31 void     x264_cpu_restore( uint32_t cpu );
32
33 /* kluge:
34  * gcc can't give variables any greater alignment than the stack frame has.
35  * We need 16 byte alignment for SSE2, so here we make sure that the stack is
36  * aligned to 16 bytes.
37  * gcc 4.2 introduced __attribute__((force_align_arg_pointer)) to fix this
38  * problem, but I don't want to require such a new version.
39  * This applies only to x86_32, since other architectures that need alignment
40  * also have ABIs that ensure aligned stack. */
41 #if defined(ARCH_X86) && defined(HAVE_MMX)
42 void x264_stack_align( void (*func)(x264_t*), x264_t *arg );
43 #else
44 #define x264_stack_align(func,arg) func(arg)
45 #endif
46
47 #endif