[Ffmpeg-devel] GCC4 Fix
Mean
fixounet
Thu May 12 23:01:12 CEST 2005
Michael Niedermayer wrote:
>Hi
>
>On Thursday 12 May 2005 19:48, Zan Lynx wrote:
>
>
>>(Not a list subscriber, please CC replies)
>>
>>Somewhat related to the last GCC 4 fix, I'd like to mention that AMD64
>>has a lot more registers. That leads to problems with the asm code in
>>libavcodec/libpostproc/postprocess_template.c.
>>
>>
>
>what do you mean with problem? error messages, ...
>
>
>
>
>>For example, around line 3645, the asm restrictions for "x" and
>>"copyAhead" are "m". They should be "g" instead, because a 64-bit amd64
>>puts those variables into registers, not memory locations.
>>
>>
>
>send patch, but you have to test this with gcc 2.95, 3.3 and 3.4 at least, gcc
>is known to mess up asm
>
>[...]
>
>
I workarounded it with this, it is ugly but worked.
Now, time to run and find a place to hide.
---
/home/fx/ffmpeg_cvs/ffmpeg/libavcodec/libpostproc/postprocess_template.c
2005-03-15 19:57:44.000000000
+0000
+++ ./postprocess_template.c 2005-05-04 16:35:09.000000000 +0000
@@ -3347,7 +3517,13 @@
QP_STORE_T QPs[], int QPStride, int isColor, PPContext *c2)
{
PPContext __attribute__((aligned(8))) c= *c2; //copy to stack
for faster access
- int x,y;
+#ifdef ARCH_X86_64
+ int64_t x,y;
+ int64_t copyAhead;
+#else
+ int32_t x,y;
+ int32_t copyAhead;
+#endif
#ifdef COMPILE_TIME_MODE
const int mode= COMPILE_TIME_MODE;
#else
@@ -3356,7 +3532,6 @@
int black=0, white=255; // blackest black and whitest white in
the picture
int QPCorrecture= 256*256;
- int copyAhead;
More information about the ffmpeg-devel
mailing list