[mythtv-users] New deinterlacer for perfect image quality when using an interlaced display, mode that matches the source

Paul Gardiner lists at glidos.net
Wed Apr 8 08:51:06 UTC 2009


Tom Dexter wrote:
> On Tue, Apr 7, 2009 at 4:29 AM, Paul Gardiner <lists at glidos.net> wrote:
>> Jean-Yves Avenard wrote:
>>> Hi
>>>
>>> 2009/4/7 Paul Gardiner <lists at glidos.net>:
>>>> 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:
>>> Could you publish your changes it as a patch in your existing ticket ?
>> Yeah, I'll do that. But before anyone takes it on, it would be good to
>> see how Tom gets on with it: as far as I can see, my latest version
>> should do the same job as the backport of Mark's version (with the
>> fix for the lack of the "field" paramater on fixes, that is).
>>
>> Cheers,
>>        Paul.
>>
> 
> OK...I've done some extensive testing of 1080i playback with the
> various versions of this patch.
> 
> I'm not sure what was going on the other night when I thought I was
> having problems with motion using the modified version of Mark's patch
> (mythtv-0.21-field-order.6.patch), but today I watched a ton of 1080i
> stuff with it and everything looks great.
> 
> When I thought I was seeing problems with motion, it was specifically
> (and only) with the final episode of ER I recorded last Thursday.
> Even then, my wife really didn't see anything wrong, and I really
> didn't give it much of a chance before switching to Bob x2 (until I
> could find time to recompile).

I find motion in ER to be strange at times. I think the constant
circling of the camera around moving people against a complex
background must be hell for the TV's deinterlacer. Although I
have a CRT TV, it's from the era where they were mixing digital
and analog. I believe it internally deinterlaces, processes the
image and reinterlaces. My TV can get a little confused by ER.
Annoyingly, it gets slightly more confused by the signal from
MythTV than from my DVR. It's subtle, but motion with a signal
from my DVR does look very slightly better. I think it may be
a very slight difference in the mpeg decoding and the deinterlacer
picks up differently on the decoding artifacts. Just a guess.

> If I was in fact seeing anything odd,
> it's possible it was something NBC was doing...possibly mixing more
> than their usual amount of progressive frames etc...who knows.  The
> stuff they do normally causes video to speed up momentarily after
> commercials when using Bob x2, so anything's possible.  Unfortunately
> I neglected to save that show which would have allowed me to verify
> that.
> 
> In any case, I watched several other NBC shows with their usual
> oddball video and everything looks great.  I can't tell any difference
> today between that and Paul's original patch (or the original patch
> with the OSD flicker patch).  I watched part of a PBS Nova episode and
> it looks simply spectacular.
> 
> Sorry for what was apparently a false alarm.

No, thanks for all the testing.

> I did have a question about the some differences in filter_func in the
> newest (Mark's) version as compared to the original.  While the two
> appear to be functionally the same, it appears to me that, in the new
> one, there may be cases where the filter is doing additional (and
> unnecessary) math.  That is, there appear to be cases when the
> variables src and dst2 get calculated and not used, as well as cases
> where src gets calculated twice.  The code is arguable cleaner than
> the original (less duplicate code), but possibly not as efficient(??).
>  From what little I know of what's going on, that seems like a place
> were efficiency could be pretty important.

I hadn't thought of that. Yes, it could make a slight difference.

> I think that the newest
> version actually is using a bit more CPU than the original, though I'd
> have to switch back to be sure.

Which one is that: mythtv-0.21-field-order.6.patch or 
mythtv-0.21-field-order-no-flicker.patch? Besides CPU usage, I'd expect 
you to get identical results from those two.

> Thanks again to Paul and Mark for this one.  Great stuff.

As I say, thanks for all the testing and feedback.

Cheers,
	Paul.



More information about the mythtv-users mailing list