[FFmpeg-devel] [PATCH V8 2/2] libswscale/x86/yuv2rgb: add ssse3 version

Fu, Ting ting.fu at intel.com
Tue Feb 11 05:49:22 EET 2020



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of Fu,
> Ting
> Sent: Monday, February 10, 2020 05:54 PM
> To: FFmpeg development discussions and patches <ffmpeg-
> devel at ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH V8 2/2] libswscale/x86/yuv2rgb: add
> ssse3 version
> 
> 
> 
> > -----Original Message-----
> > From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> Paul
> > B Mahol
> > Sent: Monday, February 10, 2020 04:56 PM
> > To: FFmpeg development discussions and patches <ffmpeg-
> > devel at ffmpeg.org>
> > Subject: Re: [FFmpeg-devel] [PATCH V8 2/2] libswscale/x86/yuv2rgb: add
> > ssse3 version
> >
> > Does this pass fate?
> > If yes i will apply.
> 
> Hi Paul,
> 
> It has passed the fate.
> 
> Thank you,
> Ting Fu

Hi Paul,

After a further check, I found there may be no fate for yuv2rgb. I just run 'make fate' with no error yesterday, sorry for that.
And I have checked the md5 of the output of ssse3 and mmx already (100 frames with and without apply my patch). They are the same. Here are examples with 5 frames below.
I think this can also prove that the ssse3 outputs the same with mmx.

Command:  ./ffmpeg -pix_fmt yuv420p -s 1920*1080 -i ArashRawYuv420.yuv -vcodec rawvideo -s 1920*1080 -pix_fmt FMT -vframes 5 -f framemd5 FMT.md5 (FMT = {RGB24, BGR24, RGB32, BGR32, RGB555, RGB565})
    YUV420P to RGB24
        mmx:
            2c891b51088497776cd85ab8bdf7d9c0
            fa8df95a630096a96ee06048b446f7cd
            21048f651cfa5e5309b7838d119070bd
            3149361521068d00862ec9f88224c92d
            7790cd3d7a966546a6c245738dc7430b
        ssse3:
            2c891b51088497776cd85ab8bdf7d9c0
            fa8df95a630096a96ee06048b446f7cd
            21048f651cfa5e5309b7838d119070bd
            3149361521068d00862ec9f88224c92d
            7790cd3d7a966546a6c245738dc7430b
    YUV420P to BGR24
        mmx:
            46f19629d8f34fe4dba3df99c49668fa
            000e251995a0269dd0dce77c31711e98
            edccc926fbee775b00e2a5da4a7365e1
            d46e286699c0361fa21832c33c662120
            a79321d438111dae575158aefca4c87f
        ssse3:
            46f19629d8f34fe4dba3df99c49668fa
            000e251995a0269dd0dce77c31711e98
            edccc926fbee775b00e2a5da4a7365e1
            d46e286699c0361fa21832c33c662120
            a79321d438111dae575158aefca4c87f
    YUV420P to RGB32
        mmx:
            51e99fab05a84fb08c62ddde3898648e
            4c078b41498d1fde73a8b636ba3ddddc
            c60448161ed3662c79445e24d5e6b834
            4a4ae471a2e5448833fbbf41a7de5c42
            0200b2a18f1212c5adb5d6f59b513503
        ssse3:
            51e99fab05a84fb08c62ddde3898648e
            4c078b41498d1fde73a8b636ba3ddddc
            c60448161ed3662c79445e24d5e6b834
            4a4ae471a2e5448833fbbf41a7de5c42
            0200b2a18f1212c5adb5d6f59b513503
    YUV420P to BGR32
        mmx:
            a494abb5a4fa9f51a228d13d2452cc87
            0fb30a71f70eb977580968a96cefca43
            77feb78a9355601d2d36dfe15a6a3993
            b64b7717e3baaa012d98a019f64b55d8
            1abca5233e66e0dca63c8476c08e830f
        ssse3:
            a494abb5a4fa9f51a228d13d2452cc87
            0fb30a71f70eb977580968a96cefca43
            77feb78a9355601d2d36dfe15a6a3993
            b64b7717e3baaa012d98a019f64b55d8
            1abca5233e66e0dca63c8476c08e830f
    YUV420P to BGR555
        mmx:
            1874dea6f6f7afb872d748530c3e7116
            af1f98567c1d7c3fa9705d08b7873231
            2f4e21ab5dd6499c57db0932bbdc2498
            4eccd6dcf69dba8e1e5365cad2cdcf84
            0c20aaf1602522a012b1543f0cef7169
        ssse3:
            1874dea6f6f7afb872d748530c3e7116
            af1f98567c1d7c3fa9705d08b7873231
            2f4e21ab5dd6499c57db0932bbdc2498
            4eccd6dcf69dba8e1e5365cad2cdcf84
            0c20aaf1602522a012b1543f0cef7169
    YUV420P to BGR565
        mmx:
            6cac48711756152b3ca815b6985b2882
            93264a7683ff0761a8ef300590674e40
            fc0242e2f7dacbcd9a5f9ac7229a8d9f
            dbc5acb000fa5a9d468ab8db03431c39
            af7a512c00c1b177d4f65e6d056ea97c
        ssse3:
            6cac48711756152b3ca815b6985b2882
            93264a7683ff0761a8ef300590674e40
            fc0242e2f7dacbcd9a5f9ac7229a8d9f
            dbc5acb000fa5a9d468ab8db03431c39
            af7a512c00c1b177d4f65e6d056ea97c

