Log in

View Full Version : Help me determine right resize mod2 values with least apect ratio error


kalehrl
18th March 2013, 21:49
This thread is continuation from here:
http://forum.doom9.org/showthread.php?t=151159&page=154
My source is 704x576 16:9 MPEG2 capture.
I'm having troubles determining the right resize with the least amount of aspect ratio error.
Yoda and MeGUI calculators don't seem to agree (they agree if you force custom dar coefficients in Yoda).
If I choose Pal 16:9 (720x576), crop 2 pixels top and 2 bottom, uncheck ITU-R, move the slider to 704 width and use mod2, I get 704x394 - exactly the same as MeGUI.
If I choose Pal 16:9 (but this time choose 704x576), crop 2 pixels top and 2 bottom, uncheck ITU-R, move the slider to 704 width and use mod2, I get 704x402 - different from MeGUI.
The screenshots from both programs are here:
http://forum.doom9.org/showthread.php?p=1620121#post1620121
Here is a sample:
https://mega.co.nz/#!RlpCgC6R!HBQB2RUBjn1yFl1maiGmnyjqPFZZDycIOZvs8CNbDHM

Sharc
18th March 2013, 22:53
You write that your source is 704 x 576 with DAR 16:9. This strongly suggests that the PAR is 16:11 =1.454545.....

Cropping 2 from bottom and 2 from top gives a cropped picture of 704 x 572 with PAR 16:11 (the PAR is not affected by the cropping).

You can either resize to 704 x 394, or 720 x 402. Both are correct.
(The 704x394 has an unnoticeable error of 0.75 pixel because the accurate size would be 704x393.25. The 720x402 has an unnoticeable error of 0.19 pixels because the accurate size would be 720x402.19).

Jenyok
19th March 2013, 05:34
First, you will restore real size of picture (frame).
.

# DAR = 16 : 9 , PAR = 16 : 11
koef1 = 16
koef2 = 11
w = (Width(last) * koef1) / koef2 # 16/11*704=1024 i.e. 704x576->1024x576
Spline64Resize(w, Height(last), src_width=Width(last), src_height=Height(last)) # 1024 x 576, real size of frame, PAR = 1 : 1

.
Then, you will resize, crop, once again resize, any filters and so on...
.

kalehrl
19th March 2013, 15:15
Thank you for your help.
I understand now how it works.