MBAFF: Add frame/field MB stats
[x262.git] / common / common.h
index 38d7d43..7768571 100644 (file)
@@ -92,6 +92,16 @@ do {\
 #include <assert.h>
 #include <limits.h>
 
+#if HAVE_INTERLACED
+#   define MB_INTERLACED h->mb.b_interlaced
+#   define SLICE_MBAFF h->sh.b_mbaff
+#   define PARAM_INTERLACED h->param.b_interlaced
+#else
+#   define MB_INTERLACED 0
+#   define SLICE_MBAFF 0
+#   define PARAM_INTERLACED 0
+#endif
+
 /* Unions for type-punning.
  * Mn: load or store n bits, aligned, native-endian
  * CPn: copy n bits, aligned, native-endian
@@ -814,6 +824,7 @@ struct x264_t
             int i_mb_partition[17];
             int i_mb_cbp[6];
             int i_mb_pred_mode[4][13];
+            int i_mb_field[3];
             /* Adaptive direct mv pred */
             int i_direct_score[2];
             /* Metrics */
@@ -843,6 +854,7 @@ struct x264_t
         int64_t i_mb_count_ref[2][2][X264_REF_MAX*2];
         int64_t i_mb_cbp[6];
         int64_t i_mb_pred_mode[4][13];
+        int64_t i_mb_field[3];
         /* */
         int     i_direct_score[2];
         int     i_direct_frames[2];