VideoHelp Forum




+ Reply to Thread
Results 1 to 7 of 7
  1. There are different PAR's, or pixel aspect ratios, on DVD's.

    I want to find out:

    1. Is pixel width of pal and ntsc widescreen dvd's greater, equal, or less than the pixel width of a square pixel ?

    2. Is pixel height of pal and ntsc widescreen dvd's greater, equal, or less than the pixel width of a square pixel ?

    Because, when I encode the MPEG2 stream from a DVD, to H.264, using AviSynth and the x264 encoder, I want to avoid upscaling of width and height.

    I don't want to encode it anamorphic. I would prefer square pixels instead, and to downscale the width to mod16 and the height to mod2, but just enough to maintain the closest original aspect ratio of the frame (minus any cropping of course).

    So for example, if the source is PAL DVD widescreen 16:9, wich has a resolution of 720x576 pixels, if I apply Lancsoz(720, 400) in AviSynth, what happens to width, assuming that I didn't apply the crop filter ? It remains untouched ? Is it downscaled because source pixel width is greater than the width of a sqare pixel ? Or is it upscaled because source pixel width is less than the width of a sqare pixel ?

    Same for height. Assuming that I did not apply the crop filter in AviSynth, if the source is NTSC DVD 4:3, wich has a resolution of 720x480, and I apply Lancsoz(640, 480), the height will be: untouched, downscaled, or upscaled ?
    Quote Quote  
  2. technically anamorphic is "best" because it's the same as original (no scaling)

    For square pixel equivalents:
    PAL 16:9 gets resized to 1024x576
    NTSC 16:9 gets resized to 854x480 (or 848x480 if you want mod16)

    Note - In both these cases , the height isn't scaled . (576=576, and 480=480)


    So for example, if the source is PAL DVD widescreen 16:9, wich has a resolution of 720x576 pixels, if I apply Lancsoz(720, 400) in AviSynth, what happens to width, assuming that I didn't apply the crop filter ? It remains untouched ? Is it downscaled because source pixel width is greater than the width of a sqare pixel ? Or is it upscaled because source pixel width is less than the width of a sqare pixel ?
    If you reduce the height (e.g. 720x400, 720x404 or some other combination), then you reduce the vertical resolution (reduced substantially in the PAL case, because it starts with 576).

    Also , 1024x576 is a lot of "pixels" to encode - it takes a lot more bitate to maintain a certain level of "quality"

    Those are reason why "anamorphic" is "better"

    Same for height. If the source is NTSC DVD 4:3, wich has a resolution of 720x480, and I apply Lancsoz(640, 480), the height will be: untouched, downscaled, or upscaled ?
    For the 4:3 NTSC case, height is untouched (480 = 480)
    Quote Quote  
  3. Code:
    704x480 NTSC 16:9 DAR: PAR = 40:33
    704x480 NTSC  4:3 DAR: PAR = 10:11
    720x480 NTSC 16:9 DAR: PAR = 32:27
    720x480 NTSC  4:3 DAR: PAR = 8:9
    
    704x576  PAL 16:9 DAR: PAR = 16:11
    704x576  PAL  4:3 DAR: PAR = 12:11
    720x576  PAL 16:9 DAR: PAR = 64:45
    720x576  PAL  4:3 DAR: PAR = 16:15
    If you want square pixels: since DVD comes in only two DARs you can simply resize to any frame size that matches that aspect ratio, then crop if necessary.

    But keep in mind: any time you scale digitally you lose some quality. I usually leave the video with the original PAR and signal it in the encoder.
    Last edited by jagabo; 30th Nov 2012 at 10:56.
    Quote Quote  
  4. @ poisondeathray: I agree anamorphic is best, but there is a little paradox. Let's assume that the source has black bars on the sides, each 20 pixels wide. If I go the anamorphic route, after I crop 40px from width, I'm left with 680px wich is not mod16. If I go the downscaling route, I can crop-left 20px and crop-right 20px, an then downscale to the next-lower-mod16-after-680px, but at least I'm not forced to crop until the next-lower-mod16-after-680px...

    Because I understand that, if I do not crop the black borders to keep it both mod16 and anamorphic, the encoder will not be efficient at predicting some movement or what it is that it needs to do to maximize compression efficiency.

    That's why I decided to downscale, but only enough to maintain the original AR minus crop.
    Quote Quote  
  5. mod16 isn't a big deal for h.264 . h.264 can use 8x8, 8x4, 4x4 , 16x8 blocks, etc.... (internally it will be padded to 16 anyway.)

    Using non mod16 resolution is a tiny, neglible loss in compression efficiency. 680 is mod8 so that should be fine for whatever use (filter compatiblity etc...) . Look - 1080 isn't mod16 either... and it's a commonly used resolution
    Quote Quote  
  6. Originally Posted by codemaster View Post
    ...and I apply Lancsoz(640, 480), the height will be: untouched, downscaled, or upscaled ?
    To avoid the resizing quality hit, no matter how small it is, when the output height or width is the same as the input, do it like this:

    LanczosResize(640, Height)

    But I agree with pdr and jagabo that if the player honors the PARs set, it's better to encode anamorphically.
    Last edited by manono; 30th Nov 2012 at 18:00.
    Quote Quote  
  7. Originally Posted by codemaster View Post
    Because I understand that, if I do not crop the black borders to keep it both mod16 and anamorphic, the encoder will not be efficient at predicting some movement or what it is that it needs to do to maximize compression efficiency.
    Yes, but the difference is less than ~one percent unless you're using tiny frame sizes.
    Quote Quote  



Similar Threads

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