1 /*****************************************************************************
2 * pixel.h: h264 encoder library
3 *****************************************************************************
4 * Copyright (C) 2003 Laurent Aimar
5 * $Id: pixel.h,v 1.1 2004/06/03 19:27:07 fenrir Exp $
7 * Authors: Laurent Aimar <fenrir@via.ecp.fr>
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.
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.
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 *****************************************************************************/
27 typedef int (*x264_pixel_cmp_t) ( uint8_t *, int, uint8_t *, int );
46 } x264_pixel_size[7] = {
54 static const int x264_size2pixel[5][5] = {
56 { 0, PIXEL_4x4, PIXEL_8x4, 0, 0 },
57 { 0, PIXEL_4x8, PIXEL_8x8, 0, PIXEL_16x8 },
59 { 0, 0, PIXEL_8x16, 0, PIXEL_16x16 }
64 x264_pixel_cmp_t sad[7];
65 x264_pixel_cmp_t ssd[7];
66 x264_pixel_cmp_t satd[7];
67 x264_pixel_cmp_t sa8d[4];
68 x264_pixel_cmp_t mbcmp[7]; /* either satd or sad for subpel refine and mode decision */
69 } x264_pixel_function_t;
71 void x264_pixel_init( int cpu, x264_pixel_function_t *pixf );
72 int64_t x264_pixel_ssd_wxh( x264_pixel_function_t *pf, uint8_t *pix1, int i_pix1, uint8_t *pix2, int i_pix2, int i_width, int i_height );