VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 16 of 16
Thread
  1. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    When resampling non-square pixels to square pixels, it seems like examples always preserve the height and shrink the width; for e.g. a 720x480 NTSC frame (using the ITU "Exact" PAR of 72:79, so I read) one scales down the 720 dimension to 656x480.

    I always wonder why such scalings don't leave the width and instead grow the height: 720x527.

    Obviously you don't magically get new detail for free, but at least you aren't throwing any away.

    Am I missing something? Does the upscaling of Y typically cause artifacts that outweigh the detail that would be lost in the downscaling of X?

    Thanks,
    -c

    Vaguely related P.S. -- when to use the "Exact" vs "Standard" ITU PAR?
    Quote Quote  
  2. Member
    Join Date
    Sep 2012
    Location
    Australia
    Search Comp PM
    Because analogue NTSC/PAL has a fixed number of horizontal lines (~480 and 576). There are specific times where a display is supposed to switch to a new lines or go back to the top. However they don't have anything to discern horizontal pixels, horizontally the resolution is whatever detail you manage to retain in the recording/broadcasting process. The actual amount of horizontal detail from recording analogue sources to DVD is generally LESS than 720 pixels wide, yet the height is a constant. Resizing vertically definitely loses detail (even if it's resizing up), resizing horizontally doesn't necessarily lose any meaningful detail (even if it's resizing down).

    Something like that.
    Quote Quote  
  3. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    Ah, thanks. That makes sense.

    I just tried it on 6 or 7 still sample frames (scaling them manually in GIMP), and even with the terrible source material I'm working with (which certainly doesn't need all 720 horizontal pixels) I still couldn't see a visual improvement with the "shrinking" method, so I think I'll stick to my "growing" method for the sake of keeping 20% more pixels around.

    So I guess, based just on my totally non-representative sample, that I'd argue that the vertical growth introduces negligible problems, and while the horizontal shrinkage may not lose any actual detail, it does lose overall picture size, which is arguably relevant when dealing with such small frames to begin with.

    Thanks for the discussion.

    And if anyone has insight on "exact" vs "standard", I'm all ears.

    -c
    Quote Quote  
  4. Member
    Join Date
    Sep 2012
    Location
    Australia
    Search Comp PM
    By exact vs standard do you mean removing ITU padding and then resizing to 4:3?

    It should be rather obvious when a source has applied ITU padding, although I have come across instances of ITU padding being added on and off within a single source.

    I think the rule for padding is to remove whatever is there and then resize whatever is left to 4:3 (or 16:9) on playback.

    https://forum.videohelp.com/threads/350702-720x576-PAL-DVD-not-cropped-to-center-most-7...576-(4-3)-part

    The DVD spec refers to the MPEG 2 spec with regard to aspect ratios. The MPEG 2 spec is very clear: the entire frame comprises the DAR (unless overridden by a "sequence display extension"*). That is at odds with the ITU digital video spec which says the inner 704x480 (~702x576) subsection comprises the DAR and the extra 8 columns left and right are for padding in case the analog signal or capture is off center.

    In my experience, most DVD players scale the entire frame to the output resolution when putting out high definition HDMI. When putting out a standard definition analog signal they follow the ITU spec.

    Individual DVDs vary in whether they follow the ITU spec or the MPEG 2 spec. Most analog sourced DVDs follow the ITU spec. -- presumably because they used ITU based equipment to capture and left the digital video as-is. Many (most?) direct film-to-digital transfers follow the MPEG 2 spec. In general I don't think anyone in the industry cares about the conflicting specs. Nobody can see the AR difference just watching the screen.

    * The Sequence Display Extension is a mechanism for specifying what portion of the frame comprises the indicated DAR. I've only ever seen this used for pan-and-scan purposes. And even there the DAR is set to 4:3 and the subsection is always 540x480 (or 540x576). That implies the full frame is 16:9.
    Quote Quote  
  5. Most of it is just habit/herd mentality, I guess. When people started mass ripping to non-VCD/non-DVD files (Xvid/DivX AVI) many players could not play resolutions bigger than 720x576 so the choice to upscale didn't really exist. Today people who want quality either rip square pixels from Blu-ray or if that's not available upscale or keep anamorphic.
    Quote Quote  
  6. Member
    Join Date
    Sep 2012
    Location
    Australia
    Search Comp PM
    (720 / 4) * 3 = 540

    720x540 < 720x576...
    Quote Quote  
  7. Anamorphic 4:3 PAL needs a scale factor of about 12/11. 720 * 12/11 = 785 > 720. Factors for 16:9 NTSC and PAL are also >1.

    You may be lucky with 4:3 NTSC if the player supports 720x576 because the factor is 10/11 and 480 x 11/10 < 576. Or if there are big black bars. (Well, historically. In the time of 4K smart phones we should ignore such outdated limits unless we author a DVD.)
    Quote Quote  
  8. Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by ndjamena View Post
    (720 / 4) * 3 = 540

    720x540 < 720x576...
    The issue with that simple conversion is that 540 is not mod16. To ensure mod2,4,8 and 16 it would have to be 544.

    Now I may be wide of the mark but I am sure I read somewhere that a danger of resizing on the vertical can screw up interlacing and you could end up with artifacts if you do not take extra care.

    Discussion of ITU etc just goes over my head. I just consider how that 720*576 or 720*480 image will be displayed. So for PAL one gets 768*576 for 4:3 or 1024*576 for 16:9 and for NTSC 640*480 for 4:3 and 852(or 854)*480 for 16:9
    Quote Quote  
  9. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    Sorry, I should have been more clear with what I'm doing:

    This is 80's camcorder footage, transferred to DVD by an unknown-by-me (but discoverable if it matters) DVD recorder at 720x480.

    My pipeline is to copy over the VOB, covert to mpg (already done using dvdvob2mpg), de-interlace it to 59.94fps (already done with QTGMC), and convert it to square pixels. Let's take it as read that I will be upscaling, as opposed to downscaling.

    My understanding (please correct if wrong) is that a 4:3 DAR isn't correct here, because the device captured at 720x480, aka "full frame" (yes, there are black bars on the sides of the image; let's not worry about cropping for now.)

    On a thread somewhere I saw that the PAR of NTSC isn't 8:9 as you'd maybe expect (i.e. 4:3 DAR) but rather is actually either the ITU "standard" 10:11 (as used in wikipedia articles here and here) or the ITU "exact" 72:79, which is effectively what appears when I open the vob/mpg via AVS script in MeGUI to do the deinterlacing.* (I don't do the resize via MeGUI, though, for the record).

    I don't know much about any of this, but I was trusting MeGUI and going with the "Exact" ITU DAR, and coming up with 720x527. But if anyone has insight on this, I'd appreciate it.

    Thanks again,
    -c

    * based on 72:79, I calculate the ITU "Exact" DAR to be 1.3670886076... but megui shows 1.367377... not sure why the discrepancy, but it's negligible. I don't know if MeGUI is reading that DAR from the file somehow, or just assuming based on the MPEG-2 codec and the SAR.
    Quote Quote  
  10. Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    Slow this down.

    Forget about the camcorder since your source is now a dvd. All NTSC dvds are 720*480 SAR and they are either 4:3 or 16:9 DAR.

    But whatever you do do not end up with a video of 720*527 - you could not do it anyway since it is not even divisible by 2.

    If you must upscale above 480 do it in multiples that divide equally by 3 and divide equally by 16.
    Quote Quote  
  11. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    Originally Posted by DB83 View Post
    All NTSC dvds are 720*480 SAR and they are either 4:3 or 16:9 DAR.
    Is that true? Everything I read says that NTSC is not actually a 4:3 DAR -- that it's close, but not quite.

    Wikipedia here lists 720x480 as scaling to 654x480, which is not DAR 1.3333, it's a DAR of 1.3625, which matches their listed PAR of 10:11 (which I've seen described as "ITU Standard" as opposed to "ITU Exact".). The "72:79" I referred to was apparently not actually correct for my case; I do find this link, though, which supplies a PAR of 4320:4739 (the table is all the way at the end of the page)... that equates to a DAR of:

    (4320/4739)*(720/480) = 1.367377

    ...which is exactly what MeGUI AviSynth script creator has as the DAR for "ITU 4:3 NTSC", which leads me to 720x527.

    But whatever you do do not end up with a video of 720*527 - you could not do it anyway since it is not even divisible by 2.
    I just want to avoid scaling when possible, so I was going to keep the horizontal resolution the same, scale up vertically to square the pixels, and letterbox to mod16 or whatever.

    Am I on track?
    Quote Quote  
  12. Member
    Join Date
    Sep 2012
    Location
    Australia
    Search Comp PM
    720x480 scales to 654x480 because wikipedia is assuming

    the actual image (be it 4:3 or 16:9) is always contained in the center 704 horizontal pixels of the digital frame
    which isn't actually the case.

    Like I said, content sourced from analogue sources generally have the ITU padding, but a lot of modern content sourced from digital HD masters don't and cropping the 16 pixels away would be a mistake. Content taken from an analogue source that also contains content from a digital source can have a mix of both.

    I don't know why wikipedia bothers listing 654x480 as an output resolution when it also says those extra 16 columns should be discarded... it just makes everything harder to understand.

    Basically all wikipedia is saying is that 704x480 should be scaled to 640x480, the 654x480 is a red herring because it's just saying what 720 should be scaled to if you don't remove the ITU padding. But the whole thing is a crock because modern content doesn't have the padding in the first place so 720x480 should be scaled to 640x480 in those cases anyway.

    If your source has ITU padding then remove the padding and scale whatever is left to 4:3. 704 isn't even a mandatory "active picture" size.

    When dealing with video there's nothing clean going on there, you just have to deal with whatever is put in front of you the best you can.
    Last edited by ndjamena; 20th Feb 2017 at 20:00.
    Quote Quote  
  13. Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    Well that is the info in the 2nd series of numbers - ie full frame.

    The first series of numbers, without blanking, concur to what I already quoted.

    I am no expert. I just do what 'feels' right.

    But I can not help you any more. You are always free to do whatever you wish.
    Quote Quote  
  14. Someone here who had access to the DVD spec indicated that it simply refers you to the the MPEG 2 spec for aspect ratios. The MPEG 2 spec is quite clear. The flagged DAR is for the entire frame (there is no SAR information in the MPEG 2 data) unless there is a "sequence_display_extension" indicating otherwise. The only time I've seen a DVD use a sequence_display_extension is when a 16:9 DVD flagged the video as 4:3 DAR and the sequence_display_extension indicates that 4:3 image is in a 540x480 portion of the 720x480 frame. Note: that also implies that the entire 720x480 frame is exactly 16:9 (4:3 * 720 / 540 = 16:9). This is probably why the DVD spec includes 704x480 as a valid frame size. But I've never seen a commercial DVD use it.

    The problem is that the ITU spec for digitizing analog video specifies the 4:3 image is in a 704x480 frame -- and capture devices usually capture a little more to the left and right in case the picture is slightly off center. So they usually capture 720x480. Since the 4:3 image is in a 704x480 portion of that frame the full 720x480 frame's DAR is slightly wider than 4:3.

    Apparently, nobody in the industry cares about the difference between the MPEG 2 and ITU specs. When SD analog video is digitized it is done with standard ITU equipment and the full 720x480 frame is written to DVD, ignoring the difference between the two specs. The DVD players I've tested are schizophrenic with regard to this. At the SD analog outputs they follow the ITU spec. At the upscaled HDMI output they follow the MPEG 2 spec.

    Note that for PAL DVD the issue is the same except the frame size is 720x576. And in reality 704 isn't the exact value. For NTSC video it's closer to 703 and for PAL video it's closer to 702. Those are usually rounded to 704 because 704 is mod 16, and "close enough".
    Quote Quote  
  15. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    Ah, got it, so DAR 4:3 is truly 4:3 (or very close, see below) if you aren't starting with a "full-frame" capture like I am. Thanks for clearing that up for me.

    But the whole thing is a crock because modern content doesn't have the padding in the first place so 720x480 should be scaled to 640x480 in those cases anyway.
    Gotcha. My content does have the padding, for the record.

    The only discrepancy I'm still seeing is a couple authoritative-sounding places saying that that 4:3 isn't quite the DAR. Said another way, that the PAR isn't 10:11 but 4320:4739.

    So that yields a cropped 704x480 frame with a DAR of 1.336990 which would round to 642x480, instead of the standard 640x480. I assume this is the difference between (and the explanation for) "exact" vs "standard" ITU PARs. Not a critical difference, obviously, but interesting.

    When dealing with video there's nothing clean going on there, you just have to deal with whatever is put in front of you the best you can.
    I'm learning that.
    Quote Quote  
  16. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    Thanks, jagabo -- I think I'm clear (enough) on it now.

    The first series of numbers, without blanking, concur to what I already quoted.
    Yes -- I guess the discrepancy in our numbers was maybe that you thought my frame was a "modern" 720x480 that should be scaled to 4:3, where it actually has the vertical bars on either side, so it should be cropped and then scaled to 4:3 as you directed.

    Anyway, I think I understand what is happening now.

    And good riddance to non-square pixels and confused standards, by the way.
    Quote Quote  



Similar Threads