[mythtv] green tint on bt8x8 caused by automatic 'adjust' filter

Andy McMullan andy at andymcm.com
Thu Aug 19 12:10:20 EDT 2004

Hi Andrew

Thanks for responding. I did some more digging today, and I think I've found
the source of the problem in the filter code. There are two bugs (I think).
First, in newAdjustFilter():

filter->yfilt = fillTableMMX (filter->ytable, &(filter->yshift),
                                &(filter->yscale), &(filter->ymin),
                                ymin, ymax, 16, 235, ygamma);
filter->yfilt = fillTableMMX (filter->ctable, &(filter->cshift),
                               &(filter->cscale), &(filter->cmin),
                                cmin, cmax, 16, 240, cgamma);

I think the second statement should start filter->cfilt.

The second bug is in adjustFilter():

if (filter->cfilt)
    adjustRegionMMX(frame->buf + filter->yend, frame->buf + filter->cend,
                    filter->ctable, &(filter->cshift), &(filter->cscale),
                    &(filter->cmin), mm_cpool + 3, mm_cpool + 4);
    adjustRegion(frame->buf + filter->yend, frame->buf + filter->cend,

I think the final parameter to adjustRegion should be filter->ctable, not


Andy Mc

----- Original Message ----- 
From: "Andrew Mahone" <andrew.mahone at gmail.com>
To: "Development of mythtv" <mythtv-dev at mythtv.org>
Sent: Thursday, August 19, 2004 8:05 AM
Subject: Re: [mythtv] green tint on bt8x8 caused by automatic 'adjust'

> Can you try to figure out when this started happening, (ie, when did
> you check it out from CVS, have you been playing with cflags, etc)?
> My last build from CVS was 6/30, and there is no visible tint in
> recordings since then.  I would also suggest you try disabling the MMX
> code (simple to do, look at the filter init function).  It may be that
> something about your compiler or cflags has broken the MMX code, which
> is probably a bit more fragile than the LUT-based C version.

More information about the mythtv-dev mailing list