[FFmpeg-devel] [PATCH]Never specify asm constraint twice in cavsdsp.c

Carl Eugen Hoyos cehoyos at ag.or.at
Sat May 3 09:55:13 CEST 2014


Matt Oliver <protogonoi <at> gmail.com> writes:

> > Attached patch fixes gcc compilation with
> > HAVE_INLINE_ASM_DIRECT_SYMBOL_REFS
> > disabled (needed for lto). This partly reverts 
> > 72c93aba, still compiles with !HAVE_6REGS.

> I assume the problem is with the function 
> "OPNAME ## cavs_qpel8or16_v2_ ## MMX" where ff_pw_5 
> is passed for both MUL1 and MUL2. If correct then for
> cavdsp.c doesnt this only affect QPEL_CAVSV2 and not 
> V1 or V3? As I cant seem to see any other 
> implementation of one of the QPEL_CAVSVX macros that
> has the same input for MUL1 and MUL2 (or am I missing 
> something?).

Your analysis is correct afaict.

> Building from that QPEL_CAVSV2 doesnt actually use 
> MUL2. But as the macro requires the additional 
> parameter then currently it is just passing ff_pw_5 a 
> second time so it has the correct number of 
> parameters. As MUL2 is not used then this line can 
> just pass any other parameter that is neither ff_pw_4 
> or ff_pw_5 which will avoid the named constraint 
> being used twice.

Much more reasonable than my solution.

> For example just change the line from:
> QPEL_CAVSVNUM(QPEL_CAVSV2,OP,ff_pw_4,ff_pw_5,ff_pw_5)         \
> to:
> QPEL_CAVSVNUM(QPEL_CAVSV2,OP,ff_pw_4,ff_pw_5,ff_pw_42)        \

Please send a patch.

> This way MUL2 remains as a MANGLE which some other 
> people seemed to suggest is important for PIC.

I only added it last week, but you are probably right.

Thank you for looking into this!

The vf_fspp.c issue should already be fixed but thank 
you for confirming I didn't miss anything.

Where you able to test ced0d6c1 / ticket #3472 with 
icc on Windows?

Carl Eugen



More information about the ffmpeg-devel mailing list