Info on "Deinterlace 1/2/3 pass" (DivX)

Discussion in 'CloneDVD mobile' started by justthedude, Aug 2, 2007.

  1. justthedude

    justthedude Active Member

    Info requested on "Deinterlace 1/2/3 pass" (DivX)

    I tried google, wikipedia, and this forum.
    I found good information on the definition of deinterlacing, but no good "use in an encoder" example. Especially multiple passes.

    ex: Wikipedia on interlacing
    It has a good picture that explains interlacing; it's not showing up as an embedded picture.

    I assume that CloneDVDmobile deinterlace is a single path method of reducing the effects like mouse teeth in the final DivX output.

    So understanding one-pass, and assuming that divx is progressive scan, what is the benefit of running 2 pass or 3 pass deinterlace process? One guy on this board mentioned the final file size was smaller, but that can't be the sole purpose. I didn't do the same movie twice, but I have tried a 3 pass and it came out about the size I expected.

    Feel free to correct any errors in my understanding.
     
    Last edited: Aug 2, 2007
  2. Peer

    Peer Redfox Development Team Staff Member

    I see where your confusion comes from.
    Maybe the arrangement of buttons and listboxes is not so wise, the deinterlace checkbox and the multipass dropdown might seem connected.
    they are not.
    The deinterlace option, as your research has correctly revealed, is to remove the "mouse teeth".

    The multi pass has a different purpose.

    Usually you restrict the bitrate of a resulting video either because of limited bandwidth or because of limited space.

    So the encoder constantly tries to stay within the given limit by permanently adjusting the current bitrate to maintain the desired average bitrate. This is not a constant value, as different scenes require different amount of data (e.g. a black screen requires nearly no data, whereas a fast camera moving over a football stadium full of crowded people give a huge peak).

    Because the encoding engine only "sees" the resulting bitrate of a scene just while it is encoding it, it has no time to react on the ups and downs, it will usually not encode every piece of the film with an appropriate bitrate and will have to compensate for too high a bitrate by accordingly lowering it a little more in successing frames - the latter looking worse than should be expected.

    With multipass the encoder first gathers statistics that allow it to pick appropriate bitrates ahead of time in its last run.

    So: you can either say multi pass will result in a better quality with the same file size or - which is equivalent - a smaller file size with the same quality.

    Does this make sense?
    :)
     
  3. justthedude

    justthedude Active Member

    Makes good sense. Let me try this:

    1 pass = force all bitrates towards the average. Quality = lowest.

    2 pass = gather high/low bandwidth statics on 1st pass, apply them (giving more BW on fast action, less on slow action) on 2nd pass. A good improvement in overall picture quality. Quality = higher.

    3 pass = Refinement of above. I'm guessing it provides a slight gain in quality over 2-pass. Quality = highest, but only a slight gain over 2 pass.
     
  4. Peer

    Peer Redfox Development Team Staff Member

    Nearly - you can't force all bitrates towards the average - it's actually even the other way around.
    When the encoder works on a specific frame, it will know the resulting bitrate no earlier than when it will have already done the job. The encoder works with a few adjustable variables while encoding, feeds them into the process and this will in the end result in "some unknown bitrate".
    These variables are being constantly adjusted, so the overall average bitrate can be maintained.

    Now imagine this: you have a couple of "easy" frames, so the encoder thinks "hey, cool, let's get going, tune up the variables and increase quality". This tuning up can't be done immediately, but has to happen gradually, otherwise the result would be awful.
    After these frames are done, suddenly heavy movement comes up. With "quality settings" high and very demanding scenes, the resulting bitrate pops way over the limit - the first few frames really look brilliant, but the succeeding frames, which may be similarly demanding, have to pay the price for it; the encoder is forced to lower the quality way below average to make up for those beautiful pictures it granted before...

    To make things worse, the "bad frames" look more bad than the good ones look good, so the quality suffers overall.

    Multipass simply lets the encoder know about the ranges of demanding and non-demanding video fragments, so it can use quaility settings that don't favour the first of the demanding frames.
    (btw: the same scenario happens the other way around when transitioning from simple to complex scenes).

    Yes, exactly, though - I guess everybody will expect this: the gain is a (hell of a) lot less than from 1pass to 2pass.
    You could actually do as many passes as you want, but I think that more than 3 really is just a waste of time... (that's why I limited it to 3) :)
     
  5. Matt

    Matt Well-Known Member

    Good work team Slysoft!

    Does anyone know if the files created with the Zune profile will play on the 360? I'm at work and so can't check at the moment.