Command: ./ffmpeg -pix_fmt yuva420p -s 1920*1080 -i Allegro_HEVC_Main444_MT41_Funny_00_1920x1080_r2260.yuva420.yuv -vcodec rawvideo -s 1920*1080 -pix_fmt FMT -vframes 5 -f framemd5 FMT.md5 (FMT = {RGB32, BGR32}) 
    YUVA420P to RGB32
        mmx:
            602cfb10a7eadebd7f85c8937ab43509
            210ed4c10d021c754b2ab9a434b0f0c2
            88eef228f50264c6340ae5490412a4aa
            8fcda91158c4c26309da6f76cf79c4a7
            6cd6d747ce91726b33c649df8b04f15c
        ssse3:
            602cfb10a7eadebd7f85c8937ab43509
            210ed4c10d021c754b2ab9a434b0f0c2
            88eef228f50264c6340ae5490412a4aa
            8fcda91158c4c26309da6f76cf79c4a7
            6cd6d747ce91726b33c649df8b04f15c
    YUVA420P to BGR32
        mmx:
            7da6823eb0ba93eb4b02056e90f51379
            a05356bd3186cf2aa913a8672f71a7d0
            e9a57d6d337d9c8ed1b3be78f0e28403
            499e32557f12cf9c82ce91dd58dd23b0
            f3cef575f24793c840a17dde54db1799
        ssse3:
            7da6823eb0ba93eb4b02056e90f51379
            a05356bd3186cf2aa913a8672f71a7d0
            e9a57d6d337d9c8ed1b3be78f0e28403
            499e32557f12cf9c82ce91dd58dd23b0
            f3cef575f24793c840a17dde54db1799

Thank you,
Ting Fu

> 
> >
> > On 2/10/20, Fu, Ting <ting.fu at intel.com> wrote:
> > >
> > >
> > >> -----Original Message-----
> > >> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> > >> Ting Fu
> > >> Sent: Sunday, January 19, 2020 11:51 AM
> > >> To: ffmpeg-devel at ffmpeg.org
> > >> Subject: [FFmpeg-devel] [PATCH V8 2/2] libswscale/x86/yuv2rgb: add
> > >> ssse3 version
> > >>
> > >> 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     |  38 +++++++++
> > >>  libswscale/x86/yuv_2_rgb.asm | 145
> > +++++++++++++++++++++++++++++++--
> > >> --
> > >>
> > > [...]
> > >> +
> > >> +INIT_XMM ssse3
> > >> +yuv2rgb_fn yuv,  rgb, 24
> > >> +yuv2rgb_fn yuv,  bgr, 24
> > >> +yuv2rgb_fn yuv,  rgb, 32
> > >> +yuv2rgb_fn yuv,  bgr, 32
> > >> +yuv2rgb_fn yuva, rgb, 32
> > >> +yuv2rgb_fn yuva, bgr, 32
> > >> +yuv2rgb_fn yuv,  rgb, 15
> > >> +yuv2rgb_fn yuv,  rgb, 16
> > >> --
> > >> 2.17.1
> > >
> > > Hi all,
> > >
> > > Any further comment for this single patch?
> > > This version has only changed a little compared with V4 (reviewed by
> > > Paul), which is that the check of SIMD has been moved from the
> > > wrapper function (in
> > > libswscale/x86/yuv2rgb_template.c) to format check (in
> > > libswscale/x86/yuv2rgb.c).
> > > While assembly code is exactly same with the V4.
> > >
> > > Thank you,
> > > Ting Fu.
> > >
> > >>
> > >> _______________________________________________
> > >> ffmpeg-devel mailing list
> > >> ffmpeg-devel at ffmpeg.org
> > >> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> > >>
> > >> To unsubscribe, visit link above, or email
> > >> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> > > _______________________________________________
> > > ffmpeg-devel mailing list
> > > ffmpeg-devel at ffmpeg.org
> > > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> > >
> > > To unsubscribe, visit link above, or email
> > > ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email ffmpeg-devel-request at ffmpeg.org
> with subject "unsubscribe".


More information about the ffmpeg-devel mailing list