On Wed, Aug 14, 2002 at 03:17:05PM +0200, Sven Neumann wrote:
> I've applied your patch to my tree and tried to simplify it a bit.
> I'd appreciate if you could try the attached patch and report
> back.

Looks good and works as expected.

I just studied the code a bit more and FillTriangle() is now also
possible. Works ok for packed formats but planar formats only draw to the
luma plane. Problem bwing that the spanline rasterizer sets rect.h = 1.
I've attached a fix for this. Bad thing is that it draws each chroma line
twice. Do you have a better fix in mind?

AFAICS your patch doesn't check what drawing operation is requested. So
anything using gDrawLine() will succeed but the results will not be
correct.

-- 
Ville Syrj�l�
[EMAIL PROTECTED]
http://www.sci.fi/~syrjala/
--- generic.c.old       Wed Aug 14 21:10:44 2002
+++ generic.c   Wed Aug 14 21:00:10 2002
@@ -3164,6 +3164,10 @@
      }
 
      if (dst_format == DSPF_I420 || dst_format == DSPF_YV12) {
+          /* Kludge for spanline rasterizer */
+          if (rect->h == 1)
+               rect->h = 2;
+
           rect->x /= 2;
           rect->y /= 2;
           rect->w /= 2;

Reply via email to