1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-10-02 17:12:49 +02:00

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>
This commit is contained in:
Anthoine Bourgeois 2014-04-09 12:18:32 +02:00 committed by Michael Niedermayer
parent 7ac2f7e413
commit d8ab7f31dd

View File

@ -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;