YUV to RGBA on Pentium D

79 views
Skip to first unread message

Scott Brooks

unread,
Aug 30, 2013, 2:55:07 PM8/30/13
to discuss...@googlegroups.com
We are using libyuv in between the output from libvpx and OpenGL.

We have some users with Pentium4 D CPUs which don't have the SSSE3 instructions, and end up with things rendering pretty slow.

Do most people use GLSL shaders to do the YUV->RGB conversion and libyuv as a fallback?
Does anyone have a suggestion for how to handle these CPUs?

Thanks
Scott

Frank Barchard

unread,
Aug 30, 2013, 3:55:04 PM8/30/13
to discuss-libyuv
On Fri, Aug 30, 2013 at 11:55 AM, Scott Brooks <sc...@beamdog.com> wrote:
We are using libyuv in between the output from libvpx and OpenGL.

We have some users with Pentium4 D CPUs which don't have the SSSE3 instructions, and end up with things rendering pretty slow.

I dont have a P4 handy, but first a benchmark
set LIBYUV_WIDTH=1280
set LIBYUV_HEIGHT=720
set LIBYUV_REPEAT=1000 
I420ToARGB_Opt (539 ms)
I420ToRGBA_Opt (548 ms)
with SSSE3.  and without
set LIBYUV_DISABLE_SSSE3=1
I420ToRGBA_Opt (5917 ms)

Do most people use GLSL shaders to do the YUV->RGB conversion and libyuv as a fallback?

right.  Its rarely best practice to use software YUV to RGB.
 
Does anyone have a suggestion for how to handle these CPUs?

An SSE2 version is possible, but not easy, to write.

1.  the current SSSE3 makes use of pmaddubsw instruction.  Perhaps the same algorithm could be used, but replace the pmadd with 2 pmul's and a padd.

2. I used to have an MMX version.  It used table lookups and only produced one pixel at a time.

The most common conversion is I420ToARGB.  But there are 9 yuv formats and 9 RGB formats, and doing all 81 permutations, with gcc and visual c, means 162 functions, worst case.
If I come up with something, I'll start with just I420ToARGB with Visual C.  (BGRA in memory).


 

Thanks
Scott

--
You received this message because you are subscribed to the Google Groups "discuss-libyuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-libyu...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Frank Barchard

unread,
Nov 21, 2013, 5:09:06 AM11/21/13
to discuss...@googlegroups.com
Hey Scott,
Followup on SSE2 support.
I've acquired a Pentium M, which is SSE2 but not SSSE3, for testing.
This is indeed a bottleneck.  My only short term plan is we might bring back the old MMX version for conversion.
Several other functions I've ported to SSE2.
Reply all
Reply to author
Forward
0 new messages