/* * Copyright (c) 2006 Smartjog S.A.S, Baptiste Coudurier <baptiste.coudurier@gmail.com> * Copyright (c) 2011-2012 Smartjog S.A.S, Clément Bœsch <clement.boesch@smartjog.com> * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
int av_timecode_adjust_ntsc_framenum2(int framenum, int fps)
{ /* only works for multiples of NTSC 29.97 */ int drop_frames = 0; int d, m, frames_per_10mins;
uint32_t av_timecode_get_smpte_from_framenum(const AVTimecode *tc, int framenum)
{ unsigned fps = tc->fps; int drop = !!(tc->flags & AV_TIMECODE_FLAG_DROPFRAME); int hh, mm, ss, ff;
uint32_t av_timecode_get_smpte(AVRational rate, int drop, int hh, int mm, int ss, int ff)
{
uint32_t tc = 0;
/* For SMPTE 12-M timecodes, frame count is a special case if > 30 FPS.
See SMPTE ST 12-1:2014 Sec 12.1 for more info. */ if (av_cmp_q(rate, (AVRational) {30, 1}) == 1) { if (ff % 2 == 1) { if (av_cmp_q(rate, (AVRational) {50, 1}) == 0)
tc |= (1 << 7); else
tc |= (1 << 23);
}
ff /= 2;
}
hh = hh % 24;
mm = av_clip(mm, 0, 59);
ss = av_clip(ss, 0, 59);
ff = ff % 40;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.