[Bug 684399] videomixer can't compile orc program

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sun Oct 28 10:10:35 PDT 2012


https://bugzilla.gnome.org/show_bug.cgi?id=684399
  GStreamer | gst-plugins-good | 0.11.x

--- Comment #2 from Michael Rubinstein <mrubinstein at weather.com> 2012-10-28 17:10:29 UTC ---
The problem was also seen in 1.0.2.  I'm using MinGW.

I think the problem will happen on most any Intel platform if the application
is in 32 bit mode.

The ORC program "video_mixer_orc_overlay_argb" requires 13 SSE registers but
there are only 8 available in 32 bit apps.

The following works in my application, however it does not have the full
functionality of the original program.  It doesn't scale the incoming alpha or
set the output alpha.  However, it uses only 8 registers.

.function video_mixer_orc_overlay_argb
.flags 2d
.dest 4 d orc_uint8
.source 4 s orc_uint8
.param 2 alpha
.temp 4 t
.temp 2 tw
.temp 1 tb
.temp 4 t2
.temp 8 w1
.temp 8 w2
.temp 8 w3
.const 4 xfs 0xffffffff

# Get source, extract alpha from low byte.
loadl t, s              # t = *src
convlw tw, t            # tw = alpha
convwb tb, tw           # tb = alpha
splatbl t2, tb          # t2 = a:a:a:a 
x4 convubw w1, t2       # w1 = 0a:0a:0a:0a

# Scale source
x4 convubw w2, t        # w2 = 0s:0s:0s:0s
x4 mullw w2, w1, w2     # w2 = Sx:Sx:Sx:xx

# Get 255-alpha
loadpl t2, xfs          # t2 = F:F:F:F
x4 convubw w3, t2       # w3 = 0F:0F:0F:0F
x4 subw w1, w3, w1      # w1 = 0A:0A:0A:0A

# Get destination and scale it.
loadl t, d              # t  = *dst
x4 convubw w3, t        # w3 = 0d:0d:0d:0d
x4 mullw w1, w1, w3     # w1 = Dx:Dx:Dx:Dx

# Combine, divide by 256 and store.
x4 addw w2, w1, w2      # w2 = Bx:Bx:Bx:Bx
x4 convhwb t, w2        # t  = B:B:B:x
storel d, t             # *dst = t

This is my first attempt at ORC or SSE, so the above may not be optimal.

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


More information about the gstreamer-bugs mailing list