#define IS_DISPOSABLE(type) ( type == X264_TYPE_B )
#define FIX8(f) ((int)(f*(1<<8)+.5))
#define ALIGN(x,a) (((x)+((a)-1))&~((a)-1))
+#define ARRAY_ELEMS(a) ((sizeof(a))/(sizeof(a[0])))
#define CHECKED_MALLOC( var, size )\
do {\
memset( var, 0, size );\
} while( 0 )
+#define ARRAY_SIZE(array) (sizeof(array)/sizeof(array[0]))
+
#define X264_BFRAME_MAX 16
#define X264_REF_MAX 16
#define X264_THREAD_MAX 128
#include <assert.h>
#include <limits.h>
+#if HAVE_OPENCL
+#include "opencl.h"
+#endif
+
#if HAVE_INTERLACED
# define MB_INTERLACED h->mb.b_interlaced
# define SLICE_MBAFF h->sh.b_mbaff
};
#include "x264.h"
+#include "cabac.h"
#include "bitstream.h"
#include "set.h"
#include "predict.h"
#include "mc.h"
#include "frame.h"
#include "dct.h"
-#include "cabac.h"
#include "quant.h"
#include "cpu.h"
#include "threadpool.h"
/* Current MB DCT coeffs */
struct
{
- ALIGNED_16( dctcoef luma16x16_dc[3][16] );
+ ALIGNED_N( dctcoef luma16x16_dc[3][16] );
ALIGNED_16( dctcoef chroma_dc[2][8] );
// FIXME share memory?
- ALIGNED_16( dctcoef luma8x8[12][64] );
- ALIGNED_16( dctcoef luma4x4[16*3][16] );
+ ALIGNED_N( dctcoef luma8x8[12][64] );
+ ALIGNED_N( dctcoef luma4x4[16*3][16] );
} dct;
/* MB table and cache for current frame/mb */
#define FENC_STRIDE 16
#define FDEC_STRIDE 32
ALIGNED_16( pixel fenc_buf[48*FENC_STRIDE] );
- ALIGNED_16( pixel fdec_buf[52*FDEC_STRIDE] );
+ ALIGNED_N( pixel fdec_buf[52*FDEC_STRIDE] );
/* i4x4 and i8x8 backup data, for skipping the encode stage when possible */
ALIGNED_16( pixel i4x4_fdec_buf[16*16] );
struct visualize_t *visualize;
#endif
x264_lookahead_t *lookahead;
+
+#if HAVE_OPENCL
+ x264_opencl_t opencl;
+#endif
};
// included at the end because it needs x264_t