]> git.sesse.net Git - x264/blobdiff - common/common.h
Get rid of hardcoded parameters in speedcontrol. This allows SAR changes.
[x264] / common / common.h
index 76ae8a3c79dbfd3bb266f6547995dad2eb0c62ce..9cb045b6c9430faa6a964314e815ecd14613a97a 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * common.h: misc common functions
  *****************************************************************************
- * Copyright (C) 2003-2014 x264 project
+ * Copyright (C) 2003-2016 x264 project
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *          Loren Merritt <lorenm@u.washington.edu>
@@ -447,6 +447,7 @@ typedef struct x264_lookahead_t
 } x264_lookahead_t;
 
 typedef struct x264_ratecontrol_t   x264_ratecontrol_t;
+typedef struct x264_speedcontrol_t  x264_speedcontrol_t;
 
 typedef struct x264_left_table_t
 {
@@ -891,13 +892,11 @@ struct x264_t
 
     /* rate control encoding only */
     x264_ratecontrol_t *rc;
+    x264_speedcontrol_t *sc;
 
     /* stats */
     struct
     {
-        /* Current frame stats */
-        x264_frame_stat_t frame;
-
         /* Cumulated stats */
 
         /* per slice info */
@@ -927,6 +926,8 @@ struct x264_t
         /* num p-frames weighted */
         int     i_wpred[2];
 
+        /* Current frame stats */
+        x264_frame_stat_t frame;
     } stat;
 
     /* 0 = luma 4x4, 1 = luma 8x8, 2 = chroma 4x4, 3 = chroma 8x8 */
@@ -974,6 +975,12 @@ struct x264_t
 #endif
 };
 
+typedef struct
+{
+    int sad;
+    int16_t mv[2];
+} mvsad_t;
+
 // included at the end because it needs x264_t
 #include "macroblock.h"