[FFmpeg-cvslog] x86: Tighten register constraints for decode_significance*_x86.
Diego Biurrun
git at videolan.org
Thu Dec 22 02:05:03 CET 2011
ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Wed Dec 21 11:39:39 2011 +0100| [6fdb2ce34a765de95c0fe341cbcbfa0b1a21a82d] | committer: Diego Biurrun
x86: Tighten register constraints for decode_significance*_x86.
On 32-bit OS X with gcc 4.0/4.2 and shared libraries enabled, the ebx register
is not available, but required to assemble the functions.
This reverts commit 8742a4f to a simplified version of the original constraints.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6fdb2ce34a765de95c0fe341cbcbfa0b1a21a82d
---
libavcodec/h264_cabac.c | 2 +-
libavcodec/x86/h264_i386.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c
index fdeb1ba..a96f52e 100644
--- 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_6REGS && !defined(BROKEN_RELOCATIONS)
+#if ARCH_X86 && HAVE_EBX_AVAILABLE && !defined(BROKEN_RELOCATIONS)
coeff_count= decode_significance_8x8_x86(CC, significant_coeff_ctx_base, index,
last_coeff_ctx_base, sig_off);
} else {
diff --git a/libavcodec/x86/h264_i386.h b/libavcodec/x86/h264_i386.h
index 50e80d0..6cd81fe 100644
--- a/libavcodec/x86/h264_i386.h
+++ b/libavcodec/x86/h264_i386.h
@@ -36,7 +36,7 @@
//FIXME use some macros to avoid duplicating get_cabac (cannot be done yet
//as that would make optimization work hard)
-#if HAVE_6REGS && !defined(BROKEN_RELOCATIONS)
+#if HAVE_EBX_AVAILABLE && !defined(BROKEN_RELOCATIONS)
static int decode_significance_x86(CABACContext *c, int max_coeff,
uint8_t *significant_coeff_ctx_base,
int *index, x86_reg last_off){
@@ -144,6 +144,6 @@ static int decode_significance_8x8_x86(CABACContext *c,
);
return coeff_count;
}
-#endif /* HAVE_6REGS && !defined(BROKEN_RELOCATIONS) */
+#endif /* HAVE_EBX_AVAILABLE && !defined(BROKEN_RELOCATIONS) */
#endif /* AVCODEC_X86_H264_I386_H */
More information about the ffmpeg-cvslog
mailing list