void *x264_realloc( void *p, int i_size );
void x264_free( void * );
+/* x264_slurp_file: malloc space for the whole file and read it */
+char *x264_slurp_file( const char *filename );
+
/* mdate: return the current date in microsecond */
int64_t x264_mdate( void );
int i_nal_ref_idc; /* threads only */
/* We use only one SPS and one PPS */
- x264_sps_t sps_array[32];
+ x264_sps_t sps_array[1];
x264_sps_t *sps;
- x264_pps_t pps_array[256];
+ x264_pps_t pps_array[1];
x264_pps_t *pps;
int i_idr_pic_id;
+ int dequant4_mf[4][6][4][4];
+ int dequant8_mf[2][6][8][8];
+ int quant4_mf[4][6][4][4];
+ int quant8_mf[2][6][8][8];
+
/* Slice header */
x264_slice_header_t sh;
{
DECLARE_ALIGNED( int, luma16x16_dc[16], 16 );
DECLARE_ALIGNED( int, chroma_dc[2][4], 16 );
+ // FIXME merge with union
+ DECLARE_ALIGNED( int, luma8x8[4][64], 16 );
union
{
DECLARE_ALIGNED( int, residual_ac[15], 16 );
/* neighboring MBs */
unsigned int i_neighbour;
+ unsigned int i_neighbour8[4]; /* neighbours of each 8x8 or 4x4 block that are available */
+ unsigned int i_neighbour4[16]; /* at the time the block is coded */
int i_mb_type_top;
int i_mb_type_left;
+ int i_mb_type_topleft;
+ int i_mb_type_topright;
/* mb table */
int8_t *type; /* mb type */
int8_t *ref[2]; /* mb ref. set to -1 if non used (intra or Lx only) */
int16_t (*mvr[2][16])[2]; /* 16x16 mv for each possible ref */
int8_t *skipbp; /* block pattern for SKIP or DIRECT (sub)mbs. B-frames + cabac only */
+ int8_t *mb_transform_size; /* transform_size_8x8_flag of each mb */
/* current value */
int i_type;
int i_partition;
int i_sub_partition[4];
+ int b_transform_8x8;
int i_cbp_luma;
int i_cbp_chroma;
/* cache */
struct
{
- /* real intra4x4_pred_mode if I_4X4, I_PRED_4x4_DC if mb available, -1 if not */
+ /* real intra4x4_pred_mode if I_4X4 or I_8X8, I_PRED_4x4_DC if mb available, -1 if not */
int intra4x4_pred_mode[X264_SCAN8_SIZE];
/* i_non_zero_count if availble else 0x80 */
int16_t direct_mv[2][X264_SCAN8_SIZE][2];
int8_t direct_ref[2][X264_SCAN8_SIZE];
+
+ /* number of neighbors (top and left) that used 8x8 dct */
+ int i_neighbour_transform_size;
+ int b_transform_8x8_allowed;
} cache;
/* */
+ int i_qp; /* current qp */
int i_last_qp; /* last qp */
int i_last_dqp; /* last delta qp */
int b_variable_qp; /* whether qp is allowed to vary per macroblock */
+ int b_lossless;
/* B_direct and weighted prediction */
int dist_scale_factor[16][16];
/* ? */
int i_misc_bits;
/* MB type counts */
- int i_mb_count[18];
+ int i_mb_count[19];
+ int i_mb_count_i;
int i_mb_count_p;
int i_mb_count_skip;
+ int i_mb_count_8x8dct[2];
/* Estimated (SATD) cost as Intra/Predicted frame */
/* XXX: both omit the cost of MBs coded as P_SKIP */
int i_intra_cost;
float f_psnr_mean_u[5];
float f_psnr_mean_v[5];
/* */
- int64_t i_mb_count[5][18];
+ int64_t i_mb_count[5][19];
+ int64_t i_mb_count_8x8dct[2];
} stat;
/* CPU functions dependants */
x264_predict_t predict_16x16[4+3];
- x264_predict_t predict_8x8[4+3];
+ x264_predict_t predict_8x8c[4+3];
+ x264_predict8x8_t predict_8x8[9+3];
x264_predict_t predict_4x4[9+3];
x264_pixel_function_t pixf;