Diego Biurrun <[email protected]> writes: > On Tue, Dec 20, 2011 at 06:25:51PM +0000, Måns Rullgård wrote: >> Diego Biurrun <[email protected]> writes: >> > The definition and the call site where under different #ifdefs. >> > --- >> > libavcodec/h264_cabac.c | 2 +- >> > 1 files changed, 1 insertions(+), 1 deletions(-) >> > >> > --- a/libavcodec/h264_cabac.c >> > +++ b/libavcodec/h264_cabac.c >> > @@ -1656,7 +1656,7 @@ decode_cabac_residual_internal(H264Context *h, >> > DCTELEM *block, >> > index[coeff_count++] = last;\ >> > } >> > const uint8_t *sig_off = >> > significant_coeff_flag_offset_8x8[MB_FIELD]; >> > -#if ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE && >> > !defined(BROKEN_RELOCATIONS) >> > +#if ARCH_X86 && HAVE_6REGS && !defined(BROKEN_RELOCATIONS) >> > coeff_count= decode_significance_8x8_x86(CC, >> > significant_coeff_ctx_base, index, >> > last_coeff_ctx_base, >> > sig_off); >> >> Did you test this with the picky compilers that broke with my first patch? > > No, but what difference can it make? > > before my patch: > > h264_cabac.c: #if ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE && > !defined(BROKEN_RELOCATIONS) > x86/h264_i386.h: HAVE_6REGS && !defined(BROKEN_RELOCATIONS) > > after my patch: > > h264_cabac.c: #if ARCH_X86 && HAVE_6REGS && !defined(BROKEN_RELOCATIONS) > x86/h264_i386.h: HAVE_6REGS && !defined(BROKEN_RELOCATIONS) > > The compiler will only see the optimized functions if the preprocessor > does not remove them. But the optimized functions are already visible > under the more relaxed preprocessor directive...
If the function is not called, it will not be compiled, no register allocation will take place and consequently cannot fail. Relaxing those conditions was too optimistic of me. Please make sure your version builds on x86-32 with PIC. -- Måns Rullgård [email protected] _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
