]> git.sesse.net Git - x264/blobdiff - common/pixel.h
allow non-mod16 resolutions
[x264] / common / pixel.h
index 63f60fcff1f0de334be32e247afb475fc2b8ba0e..f8012bab0898e7a1ce94ea5f9f1968ad889dcb0b 100644 (file)
 #ifndef _PIXEL_H
 #define _PIXEL_H 1
 
-typedef int  (*x264_pixel_sad_t) ( uint8_t *, int, uint8_t *, int );
-typedef int  (*x264_pixel_satd_t)( uint8_t *, int, uint8_t *, int );
-typedef void (*x264_pixel_avg_t) ( uint8_t *, int, uint8_t *, int );
-typedef void (*x264_pixel_avg_weight_t) ( uint8_t *, int, uint8_t *, int, int );
+typedef int  (*x264_pixel_cmp_t) ( uint8_t *, int, uint8_t *, int );
 
 enum
 {
@@ -64,12 +61,14 @@ static const int x264_size2pixel[5][5] = {
 
 typedef struct
 {
-    x264_pixel_sad_t  sad[7];
-    x264_pixel_satd_t satd[7];
-    x264_pixel_avg_t  avg[10];
-    x264_pixel_avg_weight_t avg_weight[10];
+    x264_pixel_cmp_t  sad[7];
+    x264_pixel_cmp_t  ssd[7];
+    x264_pixel_cmp_t satd[7];
+    x264_pixel_cmp_t sa8d[4];
+    x264_pixel_cmp_t mbcmp[7]; /* either satd or sad for subpel refine and mode decision */
 } x264_pixel_function_t;
 
 void x264_pixel_init( int cpu, x264_pixel_function_t *pixf );
+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 );
 
 #endif