View Single Post
Old 4th June 2008, 06:45   #68  |  Link
mikeytown2
Resize Abuser
 
mikeytown2's Avatar
 
Join Date: Apr 2005
Location: Seattle, WA
Posts: 623
Been thinking about format conversions. Looked at this guide as well as this calculator.

ZoomBox can do subpixel Resizes, thus no DAR error. This is what i got, I've never dealt with PAL, so help me out!
Code:
ntscdar_W = (4752.0/4739.0) / (4320.0/4739.0) * (486.0/486.0) * 640.0
ntscdar_H = (486.0/486.0) * 480
ntscDAR = ntscdar_W/ntscdar_H
ColorBars().Trim(0,-1).KillAudio().AssumeFPS(30)
a = BlankClip(last,1,720,480).Subtitle("""640×480 "industry standard" square pixels to 720×480 ITU-R BT.601 pixels""", align=5)
b = BilinearResize(720,480).Subtitle("Incorrect conversion from square pixel 640x480 to DVD frame size, 720x480", align=5)
c = BilinearResize(704,480).AddBorders(8,0,8,0).Subtitle(""" "Correct" conversion from square pixel 640x480 to DVD frame size, 720x480""", align=5)
d = ZoomBox(720,480, DisplayAR=ntscDAR, Align=-5).Subtitle("Correct conversion from square pixel 640x480 to DVD frame size, 720x480  DAR=" + String(ntscDAR), align=5)
e = ZoomBox(720,480, DisplayAR=ntscDAR, Align=5).Subtitle("Correct conversion from square pixel 640x480 to DVD frame size, 720x480  DAR=" + String(ntscDAR), align=5)
y = a+b+c+d+e

paldar_W = (768.0/767.0) / (4320.0/4739.0) * (486.0/576.0) * 768.0
paldar_H = (486.0/576.0) * 576.0
palDAR = paldar_W/paldar_H

f = BlankClip(last,1,720,480).Subtitle(""" "Industry standard" 625/50 square-pixel to 720×480 ITU-R BT.601 pixels""", align=5)
ImageReader("180pxpm5544768zx5.png",0,0,Pixel_type="RGB32").AssumeFPS(30)
g = BilinearResize(720,480).Subtitle("Incorrect conversion from square pixel 768x576 to DVD frame size, 720x480", align=5)
h = BilinearResize(712,486).crop(0,3,0,-3).addborders(4,0,4,0).Subtitle(""" "Correct" conversion from square pixel 768x576 to DVD frame size, 720x480""", align=5)
i = ZoomBox(720,480, DisplayAR=palDAR, Align=5).Subtitle(" Correct conversion from square pixel 768x576 to DVD frame size, 720x480  DAR=" + String(palDAR), align=5)
j = ZoomBox(720,480, DisplayAR=palDAR, Align=-5).Subtitle(" Correct conversion from square pixel 768x576 to DVD frame size, 720x480  DAR=" + String(palDAR), align=5)
z = f+g+h+i+j

y+z

http://en.wikipedia.org/wiki/Test_card



Also minor update to ZoomBox, should work when DisplayAR is not given.

Last edited by mikeytown2; 5th June 2008 at 22:08.
mikeytown2 is offline   Reply With Quote