#define XCHG(type,a,b) do{ type t = a; a = b; b = t; } while(0)
#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 CHECKED_MALLOC( var, size )\
do {\
#include "common.h"
-#define ALIGN(x,a) (((x)+((a)-1))&~((a)-1))
-
x264_frame_t *x264_frame_new( x264_t *h, int b_fdec )
{
x264_frame_t *frame;
if( h->param.analyse.i_weighted_pred )
{
int i_padv = PADV << h->param.b_interlaced;
-#define ALIGN(x,a) (((x)+((a)-1))&~((a)-1))
int align = h->param.cpu&X264_CPU_CACHELINE_64 ? 64 : h->param.cpu&X264_CPU_CACHELINE_32 ? 32 : 16;
int i_stride, luma_plane_size = 0;
int numweightbuf;
for( int i = 0; i < numweightbuf; i++ )
CHECKED_MALLOC( h->mb.p_weight_buf[i], luma_plane_size * sizeof(pixel) );
-#undef ALIGN
}
return 0;