happycube / ld-decode

Software defined LaserDisc decoder
GNU General Public License v3.0
294 stars 76 forks source link

y4m: Use more accurate values for PAR #879

Closed ifb closed 4 months ago

ifb commented 5 months ago

The old values were close enough, but change them to follow EBU R92 and SMPTE RP 187.

There are multiple ways to calculate PAR for NTSC 525-line content. NTSC does not have a history of well-defined active lines (480 to 487) or active line times (or blanking). SMPTE RP 187 (and its Annex A.4) was an attempt to standardize the 4:3 clean aperture, but it was withdrawn so I don't know how much acceptance it ever achieved. Studio blanking (SMPTE 170M, 10.7us) is within broadcast tolerance (BT.470-6,10.9us +/- 0.2us), but Poynton suggests 52+8/9us active line time. This is just barely outside of BT.470, but is a convenient integer number of Rec.601 samples (exactly 714 samples vs. 713.55). This matches closely with RP 187, so that's why I've decided on using RP 187.

Note that Annex A.4 doesn't apply to 16:9 content.

For 625-line content, EBU R92 is newer than the withdrawn RP 187 (1999 vs. 1995) so I recommend R92. The difference in the two is very small anyway (much less than between any of the various 525-line options).