[FFmpeg-devel] [PATCH] flac/x86: add ff_flac_lpc_32_xop()

James Almer jamrial at gmail.com
Fri Feb 7 19:28:15 CET 2014


On 07/02/14 12:46 AM, James Almer wrote:
> On 06/02/14 11:17 PM, Loren Merritt wrote:
>> On Thu, 6 Feb 2014, James Almer wrote:
>>
>>> diff --git a/libavcodec/x86/flacdsp.asm b/libavcodec/x86/flacdsp.asm
>>> index e28f905..efd80be 100644
>>> --- a/libavcodec/x86/flacdsp.asm
>>> +++ b/libavcodec/x86/flacdsp.asm
>>> @@ -24,7 +24,17 @@
>>>
>>>  SECTION .text
>>>
>>> -INIT_XMM sse4
>>> +%macro pmacsdql 3
>>> +%if cpuflag(xop)
>>> +    vpmacsdql %1, %2, %3, %1
>>> +%else
>>> +    pmuldq %2, %3
>>> +    paddq  %1, %2
>>> +%endif
>>> +%endmacro
>>
>> This should go in x86inc.asm, with the other FMA_INSTR
> 
> I didn't add this to x86utils because the FMA_INSTR macros are different.
> For the non XOP case, the dest operand for both the multiplication and sum 
> instructions is the same, and that's not what we need here.
> The SSE4 version will be wrong after pre-processing.
> 
> I don't think it's worth finding a way to make this work by refactoring 
> stuff just to keep a macro out of this file.
> 
> That aside, the relevant FMA_INSTR macro for vpmacsdql can still be added, 
> but not be used here.
> 

Nevermind, I'll just expand the FMA_INSTR macro to accept cases like this.

Regards.


More information about the ffmpeg-devel mailing list