38 int d = framenum / 17982;
39 int m = framenum % 17982;
49 return framenum + 9 * drop_frames * d + drop_frames * ((m - 2) / 1798);
54 unsigned fps = tc->
fps;
58 framenum += tc->
start;
62 ss = framenum / fps % 60;
63 mm = framenum / (fps*60) % 60;
64 hh = framenum / (fps*3600) % 24;
85 int hh, mm, ss, ff, neg = 0;
87 framenum += tc->
start;
95 ss = framenum / fps % 60;
96 mm = framenum / (fps*60) % 60;
97 hh = framenum / (fps*3600);
102 hh, mm, ss, drop ?
';' :
':', ff);
108 unsigned low = bcd & 0xf;
109 unsigned high = bcd >> 4;
110 if (low > 9 || high > 9)
112 return low + 10*high;
117 unsigned hh =
bcd2uint(tcsmpte & 0x3f);
118 unsigned mm =
bcd2uint(tcsmpte>>8 & 0x7f);
119 unsigned ss =
bcd2uint(tcsmpte>>16 & 0x7f);
120 unsigned ff =
bcd2uint(tcsmpte>>24 & 0x3f);
121 unsigned drop = tcsmpte & 1<<30 && !prevent_df;
123 hh, mm, ss, drop ?
';' :
':', ff);
133 tc25bit & 1<<24 ?
';' :
':',
141 static const int supported_fps[] = {24, 25, 30, 50, 60};
144 if (fps == supported_fps[i])
169 if (!rate.
den || !rate.
num)
171 return (rate.
num + rate.
den/2) / rate.
den;
181 memset(tc, 0,
sizeof(*tc));
182 tc->
start = frame_start;
192 int hh, mm, ss, ff, ret;
194 if (sscanf(str,
"%d:%d:%d%c%d", &hh, &mm, &ss, &c, &ff) != 5) {
196 "syntax: hh:mm:ss[:;.]ff\n");
200 memset(tc, 0,
sizeof(*tc));
209 tc->
start = (hh*3600 + mm*60 + ss) * tc->
fps + ff;
211 int tmins = 60*hh + mm;
212 tc->
start -= 2 * (tmins - tmins/10);