[FFmpeg-devel] [PATCH V6 2/2] libswscale/x86/yuv2rgb: add ssse3 version
Michael Niedermayer
michael at niedermayer.cc
Thu Jan 9 00:17:04 EET 2020
On Wed, Jan 08, 2020 at 10:25:59AM +0800, Ting Fu wrote:
> Tested using this command:
> /ffmpeg -pix_fmt yuv420p -s 1920*1080 -i ArashRawYuv420.yuv \
> -vcodec rawvideo -s 1920*1080 -pix_fmt rgb24 -f null /dev/null
>
> The fps increase from 389 to 640 on Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
>
> Signed-off-by: Ting Fu <ting.fu at intel.com>
> ---
> libswscale/x86/yuv2rgb.c | 7 +-
> libswscale/x86/yuv2rgb_template.c | 58 +++++++++++-
> libswscale/x86/yuv_2_rgb.asm | 145 ++++++++++++++++++++++++++----
> 3 files changed, 191 insertions(+), 19 deletions(-)
>
> diff --git a/libswscale/x86/yuv2rgb.c b/libswscale/x86/yuv2rgb.c
> index f3d2bb526e..7015266a7e 100644
> --- a/libswscale/x86/yuv2rgb.c
> +++ b/libswscale/x86/yuv2rgb.c
> @@ -61,13 +61,18 @@ DECLARE_ASM_CONST(8, uint64_t, pb_07) = 0x0707070707070707ULL;
> #define COMPILE_TEMPLATE_MMXEXT 1
> #endif /* HAVE_MMXEXT */
>
> +//SSSE3 versions
> +#if HAVE_SSSE3
> +#define COMPILE_TEMPLATE_SSSE3 1
> +#endif
> +
> #include "yuv2rgb_template.c"
>
> av_cold SwsFunc ff_yuv2rgb_init_x86(SwsContext *c)
> {
> int cpu_flags = av_get_cpu_flags();
>
> - if (EXTERNAL_MMX(cpu_flags)) {
> + if (EXTERNAL_MMX(cpu_flags) || EXTERNAL_SSSE3(cpu_flags)) {
I would expect that EXTERNAL_SSSE3 implies EXTERNAL_MMX
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
"I am not trying to be anyone's saviour, I'm trying to think about the
future and not be sad" - Elon Musk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200108/d1efd27a/attachment.sig>
More information about the ffmpeg-devel
mailing list