aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnthoine Bourgeois <anthoine.bourgeois@gmail.com>2014-04-09 12:18:32 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-22 00:21:28 +0200
commitb546b7a029a6409a4e6324f81ca8a89767ea02b0 (patch)
treed274b95dfab157f342e215666e77d51db6288922
parent8f596a45998e9e515bab76a2ba438e4718f9f2de (diff)
downloadffmpeg-b546b7a029a6409a4e6324f81ca8a89767ea02b0.tar.gz
avcodec/dirac_arith: Fix build with PIC and stack-check options
Fixes Ticket3540 The function dirac_get_arith_bit in libavcodec/dirac_arith.h can't be built with PIC and check-stack because the asm code needs 6 registers and PIC and check-stack options take 1 each and x86 is quite limited in this area. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit d8ab7f31dd819f7b3e0d460a2fa4261aaae87b98) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/dirac_arith.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/dirac_arith.h b/libavcodec/dirac_arith.h
index f9a8bba5fd..089c71a698 100644
--- a/libavcodec/dirac_arith.h
+++ b/libavcodec/dirac_arith.h
@@ -28,6 +28,7 @@
#ifndef AVCODEC_DIRAC_ARITH_H
#define AVCODEC_DIRAC_ARITH_H
+#include "libavutil/x86/asm.h"
#include "bytestream.h"
#include "get_bits.h"
@@ -134,7 +135,7 @@ static inline int dirac_get_arith_bit(DiracArith *c, int ctx)
range_times_prob = (c->range * prob_zero) >> 16;
-#if HAVE_FAST_CMOV && HAVE_INLINE_ASM
+#if HAVE_FAST_CMOV && HAVE_INLINE_ASM && HAVE_6REGS
low -= range_times_prob << 16;
range -= range_times_prob;
bit = 0;