~ubuntu-branches/ubuntu/intrepid/x264/intrepid

« back to all changes in this revision

Viewing changes to common/x86/pixel.h

  • Committer: Bazaar Package Importer
  • Author(s): John Dong
  • Date: 2008-05-03 01:12:18 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20080503011218-3l7ra58egb7gezht
Tags: 1:0.svn20080408-0.0ubuntu1
* Merge from debian-multimedia. Remaining Ubuntu changes:
 - Maintainer field
 - Set epoch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*****************************************************************************
 
2
 * mc.h: h264 encoder library
 
3
 *****************************************************************************
 
4
 * Copyright (C) 2003-2008 Laurent Aimar
 
5
 *
 
6
 * Authors: Laurent Aimar <fenrir@via.ecp.fr>
 
7
 *          Loren Merritt <lorenm@u.washington.edu>
 
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 _I386_PIXEL_H
 
25
#define _I386_PIXEL_H 1
 
26
 
 
27
#define DECL_PIXELS( ret, name, suffix, args ) \
 
28
    ret x264_pixel_##name##_16x16_##suffix args;\
 
29
    ret x264_pixel_##name##_16x8_##suffix args;\
 
30
    ret x264_pixel_##name##_8x16_##suffix args;\
 
31
    ret x264_pixel_##name##_8x8_##suffix args;\
 
32
    ret x264_pixel_##name##_8x4_##suffix args;\
 
33
    ret x264_pixel_##name##_4x8_##suffix args;\
 
34
    ret x264_pixel_##name##_4x4_##suffix args;\
 
35
 
 
36
#define DECL_X1( name, suffix ) \
 
37
    DECL_PIXELS( int, name, suffix, ( uint8_t *, int, uint8_t *, int ) )
 
38
 
 
39
#define DECL_X4( name, suffix ) \
 
40
    DECL_PIXELS( void, name##_x3, suffix, ( uint8_t *, uint8_t *, uint8_t *, uint8_t *, int, int * ) )\
 
41
    DECL_PIXELS( void, name##_x4, suffix, ( uint8_t *, uint8_t *, uint8_t *, uint8_t *, uint8_t *, int, int * ) )
 
42
 
 
43
DECL_X1( sad, mmxext )
 
44
DECL_X1( sad, sse2 )
 
45
DECL_X1( sad, sse3 )
 
46
DECL_X4( sad, mmxext )
 
47
DECL_X4( sad, sse2 )
 
48
DECL_X4( sad, sse3 )
 
49
DECL_X1( ssd, mmx )
 
50
DECL_X1( ssd, sse2 )
 
51
DECL_X1( satd, mmxext )
 
52
DECL_X1( satd, sse2 )
 
53
DECL_X1( satd, ssse3 )
 
54
DECL_X1( sa8d, mmxext )
 
55
DECL_X1( sa8d, sse2 )
 
56
DECL_X1( sa8d, ssse3 )
 
57
DECL_X1( sad, cache32_mmxext );
 
58
DECL_X1( sad, cache64_mmxext );
 
59
DECL_X1( sad, cache64_sse2 );
 
60
DECL_X1( sad, cache64_ssse3 );
 
61
DECL_X4( sad, cache32_mmxext );
 
62
DECL_X4( sad, cache64_mmxext );
 
63
DECL_X4( sad, cache64_sse2 );
 
64
DECL_X4( sad, cache64_ssse3 );
 
65
 
 
66
#undef DECL_PIXELS
 
67
#undef DECL_X1
 
68
#undef DECL_X4
 
69
 
 
70
void x264_intra_satd_x3_4x4_mmxext( uint8_t *, uint8_t *, int * );
 
71
void x264_intra_satd_x3_4x4_ssse3( uint8_t *, uint8_t *, int * );
 
72
void x264_intra_satd_x3_8x8c_mmxext( uint8_t *, uint8_t *, int * );
 
73
void x264_intra_satd_x3_8x8c_ssse3( uint8_t *, uint8_t *, int * );
 
74
void x264_intra_satd_x3_16x16_mmxext( uint8_t *, uint8_t *, int * );
 
75
void x264_intra_satd_x3_16x16_ssse3( uint8_t *, uint8_t *, int * );
 
76
void x264_intra_sa8d_x3_8x8_mmxext( uint8_t *, uint8_t *, int * );
 
77
void x264_intra_sa8d_x3_8x8_sse2( uint8_t *, uint8_t *, int * );
 
78
void x264_intra_sa8d_x3_8x8_ssse3( uint8_t *, uint8_t *, int * );
 
79
void x264_intra_sa8d_x3_8x8_core_mmxext( uint8_t *, int16_t [2][8], int * );
 
80
void x264_intra_sa8d_x3_8x8_core_sse2( uint8_t *, int16_t [2][8], int * );
 
81
void x264_intra_sa8d_x3_8x8_core_ssse3( uint8_t *, int16_t [2][8], int * );
 
82
 
 
83
void x264_pixel_ssim_4x4x2_core_mmxext( const uint8_t *pix1, int stride1,
 
84
                                        const uint8_t *pix2, int stride2, int sums[2][4] );
 
85
void x264_pixel_ssim_4x4x2_core_sse2( const uint8_t *pix1, int stride1,
 
86
                                      const uint8_t *pix2, int stride2, int sums[2][4] );
 
87
float x264_pixel_ssim_end4_sse2( int sum0[5][4], int sum1[5][4], int width );
 
88
 
 
89
#define DECL_ADS( size, suffix ) \
 
90
int x264_pixel_ads##size##_##suffix( int enc_dc[size], uint16_t *sums, int delta,\
 
91
                                     uint16_t *cost_mvx, int16_t *mvs, int width, int thresh );
 
92
DECL_ADS( 4, mmxext )
 
93
DECL_ADS( 2, mmxext )
 
94
DECL_ADS( 1, mmxext )
 
95
DECL_ADS( 4, sse2 )
 
96
DECL_ADS( 2, sse2 )
 
97
DECL_ADS( 1, sse2 )
 
98
DECL_ADS( 4, ssse3 )
 
99
DECL_ADS( 2, ssse3 )
 
100
DECL_ADS( 1, ssse3 )
 
101
#undef DECL_ADS
 
102
 
 
103
#endif