+ /**
+ * halfpel luma planes.
+ */
+ uint8_t *interpolated[3];
+ int16_t (*motion_val_base[2])[2];
+ uint32_t *mb_type_base;
+#define MB_TYPE_INTRA MB_TYPE_INTRA4x4 //default mb_type if theres just one type
+#define IS_INTRA4x4(a) ((a)&MB_TYPE_INTRA4x4)
+#define IS_INTRA16x16(a) ((a)&MB_TYPE_INTRA16x16)
+#define IS_PCM(a) ((a)&MB_TYPE_INTRA_PCM)
+#define IS_INTRA(a) ((a)&7)
+#define IS_INTER(a) ((a)&(MB_TYPE_16x16|MB_TYPE_16x8|MB_TYPE_8x16|MB_TYPE_8x8))
+#define IS_SKIP(a) ((a)&MB_TYPE_SKIP)
+#define IS_INTRA_PCM(a) ((a)&MB_TYPE_INTRA_PCM)
+#define IS_INTERLACED(a) ((a)&MB_TYPE_INTERLACED)
+#define IS_DIRECT(a) ((a)&MB_TYPE_DIRECT2)
+#define IS_GMC(a) ((a)&MB_TYPE_GMC)
+#define IS_16X16(a) ((a)&MB_TYPE_16x16)
+#define IS_16X8(a) ((a)&MB_TYPE_16x8)
+#define IS_8X16(a) ((a)&MB_TYPE_8x16)
+#define IS_8X8(a) ((a)&MB_TYPE_8x8)
+#define IS_SUB_8X8(a) ((a)&MB_TYPE_16x16) //note reused
+#define IS_SUB_8X4(a) ((a)&MB_TYPE_16x8) //note reused
+#define IS_SUB_4X8(a) ((a)&MB_TYPE_8x16) //note reused
+#define IS_SUB_4X4(a) ((a)&MB_TYPE_8x8) //note reused
+#define IS_ACPRED(a) ((a)&MB_TYPE_ACPRED)
+#define IS_QUANT(a) ((a)&MB_TYPE_QUANT)
+#define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0<<((part)+2*(list))))
+#define USES_LIST(a, list) ((a) & ((MB_TYPE_P0L0|MB_TYPE_P1L0)<<(2*(list)))) ///< does this mb use listX, note doesnt work if subMBs
+#define HAS_CBP(a) ((a)&MB_TYPE_CBP)
+
+ int field_poc[2]; ///< h264 top/bottom POC
+ int poc; ///< h264 frame POC
+ int frame_num; ///< h264 frame_num
+ int pic_id; ///< h264 pic_num or long_term_pic_idx
+ int long_ref; ///< 1->long term reference 0->short term reference
+ int ref_poc[2][16]; ///< h264 POCs of the frames used as reference
+ int ref_count[2]; ///< number of entries in ref_poc
+
+ int mb_var_sum; ///< sum of MB variance for current frame
+ int mc_mb_var_sum; ///< motion compensated MB variance for current frame
+ uint16_t *mb_var; ///< Table for MB variances
+ uint16_t *mc_mb_var; ///< Table for motion compensated MB variances
+ uint8_t *mb_mean; ///< Table for MB luminance
+ int32_t *mb_cmp_score; ///< Table for MB cmp scores, for mb decision FIXME remove