VideoHelp Forum




+ Reply to Thread
Results 1 to 12 of 12
  1. I've read a bunch of guide that teach to use multiples of 4, 8 or 16 when selecting a vertical resolution. Which is it: 4, 8, or 16? Also, seems like the strict 16 rule only works with 2.35:1 or 1.33:1 materials since both 1.85:1 and 1.78:1 gives pretty big rounding errors, i.e.:

    640/1.85 = 345.946 / 16 = 21.6 so use 22 and you get 22x16 = 352 or a resize of 640x352. Problem with that is the new AR is 1.82.

    640/1.78 = 359.55 then /16 = 22.47. Rounded down and you're at the same AR as the 1.85:1 calculation. Round it up and you're @ 640x368 which is an AR of 1.74:1

    Am I missing something here?
    http://encoding.n3.net <-- for all your DVD and CD backup needs!
    Quote Quote  
  2. Originally Posted by graysky
    I've read a bunch of guide that teach to use multiples of 4, 8 or 16 when selecting a vertical resolution. Which is it: 4, 8, or 16?
    Depends. Some codecs have specific requirements. Xvid for example requires a multiple of 2. Others require 4, 8 or 16. MPEG 1, 2 and 4 are all most efficient at multiples of 16 because they break the image into 16x16 blocks and process from there.

    But the whole issue is overblown. We're talking about tiny difference in encoding efficiency -- on the order of 1 percent (unless you're using tiny frame sizes). As long as the encoder supports the frame size you'll be fine.
    Quote Quote  
  3. Thanks for the info on this, jagabo. meGUI has flashed up warnings about violating the mod16 resolution before but the encode went fine. What is this "multiple of 2" rule called so that I can read more about it?

    Thanks.
    http://encoding.n3.net <-- for all your DVD and CD backup needs!
    Quote Quote  
  4. If I'm reading this right, the compression hit can be (depending on resolution) much greater than 1%, even for larger resolutions. THeWEF (original developer of GKnot) has this to say about it:
    divx is encoded in macroblocks of 16 x 16 pixels.

    e.g.:

    640 x 272 = 174080 pixels = 680 macroblocks.

    640 x 274 = 175360 pixels (0.7% more) = 720 macroblocks (5.9% more).

    more macroblocks - more compression overhead.

    for compressibility reasons i highly recommend to at least use w-mod and h-mod of 16 pixels.

    w-mod 32 is recommended for playback compatibility on older gfx-cards.
    http://forum.doom9.org/showthread.php?t=42708

    In my opinion, MEGUI is complaining for good reason. In order to use mod16 heights and widths, at the same time getting a low aspect error, the best way, even today many years later, is to use the Resolution Tab of GKnot. Make the D2V and open it in GKnot. Low Aspect Error often means cutting a few pixels from the active video, after you've cropped away all the black. Aim for less than 0.5% Aspect Error and you'll be fine.

    Multiple of 2 partly depends on the color space being used, and whether you're cropping the height or the width. If interlaced and YV12, you'll have to crop the height by Mod4 or all kinds of horrible things might happen. Just because a codec supports Mod2, doesn't mean you should use it:

    http://avisynth.org/index.php?page=Crop

    At the bottom.
    Quote Quote  
  5. I don't know if it has a name but I can tell you where it comes from. MPEG codecs use the YUV colorspace with planar YV12 subsampling internally. The U and V (color) planes are stored at half the resolution of the Y (intensity) plane. A 720x480 frame has a 720x480 Y plane with 360x240 U and V planes. So the full frame size needs to be a multiple of 2 to keep the U and V planes from having half pixels. (Of course, in practice, there are no half pixels. There would have to be special handling to account for it.)
    Quote Quote  
  6. Originally Posted by manono
    If I'm reading this right, the compression hit can be (depending on resolution) much greater than 1%, even for larger resolutions. THeWEF (original developer of GKnot) has this to say about it:
    divx is encoded in macroblocks of 16 x 16 pixels.

    e.g.:

    640 x 272 = 174080 pixels = 680 macroblocks.

    640 x 274 = 175360 pixels (0.7% more) = 720 macroblocks (5.9% more).

    more macroblocks - more compression overhead.

    for compressibility reasons i highly recommend to at least use w-mod and h-mod of 16 pixels.

    w-mod 32 is recommended for playback compatibility on older gfx-cards.
    http://forum.doom9.org/showthread.php?t=42708
    Yes, but those partial blocks at the edges won't take as much bitrate as full blocks in the rest of the frame.

    Using your 640x272 vs. 640x274 line example, the difference in a test Xvid encode using constant quantizer encoding (where the difference shows up as file size rather than image quality) was around 3 percent (and keep in mind the the 274 line image had 0.7 percent more pixels to account for).

    Obviously, Mod16 is better if you don't mind the small aspect ratio error. But using Mod2, Mod4, or Mod8 isn't the end of the world.
    Quote Quote  
  7. Hi-

    OK, that makes sense. It's up to the encoder to decide whether or not he finds 3% or less to be a significant compression hit. Me, I've made probably 99% of my encodes Mod16, and the remaining 1% Mod8 for the height. As for the possible aspect error, as I mentioned in my previous post, cutting a very few pixels into the active video gets rid of it entirely. I've never had any hesitation about doing that, although some people don't like to do that. Also, a common resolution such as 640x272 often isn't the right resolution for a so-called 2.35:1 movie, which more often than not is really 2.40:1 or greater. So, better might be something like 656x272 or 624x256, or some slight cropping of the video to restore the AR if encoding for 640x272. Again, GKnot is ideally suited for this sort of thing. When graysky says 640x272 works out great (no rounding error), that's often not the case. Just check the aspect ratio sometime after cropping away the black.

    Sorry, but for me, using Mod2 or Mod4 is a sign of encoder incompetence. It's no skin off my back if someone prefers to do it that way. I don't have to watch them. End of the world? No, of course not, but I was taught to do it right.
    Quote Quote  
  8. Originally Posted by manono
    Sorry, but for me, using Mod2 or Mod4 is a sign of encoder incompetence. It's no skin off my back if someone prefers to do it that way. I don't have to watch them. End of the world? No, of course not, but I was taught to do it right.
    It's not a matter of right and wrong. It's a matter of what compromises you choose to make.
    Quote Quote  
  9. OK, I apologize for getting testy. The point I wanted to make is that there are differing points of view on this subject.
    Quote Quote  
  10. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    AND...

    one point being the "rule of Mod16" use (>>>edit: "is still"<<<)being a pretty good one to stick to.

    I personally have NO trouble with it. But then, I usually just use 720, 704, 640, 576, 544, 480, 352, 320, 288, 240, etx. and those are all mod 16. (Many of my things are kept anamorphic throughout).

    Scott
    Quote Quote  
  11. I usually use Mod16 too. I just wanted to point out that the difference wasn't as big as it's often made to sound.
    Quote Quote  
  12. thanks for the replies, all
    http://encoding.n3.net <-- for all your DVD and CD backup needs!
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!