[FFmpeg-devel] libavcodec/bswapdsp : add AVX2 for bswap_buf
James Darnley
james.darnley at gmail.com
Sat Oct 28 18:51:25 EEST 2017
On 2017-10-28 16:14, Martin Vignali wrote:
> 2017-10-28 15:47 GMT+02:00 James Darnley <james.darnley at gmail.com>:
>
>> On 2017-10-22 19:14, Martin Vignali wrote:
>>> @@ -86,16 +101,20 @@ SECTION .text
>>>
>>> ; void ff_bswap_buf(uint32_t *dst, const uint32_t *src, int w);
>>> %macro BSWAP32_BUF 0
>>> -%if cpuflag(ssse3)
>>> +%if cpuflag(ssse3)||cpuflag(avx2)
>>> cglobal bswap32_buf, 3,4,3
>>> mov r3, r1
>>> +%if cpuflag(avx2)
>>> + vbroadcasti128 m2, [pb_bswap32]
>>> +%else
>>> mova m2, [pb_bswap32]
>>> +%endif
>>
>> Why don't you increase the size of the constant? You wouldn't need a
>> preprocessor condition.
>>
>> I do admit I have never considered using a broadact-128 instruction in
>> similar circumstances so I have no idea which might be "better".
>>
>>
> For this, i follow Henrik Gramner's code, in the discussion
> libavcodec/exr : add x86 SIMD for predictor.
That's fine. I will look at that on my own time. I don't want to hold
up applying the patch. Would you like me to push it for you?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 603 bytes
Desc: OpenPGP digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20171028/95fb1e8b/attachment.sig>
More information about the ffmpeg-devel
mailing list