File: aspectratio

package info (click to toggle)
gstreamer1.0 1.28.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,604 kB
  • sloc: ansic: 203,072; python: 1,985; sh: 566; lex: 188; lisp: 154; java: 81; makefile: 59; cpp: 58; perl: 46
file content (64 lines) | stat: -rw-r--r-- 1,528 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
1) playing DVD on 4:3 screen

PAL DVD:
 - video size in pixels: 720x576
 - intended physical aspect ratio: 4/3
 - pixel aspect ratio: 16/15

normal 4:3 computer screen:
  - screen size in pixels: 1024x768
  - physical aspect ratio: 4/3
  - pixel aspect ratio: 1/1

  -> scale to video size 720 . 16 / 576 . 15 =  11520 / 8640 = 144 / 108
     = 4 / 3

2) playing PAL DVD on PAL TV

PAL DVD:
 - video size in pixels: 720x576
 - pixel aspect ratio: 16/15

 => intended display aspect ratio: 4/3

   w/h = DAR/PAR (with w and h of pixel video size)

DirectFB PAL TV output:
  - screen size in pixels: 720x576
  - pixel aspect ratio: 16/15

  => display aspect ratio: 4/3

  (v = video, source material - d = display)
  DARv = DARd <=> wv / hv * PARv = wd / hd * PARd
              <=> wd / hd = wv / hv * (PARv / PARd)
  no scaling necessary


4) playing an NTSC vob on PAL TV

NTSC VOB (4/3):
  - video size: 720x480
  - pixel aspect ratio: 8/9

  => intended DAR: DAR = 720/480 * 8/9 = 80 / 60 = 4 /3

  wd / hd = wv / hv * PARv / PARd
          = 720/480 * 8/9 / (16/15)
          = 720 * 8 * 15 / (480 * 9 * 16)
          = 120 * 1 * 5  / (80 * 3 * 2)
          = 15 / 12
          = 5 / 4

  --> 720 x ( 720 * 4 / 5) = 720 x 576


5) other examples
   - 720 x 480, 32/27 on a square display
   -> intended DAR: DAR = 720/480 * 32/27 = 80/3 * 1/15 = 16/9
   
   keeping w constant:
   720/h * 1/1 = 16/9 -> h = 720/16 * 9 = 45 * 9 = 405

   keeping h constant:
   w/480 * 1/1 = 16/9 -> w = 480 * 16 / 9 = 160 / 3 * 16 = 853.33