mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-19 23:26:14 +08:00
timecode: move dropframe code and doxycomment it.
This is based on the original work by Baptiste Coudurier.
This commit is contained in:

committed by
Clément Bœsch

parent
5231454560
commit
51fb933dd0
@@ -28,6 +28,15 @@
|
||||
#include "timecode.h"
|
||||
#include "libavutil/log.h"
|
||||
|
||||
int ff_framenum_to_drop_timecode(int frame_num)
|
||||
{
|
||||
/* only works for NTSC 29.97 */
|
||||
int d = frame_num / 17982;
|
||||
int m = frame_num % 17982;
|
||||
//if (m < 2) m += 2; /* not needed since -2,-1 / 1798 in C returns 0 */
|
||||
return frame_num + 18 * d + 2 * ((m - 2) / 1798);
|
||||
}
|
||||
|
||||
int ff_init_smtpe_timecode(void *avcl, struct ff_timecode *tc)
|
||||
{
|
||||
int hh, mm, ss, ff, fps;
|
||||
|
Reference in New Issue
Block a user