Merge branch 'upstream/1.16' into tizen_gst_1.16.2
[platform/upstream/gstreamer.git] / docs / random / aspectratio
1 1) playing DVD on 4:3 screen
2
3 PAL DVD:
4  - video size in pixels: 720x576
5  - intended physical aspect ratio: 4/3
6  - pixel aspect ratio: 16/15
7
8 normal 4:3 computer screen:
9   - screen size in pixels: 1024x768
10   - physical aspect ratio: 4/3
11   - pixel aspect ratio: 1/1
12
13   -> scale to video size 720 . 16 / 576 . 15 =  11520 / 8640 = 144 / 108
14      = 4 / 3
15
16 2) playing PAL DVD on PAL TV
17
18 PAL DVD:
19  - video size in pixels: 720x576
20  - pixel aspect ratio: 16/15
21
22  => intended display aspect ratio: 4/3
23
24    w/h = DAR/PAR (with w and h of pixel video size)
25
26 DirectFB PAL TV output:
27   - screen size in pixels: 720x576
28   - pixel aspect ratio: 16/15
29
30   => display aspect ratio: 4/3
31
32   (v = video, source material - d = display)
33   DARv = DARd <=> wv / hv * PARv = wd / hd * PARd
34               <=> wd / hd = wv / hv * (PARv / PARd)
35   no scaling necessary
36
37
38 4) playing an NTSC vob on PAL TV
39
40 NTSC VOB (4/3):
41   - video size: 720x480
42   - pixel aspect ratio: 8/9
43
44   => intended DAR: DAR = 720/480 * 8/9 = 80 / 60 = 4 /3
45
46   wd / hd = wv / hv * PARv / PARd
47           = 720/480 * 8/9 / (16/15)
48           = 720 * 8 * 15 / (480 * 9 * 16)
49           = 120 * 1 * 5  / (80 * 3 * 2)
50           = 15 / 12
51           = 5 / 4
52
53   --> 720 x ( 720 * 4 / 5) = 720 x 576
54
55
56 5) other examples
57    - 720 x 480, 32/27 on a square display
58    -> intended DAR: DAR = 720/480 * 32/27 = 80/3 * 1/15 = 16/9
59    
60    keeping w constant:
61    720/h * 1/1 = 16/9 -> h = 720/16 * 9 = 45 * 9 = 405
62
63    keeping h constant:
64    w/480 * 1/1 = 16/9 -> w = 480 * 16 / 9 = 160 / 3 * 16 = 853.33