Fix compilation when using the --disable-opts parameter. This to help those
interested in using a debugger to debug FFmpeg. Original thread: Subject: [PATCH] Fix compilation when using --disable-opts Date: 2007-03-15 16:58:35 GMT Originally committed as revision 8549 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
d1b2356998
commit
449659919c
37
configure
vendored
37
configure
vendored
@ -542,6 +542,8 @@ CONFIG_LIST='
|
|||||||
bktr
|
bktr
|
||||||
dc1394
|
dc1394
|
||||||
dv1394
|
dv1394
|
||||||
|
ebp_available
|
||||||
|
ebx_available
|
||||||
ffmpeg
|
ffmpeg
|
||||||
ffplay
|
ffplay
|
||||||
ffserver
|
ffserver
|
||||||
@ -1190,6 +1192,10 @@ ar="${cross_prefix}${ar}"
|
|||||||
ranlib="${cross_prefix}${ranlib}"
|
ranlib="${cross_prefix}${ranlib}"
|
||||||
strip="${cross_prefix}${strip}"
|
strip="${cross_prefix}${strip}"
|
||||||
|
|
||||||
|
# Disable core dumps so that intentional execution of broken apps doesn't
|
||||||
|
# pollute the current directory.
|
||||||
|
ulimit -c 0
|
||||||
|
|
||||||
# we need to build at least one lib type
|
# we need to build at least one lib type
|
||||||
if disabled_all static shared; then
|
if disabled_all static shared; then
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
@ -1391,6 +1397,37 @@ if test "$?" != 0; then
|
|||||||
die "C compiler test failed."
|
die "C compiler test failed."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test $arch = "x86_32" -o $arch = "x86_64"; then
|
||||||
|
if test "$targetos" = "mingw32" -o "$targetos" = "CYGWIN"; then
|
||||||
|
cat <<EOF
|
||||||
|
WARNING: The following test might cause a testapp to crash (intentionally)
|
||||||
|
resulting in the appearance of a dialog box. Please click "Don't send" and
|
||||||
|
ignore it.
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
# check whether EBP is available on x86
|
||||||
|
# As 'i' is stored on the stack, this program will crash
|
||||||
|
# if the base pointer is used to access it because the
|
||||||
|
# base pointer is cleared in the inline assembly code.
|
||||||
|
check_exec <<EOF && enable ebp_available
|
||||||
|
int main(){
|
||||||
|
volatile int i=0;
|
||||||
|
asm volatile (
|
||||||
|
"xorl %%ebp, %%ebp"
|
||||||
|
::: "%ebp");
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# check wether EBX is available on x86
|
||||||
|
check_cc <<EOF && enable ebx_available
|
||||||
|
int main(){
|
||||||
|
asm volatile ("":::"%ebx");
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
# check for assembler specific support
|
# check for assembler specific support
|
||||||
|
|
||||||
if test $arch = "powerpc"; then
|
if test $arch = "powerpc"; then
|
||||||
|
@ -376,7 +376,7 @@ static int av_always_inline get_cabac_inline(CABACContext *c, uint8_t * const st
|
|||||||
#define BYTE "16"
|
#define BYTE "16"
|
||||||
#define BYTEEND "20"
|
#define BYTEEND "20"
|
||||||
#endif
|
#endif
|
||||||
#if defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__))
|
#if defined(ARCH_X86) && defined(CONFIG_7REGS) && defined(CONFIG_EBX_AVAILABLE)
|
||||||
int bit;
|
int bit;
|
||||||
|
|
||||||
#ifndef BRANCHLESS_CABAC_DECODER
|
#ifndef BRANCHLESS_CABAC_DECODER
|
||||||
@ -680,7 +680,7 @@ static av_always_inline int get_cabac_bypass_sign(CABACContext *c, int val){
|
|||||||
|
|
||||||
//FIXME the x86 code from this file should be moved into i386/h264 or cabac something.c/h (note ill kill you if you move my code away from under my fingers before iam finished with it!)
|
//FIXME the x86 code from this file should be moved into i386/h264 or cabac something.c/h (note ill kill you if you move my code away from under my fingers before iam finished with it!)
|
||||||
//FIXME use some macros to avoid duplicatin get_cabac (cant be done yet as that would make optimization work hard)
|
//FIXME use some macros to avoid duplicatin get_cabac (cant be done yet as that would make optimization work hard)
|
||||||
#if defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__))
|
#if defined(ARCH_X86) && defined(CONFIG_7REGS) && defined(CONFIG_EBX_AVAILABLE)
|
||||||
static int decode_significance_x86(CABACContext *c, int max_coeff, uint8_t *significant_coeff_ctx_base, int *index){
|
static int decode_significance_x86(CABACContext *c, int max_coeff, uint8_t *significant_coeff_ctx_base, int *index){
|
||||||
void *end= significant_coeff_ctx_base + max_coeff - 1;
|
void *end= significant_coeff_ctx_base + max_coeff - 1;
|
||||||
int minusstart= -(int)significant_coeff_ctx_base;
|
int minusstart= -(int)significant_coeff_ctx_base;
|
||||||
|
@ -6111,7 +6111,7 @@ static int decode_cabac_residual( H264Context *h, DCTELEM *block, int cat, int n
|
|||||||
index[coeff_count++] = last;\
|
index[coeff_count++] = last;\
|
||||||
}
|
}
|
||||||
const uint8_t *sig_off = significant_coeff_flag_offset_8x8[MB_FIELD];
|
const uint8_t *sig_off = significant_coeff_flag_offset_8x8[MB_FIELD];
|
||||||
#if defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__))
|
#if defined(ARCH_X86) && defined(CONFIG_7REGS) && defined(CONFIG_EBX_AVAILABLE)
|
||||||
coeff_count= decode_significance_8x8_x86(CC, significant_coeff_ctx_base, index, sig_off);
|
coeff_count= decode_significance_8x8_x86(CC, significant_coeff_ctx_base, index, sig_off);
|
||||||
} else {
|
} else {
|
||||||
coeff_count= decode_significance_x86(CC, max_coeff, significant_coeff_ctx_base, index);
|
coeff_count= decode_significance_x86(CC, max_coeff, significant_coeff_ctx_base, index);
|
||||||
|
@ -57,4 +57,8 @@
|
|||||||
# define REGSP esp
|
# define REGSP esp
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(ARCH_X86_64) || (defined(ARCH_X86_32) && defined(CONFIG_EBX_AVAILABLE) && defined(CONFIG_EBP_AVAILABLE))
|
||||||
|
# define CONFIG_7REGS 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* AVUTIL_X86CPU_H */
|
#endif /* AVUTIL_X86CPU_H */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user