[mythtv-users] New deinterlacer for perfect image quality when using an interlaced display, mode that matches the source
Paul Gardiner
lists at glidos.net
Mon Apr 6 04:47:56 UTC 2009
Jean-Yves Avenard wrote:
> Hi
>
> 2009/4/6 Paul Gardiner <lists at glidos.net>:
>> Thinking about this a bit more, an easy slip that would cause this
>> would be to hardwire the "field" flag - present on trunk, but not
>> on fixes - to a fixed value. Instead "dirty" can be used in place
>> of the field flag.
>
> Does Mark version work for you ?
> Or should I revert to your previous patch ?
It works for me, but only after two build fixes. There's the
ConstFilterInfo => FilterInfo one, but also FieldorderDeint
needs changing to accoung for filters taking only two arguments
on fixes, rather than the three on trunk. Here's the version
I'm using:
+static int FieldorderDeint (VideoFilter * f, VideoFrame * frame)
+{
+ ThisFilter *filter = (ThisFilter *) f;
+ TF_VARS;
+
+ AllocFilter(filter, frame->width, frame->height);
+
+ int dirty = 1;
+ if (filter->last_framenr != frame->frameNumber)
+ {
+ if (filter->last_framenr != (frame->frameNumber - 1))
+ {
+ memset(filter->got_frames, 0, sizeof(filter->got_frames));
+ }
+ store_ref(filter, frame->buf, frame->offsets,
+ frame->pitches, frame->width, frame->height);
+ dirty = 0;
+ }
+
+ filter_func(
+ filter, frame->buf, frame->offsets, frame->pitches,
+ frame->width, frame->height, dirty, frame->top_field_first,
+ dirty);
+
+ filter->last_framenr = frame->frameNumber;
+
+ return 0;
+}
Note "dirty" appearing twice in the arguments to filter_func.
Cheers,
Paul.
More information about the mythtv-users
mailing list