]> git.sesse.net Git - x264/blobdiff - common/pixel.h
remove unused tables from SPS/PPS. reduces overhead when syncing threads.
[x264] / common / pixel.h
index a8055b5ca9fe3c730e4df67173d8ca1b7b044d14..2016696986e1eb2793260f6564aff337a0950060 100644 (file)
 #define _PIXEL_H 1
 
 typedef int  (*x264_pixel_sad_t) ( uint8_t *, int, uint8_t *, int );
+typedef int  (*x264_pixel_ssd_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 );
 
 enum
 {
@@ -37,6 +39,9 @@ enum
     PIXEL_8x4   = 4,
     PIXEL_4x8   = 5,
     PIXEL_4x4   = 6,
+    PIXEL_4x2   = 7,
+    PIXEL_2x4   = 8,
+    PIXEL_2x2   = 9,
 };
 
 static const struct {
@@ -50,11 +55,21 @@ static const struct {
     {  4,  4 }
 };
 
+static const int x264_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
 {
     x264_pixel_sad_t  sad[7];
+    x264_pixel_ssd_t  ssd[7];
     x264_pixel_satd_t satd[7];
-    x264_pixel_avg_t  avg[7];
+    x264_pixel_avg_t  avg[10];
+    x264_pixel_avg_weight_t avg_weight[10];
 } x264_pixel_function_t;
 
 void x264_pixel_init( int cpu, x264_pixel_function_t *pixf );