]> git.sesse.net Git - nageru/commitdiff
Up the timebase so that it can handle 23.976 fps accurately.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 22 Jan 2017 21:39:21 +0000 (22:39 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 22 Jan 2017 21:39:21 +0000 (22:39 +0100)
timebase.h

index 3d335fd3ca9ccec07a4eb628559f178d1079f33a..dbc4402c1820d454528bd952feeb7c90ef1b8dd2 100644 (file)
@@ -4,19 +4,20 @@
 // Common timebase that allows us to represent one frame exactly in all the
 // relevant frame rates:
 //
-//   Timebase:              1/60000
-//   Frame at 50fps:     1200/60000
-//   Frame at 60fps:     1000/60000
-//   Frame at 59.94fps:  1001/60000
+//   Timebase:                1/120000
+//   Frame at 50fps:       2400/120000
+//   Frame at 60fps:       2000/120000
+//   Frame at 59.94fps:    2002/120000
+//   Frame at 23.976fps:   5005/120000
 //
 // If we also wanted to represent one sample at 48000 Hz, we'd need
 // to go to 300000. Also supporting one sample at 44100 Hz would mean
 // going to 44100000; probably a bit excessive.
-#define TIMEBASE 60000
+#define TIMEBASE 120000
 
 // Some muxes, like MP4 (or at least avformat's implementation of it),
-// are not too fond of values above 2^31. At timebase 60000, that's only
-// about ten hours or so, so we define a coarser timebase that doesn't
+// are not too fond of values above 2^31. At timebase 120000, that's only
+// about five hours or so, so we define a coarser timebase that doesn't
 // get 59.94 precisely (so there will be a marginal amount of pts jitter),
 // but can do at least 50 and 60 precisely, and months of streaming.
 #define COARSE_TIMEBASE 300