📄 pixel.h
字号:
/***************************************************************************** * pixel.h: h264 encoder library ***************************************************************************** * Copyright (C) 2003 Laurent Aimar * $Id: pixel.h,v 1.1 2004/06/03 19:27:07 fenrir Exp $ * * Authors: Laurent Aimar <fenrir@via.ecp.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. *****************************************************************************/#ifndef _PIXEL_H#define _PIXEL_H 1typedef int (*SHU264_pixel_cmp_t) ( uint8_t *, int, uint8_t *, int );enum{ PIXEL_16x16 = 0, PIXEL_16x8 = 1, PIXEL_8x16 = 2, PIXEL_8x8 = 3, PIXEL_8x4 = 4, PIXEL_4x8 = 5, PIXEL_4x4 = 6, PIXEL_4x2 = 7, PIXEL_2x4 = 8, PIXEL_2x2 = 9,};static const struct { int w; int h;} SHU264_pixel_size[7] = { { 16, 16 }, { 16, 8 }, { 8, 16 }, { 8, 8 }, { 8, 4 }, { 4, 8 }, { 4, 4 }};static const int SHU264_size2pixel[5][5] = { { 0, }, { 0, PIXEL_4x4, PIXEL_8x4, 0, 0 }, { 0, PIXEL_4x8, PIXEL_8x8, 0, PIXEL_16x8 }, { 0, }, { 0, 0, PIXEL_8x16, 0, PIXEL_16x16 }};typedef struct{ SHU264_pixel_cmp_t sad[7]; SHU264_pixel_cmp_t ssd[7]; SHU264_pixel_cmp_t satd[7]; SHU264_pixel_cmp_t sa8d[4]; SHU264_pixel_cmp_t mbcmp[7]; /* either satd or sad for subpel refine and mode decision */} SHU264_pixel_function_t;void SHU264_pixel_init( int cpu, SHU264_pixel_function_t *pixf );int64_t SHU264_pixel_ssd_wxh( SHU264_pixel_function_t *pf, uint8_t *pix1, int i_pix1, uint8_t *pix2, int i_pix2, int i_width, int i_height );#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -