[mythtv-users] New deinterlacer for perfect image quality when using an interlaced display, mode that matches the source
Paul Gardiner
lists at glidos.net
Tue Apr 7 08:17:11 UTC 2009
Tom Dexter wrote:
> On Mon, Apr 6, 2009 at 12:47 AM, Paul Gardiner <lists at glidos.net> wrote:
> Wow...I'm confused here. Yesterday I was running for a while using
> the mythtv-0.21-field-order.6.patch, which seems to have everything
> you're referring to, and I swear the motion just didn't look right at
> all. I went back to the original patch.
>
> I can't believe I was just seeing things. Maybe I'll try again.
I'm still none the wiser about this. Probably is worth trying the
backport of Mark's patch again. Also you could try the original patch
with the aternative version of filter function below:
static void filter_func(struct ThisFilter *p, uint8_t *dst, int
dst_offsets[3],
int dst_stride[3], int width, int height, int
parity, int tff)
{
int y, i;
uint8_t nr_p, nr_c;
//check if we already got this frames
nr_c = NREFS-1;//always there after store_ref
nr_p = p->got_frames[NREFS-2]?(NREFS-2):nr_c;
for (i=0; i<NCHANS; i++)
{
int is_chroma= !!i;
int w= width >>is_chroma;
int h= height>>is_chroma;
int refs= p->stride[i];
for (y=0; y<h; y++)
{
/* Alter only lines of the second field */
if(parity)
{
/* Second call: put whole frame back to previous state
when first passed in */
memcpy(dst + dst_offsets[i] + y*dst_stride[i],
&p->ref[nr_c][i][y*refs], w);
}
else
{
/* First call: replace second field by that of the
previous frame */
if (((y ^ tff) & 1) == 0)
{
memcpy(dst + dst_offsets[i] + y*dst_stride[i],
&p->ref[nr_p][i][y*refs], w);
}
}
}
}
}
That should fix the flashing OSD and handle bottom field first. But as
far as I can see it then does the same as Mark's version.
Cheers,
Paul.
More information about the mythtv-users
mailing list