[Ffmpeg-devel] [PATCH] Fix --disable-opts compilation

Panagiotis Issaris takis.issaris
Thu Mar 15 14:50:03 CET 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Michael Niedermayer schreef:
> On Wed, Mar 14, 2007 at 05:19:23PM +0100, Panagiotis Issaris wrote:
>> Panagiotis Issaris schreef:
>>> The attached patch fixes the compilation of FFmpeg when configured using
>>> --disable-opts. This patch depends on patches [1] en [2] posted earlier
>>> today.
>>>
>>>  cabac.h |    4 ++--
>>>  h264.c  |    2 +-
>>>  2 files changed, 3 insertions(+), 3 deletions(-)
>>>
>>> Note: It is still needed to use the --disable-mmx flag to have ffmpeg
>>> linked successfully.
>>
>>> With friendly regards,
>>> Takis
>>>
>>> [1][PATCH] Check whether EBX is available
>>> http://article.gmane.org/gmane.comp.video.ffmpeg.devel/46434
>>> [2] Re: [BUG] Compilation failure when using --disable-opts
>>> http://article.gmane.org/gmane.comp.video.ffmpeg.devel/46433
>> Oops, forgot to attach it... Here it is.
> 
> and i forgot x86_64 ...
No, not really forgotten, I explicitly removed them because of an
earlier comment on this mailinglist questioning it.


> [...]
>> diff --git a/libavcodec/cabac.h b/libavcodec/cabac.h
>> index fc9fc6d..e8b1b88 100644
>> --- a/libavcodec/cabac.h
>> +++ b/libavcodec/cabac.h
>> @@ -376,7 +376,7 @@ static int av_always_inline get_cabac_inline(CABACContext *c, uint8_t * const st
>>  #define BYTE        "16"
>>  #define BYTEEND     "20"
>>  #endif
>> -#if defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__))
>> +#if defined(ARCH_X86) && defined(CONFIG_EBP) && defined(CONFIG_EBX)
>>      int bit;
> 
> this is wrong it explicitly refers to EBX but not top EBP it just uses 7
> registers which with x86-32 means ebp must be used
> correct would be
I'm having difficulties parsing the above :) But, I think you are trying
to say that the real problem is that seven registers are needed in that
specific piece on inline assembly. Which are not available on x86_32 if
a basepointer is used. Right?

Well, I just implemented your earlier suggestion [1] and I am not sure
if I really like the new one... Shouldn't this entire architecture
specific code be moved into i386/?

> #if defined(ARCH_X86) && defined(CONFIG_7REGS) && defined(CONFIG_EBX)
> 
> and in a central header
> #if defined(ARCH_X86_64) || (defined(ARCH_X86_32) && defined(CONFIG_EBX) && defined(CONFIG_EBP))
> #define CONFIG_7REGS 1
> #endif
> 
> 
> [...]


With friendly regards,
Takis

[1] http://article.gmane.org/gmane.comp.video.ffmpeg.devel/46115
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF+U8L9kOxLuzz4CkRAviNAJ9lHhXlancCdLP//kmD9X5f0K+N4ACdGZZ1
t0+6eTvHI82pReOpETgZ1p8=
=Oy/u
-----END PGP SIGNATURE-----




More information about the ffmpeg-devel mailing list