dong83615 / libyuv

Automatically exported from code.google.com/p/libyuv
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Odd width (any functions) use SIMD #448

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
C and SIMD dont exactly match.
Make any functions use SIMD all the time, by copying to/from a temporary buffer.

Original issue reported on code.google.com by fbarch...@chromium.org on 3 Jun 2015 at 10:38

GoogleCodeExporter commented 9 years ago
in row_any.cc there are macros to define the odd width functions.

The following are SIMD

ANY31(NAMEANY, I420TORGB_SIMD, UVSHIFT, DUVSHIFT, BPP, MASK)
ANY21(NAMEANY, NV12TORGB_SIMD, UVSHIFT, SBPP, SBPP2, BPP, MASK)

The following still have SIMD+C

ANY11(NAMEANY, ARGBTORGB_SIMD, ARGBTORGB_C, SBPP, BPP, MASK)
ANY11U(NAMEANY, ARGBTORGB_SIMD, ARGBTORGB_C, SBPP, BPP, MASK)
ANY11P(NAMEANY, ARGBTOY_SIMD, ARGBTOY_C, SBPP, BPP, MASK)
ANY12(NAMEANY, ANYTOUV_SIMD, ANYTOUV_C, BPP, SHIFT, MASK)
ANY12S(NAMEANY, ANYTOUV_SIMD, ANYTOUV_C, BPP, MASK)
ANY11T(NAMEANY, TERP_SIMD, TERP_C, SBPP, BPP, MASK)
ANY11M(NAMEANY, MIRROR_SIMD, MIRROR_C, BPP, MASK)
ANY1(NAMEANY, SET_SIMD, SET_C, T, BPP, MASK)

Original comment by fbarch...@google.com on 17 Jun 2015 at 12:12

GoogleCodeExporter commented 9 years ago
Currently C and SIMD dont exactly match for some functions/cpus.
Functions that do odd width use a combination of C and SIMD and can show a 
subtle artifact.   See this chromoting bug 
https://code.google.com/p/chromium/issues/detail?id=493914

Current SIMD any status:

The following are SIMD only
ANY31(NAMEANY, I420TORGB_SIMD, UVSHIFT, DUVSHIFT, BPP, MASK)
ANY21(NAMEANY, NV12TORGB_SIMD, UVSHIFT, SBPP, SBPP2, BPP, MASK)
ANY11(NAMEANY, ARGBTORGB_SIMD, UVSHIFT, SBPP, BPP, MASK)
ANY12(NAMEANY, ANYTOUV_SIMD, UVSHIFT, BPP, DUVSHIFT, MASK)

The following still have C
ANY11P(NAMEANY, ARGBTOY_SIMD, ARGBTOY_C, T, SBPP, BPP, MASK)
ANY12S(NAMEANY, ANYTOUV_SIMD, ANYTOUV_C, BPP, MASK)
ANY11T(NAMEANY, TERP_SIMD, TERP_C, SBPP, BPP, MASK)
ANY11M(NAMEANY, MIRROR_SIMD, MIRROR_C, BPP, MASK)
ANY1(NAMEANY, SET_SIMD, SET_C, T, BPP, MASK)

Original comment by fbarch...@google.com on 19 Jun 2015 at 6:11

GoogleCodeExporter commented 9 years ago

Original comment by phthor...@gmail.com on 24 Jun 2015 at 1:00