* This applies only to x86_32, since other architectures that need alignment
* also have ABIs that ensure aligned stack. */
#if defined(ARCH_X86) && defined(HAVE_MMX)
-void x264_stack_align( void (*func)(x264_t*), x264_t *arg );
+int x264_stack_align( void (*func)(x264_t*), x264_t *arg );
+#define x264_stack_align(func,arg) x264_stack_align((void (*)(x264_t*))func,arg)
#else
#define x264_stack_align(func,arg) func(arg)
#endif
return 0;
}
- x264_slicetype_decide( h );
+ x264_stack_align( x264_slicetype_decide, h );
/* 3: move some B-frames and 1 non-B to encode queue */
while( IS_X264_TYPE_B( h->frames.next[bframes]->i_type ) )
expected_size = qscale2bits(&rce, q);
expected_vbv = rcc->buffer_fill + rcc->buffer_rate - expected_size;
}
- rcc->last_satd = x264_rc_analyse_slice( h );
+ rcc->last_satd = x264_stack_align( x264_rc_analyse_slice, h );
}
q = x264_clip3f( q, lmin, lmax );
}
double wanted_bits, overflow=1, lmin, lmax;
- rcc->last_satd = x264_rc_analyse_slice( h );
+ rcc->last_satd = x264_stack_align( x264_rc_analyse_slice, h );
rcc->short_term_cplxsum *= 0.5;
rcc->short_term_cplxcount *= 0.5;
rcc->short_term_cplxsum += rcc->last_satd;