[theora-codecs] Re: 3274253-docked On2 movies don't draw the video frame

Steve Nicolai snicolai at acm.org
Sat Jun 21 14:01:03 PDT 2003



Mauricio,

I was able reproduce the problem with the vp3 codec that Apple is 
shipping.  My understanding of the problem is that when in the dock, 
the codec is drawing into a 32 bit ARGB PixMap.  Because the blitters 
are filling the alpha value with 0, when the PixMap is composited into 
the dock, it's treated as transparent.  The correct fix is to fill the 
alpha channel in the PixMap with 255 instead of 0 so that it's treated 
as opaque.

I've tried to build the codec from the source in the xiph repository, 
and it crashes with a corrupt stack after a couple frames.  I did 
verify that the component that you built on May 8 seems to work.  I'm 
using CodeWarrior 8.3 to build.  Are there any tricks to building it 
that are not documented in the readme?

Here is a patch for one of the blitters.  This blitter is used on 
machines without altivec, i.e. G3s.  It is untested, but the changes 
were fairly simple.  Can you build and test this?  If it works, I'll go 
ahead and make the changes to the other blitters.

Index: CoreLibs/CDXV/vpxblit/mac/ppcasm/bct00.s
===================================================================
RCS file: 
/usr/local/cvsroot/vp32/CoreLibs/CDXV/vpxblit/mac/ppcasm/bct00.s,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 bct00.s
--- CoreLibs/CDXV/vpxblit/mac/ppcasm/bct00.s	6 Sep 2001 14:57:34 
-0000	1.1.1.1
+++ CoreLibs/CDXV/vpxblit/mac/ppcasm/bct00.s	21 Jun 2003 20:54:42 -0000
@@ -94,17 +94,18 @@
      rlwinm      r27,r13,17,23,30        ;get y1 * 2

      lhax        r22,r9,r22              ;Y0
-    xor         r12,r12,r12             ;used to mask alpha
+    addis       r12,0,65280             ;r12 = 0xff000000 for solid 
alpha

      lhax        r24,r11,r24             ;CrforG
-    add         r28,r26,r22             ;R0
      add         r29,r25,r22             ;B0
+    add         r28,r26,r22             ;R0

-    lbzx        r28,r28,r20             ;get the real R0
+    lbzx        r29,r29,r20             ;get the real B0
      add         r23,r23,r24             ;CrforG + CbforG

-    lbzx        r29,r29,r20             ;get the real B0
+    lbzx        r28,r28,r20             ;get the real R0
      subf        r22,r23,r22             ;G0
+    or          r29,r29,r12             ;set alpha to 0xff

      lbzx        r0,r22,r20              ;get the real G0
      insrwi      r29,r28,8,8             ;insert R0
@@ -146,17 +147,18 @@
      rlwinm      r27,r13,1,23,30         ;get y3 * 2

      lhax        r22,r9,r22              ;Y0
-    xor         r12,r12,r12
+    addis       r12,0,65280             ;r12 = 0xff000000 for solid 
alpha

      lhax        r24,r11,r24             ;CrforG
-    add         r28,r26,r22             ;R0
      add         r29,r25,r22             ;B0
+    add         r28,r26,r22             ;R0

-    lbzx        r28,r28,r20             ;get the real R0
+    lbzx        r29,r29,r20             ;get the real B0
      add         r23,r23,r24             ;CrforG + CbforG

-    lbzx        r29,r29,r20             ;get the real B0
+    lbzx        r28,r28,r20             ;get the real R0
      subf        r22,r23,r22             ;G0
+    or          r29,r29,r12             ;set alpha to 0xff

      lbzx        r0,r22,r20              ;get the real G0
      insrwi      r29,r28,8,8             ;insert R0

Steve

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'theora-codecs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Theora-codecs mailing list