View Full Version : Pillarbox
daWsOn_s
15th April 2009, 23:26
I need to upscale a 4:3 720x576p file to 1280x720p pillarboxed.
I need help with the math :rolleyes: considering the movie aspect is 1,33 how many black lines (borders) do I have to add to respect 1,33 into 1280x720? I just did a subtraction 1280-720 so I had the black bars needed so I wrote
AddBorders(140,0,140,0)
LanczosResize(1280,720)
This outputs the correct file but in 1.25:1. I need the method to get 1,33. I supposed I should remove some black vertical lines to stretch horinzontally the aspect, but how many?
Thanks
daWsOn_s
15th April 2009, 23:34
Stupid question just need to calculate with 768:p
Gavino
16th April 2009, 00:10
I would resize first, before adding the borders. Among other things, the calculation is easier to understand that way.
Your final height is 720, so the effective movie width is 4/3 x 720 = 960.
Therefore you need to add borders of 320 (so 160 each side) to get a final width of 1280.
LanczosResize(960,720)
AddBorders(160,0,160,0)
daWsOn_s
17th April 2009, 00:03
Thank you
hanfrunz
20th April 2009, 17:39
To get a correct PAR you need to resize your 720x576 to 788x576! (look here for explanation (http://www.bbc.co.uk/commissioning/tvbranding/picturesize.shtml)). Do all your math from here: 720/576 * 788 = 985. Lets use 984 to be mod4. Then resize to 984x720 and addborders(148,0,148,0). If you need a real 4x3 picture you have to crop to 960.
hanfrunz
Alex_ander
20th April 2009, 20:20
A 4:3 image should occupy here 960x720 independently of calculation method.
Following ITU, the original source needs cropping to 702x576 (which corresponds to 4:3; only borders will be cropped at this), then it can be resized to 960x720 with 160+160 borders (as already posted).
The BBC method is not wrong, it is ineffective since uses secondary values called PAR (just to multiply, then divide by the same value somewhere in the middle of the way). They could have used 2 lines of calculations instead of 7 for exactly the same result (as shown in a recent thread).
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.