[Webkit-unassigned] [Bug 103614] Optimizing RGBA16, RGB16, ARGB16, BGRA16 unpacking functions with NEON intrinsics

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Dec 15 07:22:39 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=103614





--- Comment #3 from Gabor Rapcsanyi <rgabor at webkit.org>  2012-12-15 07:24:58 PST ---
(In reply to comment #2)
> (From update of attachment 176708 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=176708&action=review
> 
> > Source/WebCore/platform/graphics/GraphicsContext3D.cpp:377
> > +#if HAVE(ARM_NEON_INTRINSICS)
> > +    unsigned componentsPerRow = pixelsPerRow * 4;
> > +    unsigned tailComponents = componentsPerRow % 8;
> > +    unsigned componentsSize = componentsPerRow - tailComponents;
> > +
> > +    ARM::unpackOneRowOfRGBA16LittleToRGBA8NEON(source, destination, componentsSize);
> > +
> > +    source += componentsSize;
> > +    destination += componentsSize;
> > +    pixelsPerRow = tailComponents / 4;
> > +#endif
> 
> I realized that I don't really like in this approach. The modification of the common code path is way too big. And too ARM specific.
> 
> I would prefer:
> 
> #if HAVE(ARM_NEON_INTRINSICS) optionally other SIMDS connected with || operator
>     SIMD::unpackOneRowOfRGBA16LittleToRGBA8(source, destination, pixelsPerRow)
> $endif
> 
> And the SIMD class (namespace) would define the folowing interface:
> inline void SIMD::unpackOneRowOfRGBA16LittleToRGBA8(const uint16_t*& source, uint8_t*& destination, unsigned int& pixelsPerRow)
> 
> Advantages:
> 1) Modifications of the common code path is much shorter.
> 2) Can modify the arguments, since they passed as reference (usually SIMD process a group of pixels, but not necessary all if the length is not divisible by a certain value).
> 3) Can be extended to support other SIMD-s, not just NEON
> 4) Still it can be seen that a certain function is supported by the current CPU (So it is not necessary to support all of these functions on all CPUs which have SIMD support)

Yes, sounds logical to me so I made a bug to change those optimizations: https://bugs.webkit.org/show_bug.cgi?id=105086

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list