#56 YV12 interlaced<->progressive conversion needed

open
nobody
Filters (44)
5
2004-07-17
2003-05-19
Anonymous
No

I have problem that i allways need to use
ConvertToYUY2( interlaced=true )
ConvertToYV12()

in after mpeg2souce since it outputs interlace YV12 and
basicly YV12 is really an progressive format and only
internaly interlaced support in Avisynth. So what would
be needed is to make ConvertToYV12 to work even if
video is in YV12 allready to convert interlaced YV12 to
progressive and vise versa...since i think decomb and
some ivtc:r's need interlaced YV12 to work. So this
would be little speed up so that there wouldn't be need
to go through YUY2.

Example:

if AVI is loaded and it's in YV12 normal progressive
YV12.

Avisource( &quot;xvid.avi&quot; )
ConvertToYV12( interlace=true )
Decomb()
ConvertToYV12( interlace=false )

Ofcourse it would be better to have interlaced flag for
YV12 in general so filters could use that.

But anyway since YV12 is really an progressive format
atleast in AVI files you will need to convert video to
progressive YV12 in the end so it looks ok when
compressed to example XVID since otherwise chroma
is in wrong place every second row. And you won't see
that very easily if you loaded .d2v with mpeg2source
and it had force film option on and video is progressive
but chroma is still sampled interlace and that
conversion to progressive YV12 is still needed.

I think now that YV12 came along people have encoded
millions of avis with missaligned chroma because no
one seems to talk about this problem.

Discussion

  • Klaus Post
    Klaus Post
    2003-05-31

    Logged In: YES
    user_id=578300

    Moved to feature requests

     
  • Klaus Post
    Klaus Post
    2003-05-31

    • status: open --> open-accepted
     
  • Ian Brabham
    Ian Brabham
    2004-07-17

    Logged In: YES
    user_id=673887

    Don't both convertions suggested just result is a vertical
    1,2,1 blur of the chroma?

    IanB

     
  • Ian Brabham
    Ian Brabham
    2004-07-17

    • labels: --> Filters
    • summary: YV12 interlaced<->progressive conversion needed --> YV12 interlaced<->progressive conversion needed
    • status: open-accepted --> open
     
  • Ian Brabham
    Ian Brabham
    2004-07-21

    Logged In: YES
    user_id=673887

    I was having severe brain-fade. Summary, vertical blur
    matrices. Expressed centred on current sample. YV12 input.

    converttoyuy2(interlaced=true)
    converttoyv12(interlaced=true)
    [3 26 3]/32

    converttoyuy2(interlaced=true)
    converttoyv12(interlaced=false)
    [1 3 7 5 0]/16 - top field
    [0 5 7 3 1]/16 - bottom field

    converttoyuy2(interlaced=false)
    converttoyv12(interlaced=true)
    [3 10 3]/16

    converttoyuy2(interlaced=false)
    converttoyv12(interlaced=false)
    [1 6 1]/8

    IanB

     
  • Ian Brabham
    Ian Brabham
    2006-05-10

    Logged In: YES
    user_id=673887

    Becoming quite sure this is a bad idea! DGDecode will
    output best effort decoding to YUY2 based on MPEG flags.
    Also there is a very good static area detection plugin from
    Don Graft, AUTOYUY2
    http://neuron2.net/autoyuy2/autoyuy2.html

    Need to pick scharfis' brain for his thoughts on the matter.