Opened 13 years ago

Closed 13 years ago

#380 closed defect (fixed)

Mistake in ffmpeg's docs for yadif

Reported by: Pavlo Owned by:
Priority: normal Component: avfilter
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: yes

Description

Docs describe the values for yadif's parity parameter the other way around.

ffmpeg version: N-31706-g335bbe4
I've checked main git branch and docs are still like in the version I've used.

Test file

Attached test file: dv-bff.avi
This is a short sample of video captured from JVC camcorder through IEEE1394 with the help of Windows Import Video on Windows Vista. This is DV video and it must be interlaced with bottom-field-first (BFF) field order as stated in many places, e.g here http://avisynth.org/mediawiki/Interlaced_fieldbased#About_DV_.2F_DVD_in_relation_to_field_dominance.

How to test for error:

apply yadif with BFF (according to ffmpeg's yadif docs), field separation and doubling the framerate:

ffmpeg -i dv-bff.avi -vf yadif=1:0 -r 50 output.avi

You will get a jagged video, although by applying yadif=1:1 (which, according to the docs, is top-field-first) you get a smooth playback.

Reasoning

I have tripple-checked the parity with other tools. GSpot video analysis software reports it to be BFF. If you play tricks similar to the one above with VirtualDub and mplayer, the results also point that the video is BFF. In fact, applying the same yadif parameters in mplayer and ffmpeg results in the same behaviour, athough according to their respective docs the meaning of parity values 0 or 1 is exactly opposite. The auto parity recognition of ffmpeg works fine though - video encoded with yadif=1:-1 plays smoothly.

I have also checked this with DVD interlaced source, which, according to thishttp://avisynth.org/mediawiki/Interlaced_fieldbased#About_DV_.2F_DVD_in_relation_to_field_dominance, must be top-field-first. The result is similar to DV case - Gspot reports TFF, mplayer's yadif plays it nice with TFF, but ffmpeg's yadif plays it nice with BFF as per docs.

As summary I strongly suspect the mistake in ffmeg's docs for yadif filter - there the explanations of meanings for the field parity parameter should be swapped. I made a corresponding patch to filters.texi file and attached it here.

Attachments (2)

dv-bff.avi (1.4 MB ) - added by Pavlo 13 years ago.
test DV encoded file, interlaced with bottom-field-first field order
filters.texi.patch (293 bytes ) - added by Pavlo 13 years ago.
patch to filters.texi to fix the yadif's docs

Download all attachments as: .zip

Change History (7)

by Pavlo, 13 years ago

Attachment: dv-bff.avi added

test DV encoded file, interlaced with bottom-field-first field order

by Pavlo, 13 years ago

Attachment: filters.texi.patch added

patch to filters.texi to fix the yadif's docs

comment:1 by Stefano Sabatini, 13 years ago

Analyzed by developer: set
Reproduced by developer: set
Resolution: fixed
Status: newclosed

Fixed in commit:

commit 82b1516a85ad21b5455dcfef6fe49d1189565c33
Author: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Date:   Thu Aug 4 00:25:35 2011 +0200

    yadif: correct documentation on the parity parameter
    
    0 is top-field-first, 1 is bottom-field-first, not the other way
    around.
    
    Fix trac issue #380.

Many thanks for the very accurate report.

comment:2 by David Grant, 13 years ago

This doc is still out-of-date:
http://ffmpeg.org/ffmpeg-doc.html

However, this one is just fine now:
http://ffmpeg.org/libavfilter.html#SEC59

comment:3 by David Grant, 13 years ago

Resolution: fixed
Status: closedreopened

reopening until someone removes/fixes that out-of-date page

comment:4 by Michael Niedermayer, 13 years ago

ouch, that file is old, i updated the link i found to (the correct) ffmpeg.html
do more links exist to ffmpeg-doc.html ?

comment:5 by Michael Niedermayer, 13 years ago

Resolution: fixed
Status: reopenedclosed

If someone finds more links to the old doc, please reopen this

Note: See TracTickets for help on using tickets.