[FFmpeg-devel] [PATCH] fix compilation when BRANCHLESS_CABAC_DECODER is not set
Reimar Döffinger
Reimar.Doeffinger
Thu Dec 11 18:47:43 CET 2008
Hello,
some of the conditions are wrong so compilation false when commenting the
#define BRANCHLESS_CABAC_DECODER 1
in cabac.h.
Attached patch fixes it.
-------------- next part --------------
Index: libavcodec/i386/h264_i386.h
===================================================================
--- libavcodec/i386/h264_i386.h (revision 16055)
+++ libavcodec/i386/h264_i386.h (working copy)
@@ -35,7 +35,8 @@
//as that would make optimization work hard)
#if defined(ARCH_X86) && defined(HAVE_7REGS) && \
defined(HAVE_EBX_AVAILABLE) && \
- !defined(BROKEN_RELOCATIONS)
+ !defined(BROKEN_RELOCATIONS) && \
+ defined(BRANCHLESS_CABAC_DECODER)
static int decode_significance_x86(CABACContext *c, int max_coeff,
uint8_t *significant_coeff_ctx_base,
int *index){
@@ -150,6 +151,7 @@
return coeff_count;
}
#endif /* defined(ARCH_X86) && defined(HAVE_7REGS) && */
- /* defined(HAVE_EBX_AVAILABLE) && !defined(BROKEN_RELOCATIONS) */
+ /* defined(HAVE_EBX_AVAILABLE) && !defined(BROKEN_RELOCATIONS) && */
+ /* defined(BRANCHLESS_CABAC_DECODER) */
#endif /* AVCODEC_I386_H264_I386_H */
Index: libavcodec/h264.c
===================================================================
--- libavcodec/h264.c (revision 16055)
+++ libavcodec/h264.c (working copy)
@@ -5199,7 +5212,8 @@
index[coeff_count++] = last;\
}
const uint8_t *sig_off = significant_coeff_flag_offset_8x8[MB_FIELD];
-#if defined(ARCH_X86) && defined(HAVE_7REGS) && defined(HAVE_EBX_AVAILABLE) && !defined(BROKEN_RELOCATIONS)
+#if defined(ARCH_X86) && defined(HAVE_7REGS) && defined(HAVE_EBX_AVAILABLE) && !defined(BROKEN_RELOCATIONS) && \
+ defined(BRANCHLESS_CABAC_DECODER)
coeff_count= decode_significance_8x8_x86(CC, significant_coeff_ctx_base, index, sig_off);
} else {
coeff_count= decode_significance_x86(CC, max_coeff, significant_coeff_ctx_base, index);
More information about the ffmpeg-devel
mailing list