[vlc-devel] Slight correction - Yadif2x and field repeat

Juha Jeronen juha.jeronen at jyu.fi
Sat Feb 19 03:04:50 CET 2011


Hi again,

I found a bug in the patch I just posted. Corrected set attached.

These are otherwise identical with the previous version, but soft field
repeat handling in Yadif2x has been fixed. Since this algorithm uses the
history, it needs to know which frames the previous/current/next fields
come from. This wasn't handled correctly for frames with nb_fields = 3
in the originally proposed version. This is now fixed.

My netbook is a bit underpowered to run Yadif2x, but at least it seems
to work :)

The other field renderers (i.e. Bob and Linear) are history-free, so
they don't require any handling of this kind.

Thus - please review this version instead of the previous version :)

The Yadif2x fix is the only new change. All other changes are listed in
the changelog in my previous post.


Details:

Using the parity flag like usual is fine for i_order = 0 and i_order =
(last), but when nb_fields = 3, filtering should be skipped at i_order =
1. The idea is that when there is a field repeat, there is no motion at
the "middle" field, and the frame is very likely to be a progressive one.

If we want to account for the possibility of an interlaced frame
utilizing field repeat (i.e. that pure spatial filtering could be
useful), then changes to yadif.h itself are required. This could be done
by adding a "parity" 2, which would mean "prev = cur, next = cur".

While such a change would be trivial, I don't really want to go there,
since it's an external file from another project (as has been discussed
before on this list). And in any case, I think that material that needs
the more paranoid version is rare if not nonexistent.

Thus, I think the current (bugfixed) version should work well enough in
practice.

 -J

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Increase-private_picture-to-4-to-accommodate-filters.patch
Type: text/x-patch
Size: 1092 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20110219/e4b5dfb6/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Soft-field-repeat-support-for-deinterlacer.patch
Type: text/x-patch
Size: 21405 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20110219/e4b5dfb6/attachment-0001.bin>


More information about the vlc-devel mailing list