Facebook created a new unit of time called flick (frame-tick). Flick is a very small unit of time, it’s just 705600000th of a second, which is just slightly larger than a nanosecond. Flick was created to solve the problem with usage of second as unit of time. People in multimedia sector, while creating visual effects, have to deal with simulations that have to be run with durations a lot less than a second and using fractions can lead to inaccurate results and errors in calculations. To make the process easier, Facebook created a new unit of time. This new unit of time will be an integer and will be able to represent single frame duration for 24Hz, 25Hz, 30Hz, 48Hz, 50Hz, 60Hz, 90Hz, 100Hz, 120Hz and also 1/1000 divisions of each.
Knowing that you should never, ever use floating point representations for accumulated, simulated time (lest your temporal accuracy degrade over time), the std::chrono time tools in C++ are ideal. However, the highest usable resolution, nanoseconds, doesn’t evenly divide common film & media framerates. This was the genesis of this unit.
While flick does deal with fractions of seconds, this unit will not be focusing on NTSC variations as they use values which are of order 24*1000/1001 and 30*1000/1001, which can never be exact.
Flicks will be supporting common audio sample rates in order to accomodate media playbacks. The list is short, but includes 8kHz, 16kHz, 22.05kHz, 24kHz, 32kHz, 44.1kHz, 48kHz, 88.2kHz, 96kHz and 192kHz. Humans can not hear higher frequencies, but they are are used in audio files that will be later resampled or re-timed.
This table below helps you understand why Facebook created a new unit of time
|1/24 FPS Frame||29400000 flicks|
|1/25 FPS Frame||28224000 flicks|
|1/30 FPS Frame||23520000 flicks|
|1/48 FPS Frame||14700000 flicks|
|1/50 FPS Frame||14112000 flicks|
|1/60 FPS Frame||11760000 flicks|
|1/90 FPS Frame||7840000 flicks|
|1/100 FPS Frame||7056000 flicks|
|1/120 FPS Frame||5880000 flicks|
|1/8000 FPS Frame||88200 flicks|
|1/16000 FPS Frame||44100 flicks|
|1/22050 FPS Frame||32000 flicks|
|1/24000 FPS Frame||29400 flicks|
|1/32000 FPS Frame||22050 flicks|
|1/44100 FPS Frame||16000 flicks|
|1/48000 FPS Frame||14700 flicks|
|1/88200 FPS Frame||8000 flicks|
|1/96000 FPS Frame||7350 flicks|
|1/192000 FPS Frame||3675 flicks|
Clone the Flicks project from github and place the flicks.h wherever you install C++ header files. Here Flicks are placed in “util” namespace. A C++ file is given with the project stack to test the unit. There is also a make file available that can be used in Linux and OS X.
The project is Open Source and hosted in GitLab, largest Open Source project repository in the world. Flick is placed as a part of OculusVR project.