PDA

View Full Version : [MeGUI] Input DAR


gizmo27
29th September 2010, 11:01
Hi,

My question is about input DAR in MeGUI : at 16:9 PAL, aspect ratio is 1.823361 : is there anymore digits ? Maybe 1.82336157... ?
If yes what's the most exact value ?
Same question with 16:9 NTSC, 4:3 PAL and 4:3 NTSC.

Thanks a lots in advance.

See you soon.

Regards,
Gizmo.

Hagbard23
29th September 2010, 11:37
aspect ratio 16:9 (1st grade mathematics): 1,777777777777777777777(add more 7 if you want to)
aspect ratio 4:3: 1,33333333333333333333333333333 (add more 3 if you want to)

hey gizmo - whats wrong? Are you not able to divide 16 by nine or what? It is a rather simple operation:

16 : 9 = 1,777777...7

where is the problem?

stax76
29th September 2010, 11:38
According to my calculations in StaxRip 1.8233618233618234 so different to MeGUI due to some rounding error, 2 decimal digits should be precise enough...

gizmo27
29th September 2010, 15:51
aspect ratio 16:9 (1st grade mathematics): 1,777777777777777777777(add more 7 if you want to)
aspect ratio 4:3: 1,33333333333333333333333333333 (add more 3 if you want to)

hey gizmo - whats wrong? Are you not able to divide 16 by nine or what? It is a rather simple operation:

16 : 9 = 1,777777...7

where is the problem?

lol yes you're right why 16:9 is not 1.77 lol ?
I'll put 200 "7" after the coma written with the hand.

@stax76 : thanks for the answer : I'll keep the MeGUI value I think it'l be better.

See you.
Regards,
Gizmo.

stax76
29th September 2010, 16:14
Internally StaxRip uses par x,y as integers so there are rounding errors but StaxRip should still have the best aspect ratio detection and calculation compared to other GUIs.

stax76
29th September 2010, 17:16
I think the figure StaxRip gave was more precise then yours, you can look at the code in StaxRip converted to a simple console application, it's rather simple, you can compare the calculations to other GUIs which will all probably give you a lot wrong detection and calculations with rare formats, I hope mines aren't wrong too. :)

768x576: 1,78009561060409
768x560: 1,78009561060409
720x576: 1,82336182336182
704x576: 1,78284267173156
702x576: 1,77777777777778
544x576: 1,83686820723858
480x576: 1,82336182336182
384x288: 1,78009561060409
384x280: 1,78009561060409
352x576: 1,78284267173156
352x288: 1,78284267173156
176x144: 1,78284267173156
720x486: 1,82336182336182
720x480: 1,82336182336182
711x486: 1,8005698005698
704x486: 1,78284267173156
704x480: 1,78284267173156
640x480: 1,78284372823155
480x480: 1,82336182336182
352x480: 1,78284267173156
352x240: 1,78284267173156
320x240: 1,78284372823155


Module Module1
Sub Main()
For Each f In GetFormats()
Dim samplingWidth = 52.0
Dim itu = True
Dim is16_9 = True

If Not itu Then
samplingWidth = f.Width / f.SamplingRate
End If

Dim x = If(is16_9, 16 / 9, 4 / 3) * f.Height
Dim y = f.SamplingRate * samplingWidth

Console.WriteLine(f.Width & "x" & f.Height & ": " & (x * f.Width) / (y * f.Height))
Next

Console.ReadLine()
End Sub

Function GetFormats() As VideoFormat()
Return {New VideoFormat(768, 576, 14.75),
New VideoFormat(768, 560, 14.75),
New VideoFormat(720, 576, 13.5),
New VideoFormat(704, 576, 13.5),
New VideoFormat(702, 576, 13.5),
New VideoFormat(544, 576, 10.125),
New VideoFormat(480, 576, 9.0),
New VideoFormat(384, 288, 7.375),
New VideoFormat(384, 280, 7.375),
New VideoFormat(352, 576, 6.75),
New VideoFormat(352, 288, 6.75),
New VideoFormat(176, 144, 3.375),
New VideoFormat(720, 486, 13.5),
New VideoFormat(720, 480, 13.5),
New VideoFormat(711, 486, 13.5),
New VideoFormat(704, 486, 13.5),
New VideoFormat(704, 480, 13.5),
New VideoFormat(640, 480, 12.27272),
New VideoFormat(480, 480, 9.0),
New VideoFormat(352, 480, 6.75),
New VideoFormat(352, 240, 6.75),
New VideoFormat(320, 240, 6.13636)
}
End Function
End Module

Public Structure VideoFormat
Sub New(ByVal width As Integer,
ByVal height As Integer,
ByVal samplingRate As Double)

Me.Width = width
Me.Height = height
Me.SamplingRate = samplingRate
End Sub

Property Width As Integer
Property Height As Integer
Property SamplingRate As Double
End Structure

gizmo27
30th September 2010, 12:47
Thanks for the answer.
See you soon.

Regards,
Gizmo.

gizmo27
3rd October 2010, 19:00
Hi,

Is there any DAR for the usual HD resolution 720p and 1080p 16:9 & 4:3 ? If yes which ones ?
Or the DAR is 1.777778 for 16:9 & 1.333333 for 4:3 ?

Thanks.

Regards,
Gizmo.