summaryrefslogtreecommitdiff
path: root/libavutil/timecode.h
diff options
context:
space:
mode:
authorLimin Wang <lance.lmwang@gmail.com>2020-06-30 23:22:58 +0800
committerLimin Wang <lance.lmwang@gmail.com>2020-07-15 05:47:14 +0800
commitc24c6a1bee10fc5526803dbeaf2a18453f50b9a8 (patch)
tree1233fa1beae0602ebfa4e98802ef0a873e11a806 /libavutil/timecode.h
parent05f3d37dd58b1626c8e587cdf11af5a0ab65d377 (diff)
downloadffmpeg-c24c6a1bee10fc5526803dbeaf2a18453f50b9a8.tar.gz
avutil/timecode: add description for SMPTE binary format
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Diffstat (limited to 'libavutil/timecode.h')
-rw-r--r--libavutil/timecode.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/libavutil/timecode.h b/libavutil/timecode.h
index ab38e661f1..5801330921 100644
--- a/libavutil/timecode.h
+++ b/libavutil/timecode.h
@@ -62,6 +62,19 @@ int av_timecode_adjust_ntsc_framenum2(int framenum, int fps);
* @param framenum frame number
* @return the SMPTE binary representation
*
+ * See SMPTE ST 314M-2005 Sec 4.4.2.2.1 "Time code pack (TC)"
+ * the format description as follows:
+ * bits 0-5: hours, in BCD(6bits)
+ * bits 6: BGF1
+ * bits 7: BGF2 (NTSC) or PC (PAL)
+ * bits 8-14: minutes, in BCD(7bits)
+ * bits 15: BGF0 (NTSC) or BGF2 (PAL)
+ * bits 16-22: seconds, in BCD(7bits)
+ * bits 23: PC (NTSC) or BGF0 (PAL)
+ * bits 24-29: frames, in BCD(6bits)
+ * bits 30: drop frame flag (0: non drop, 1: drop)
+ * bits 31: color frame flag (0: unsync mode, 1: sync mode)
+ * @note BCD numbers (6 or 7 bits): 4 or 5 lower bits for units, 2 higher bits for tens.
* @note Frame number adjustment is automatically done in case of drop timecode,
* you do NOT have to call av_timecode_adjust_ntsc_framenum2().
* @note The frame number is relative to tc->start.