H.264 in Matroska can have blocks with unordered timestamps. Without
passing these to the decoder when providing data, the decoder will be
unable to reorder the frames to presentation order.
VideoFrame will now include a timestamp that is used by the
PlaybackManager, rather than assuming that it is the same timestamp
returned by the demuxer.
(cherry picked from commit f6a4973578c4692f33283aee1c089afd0cdae508)
This should halve the size of frames in memory for frames with 8-bit
color components, which is the majority of videos.
Calculation of the size of subsampled planes has also been consolidated
into a struct. There are likely some places that will still need to
change over to this, but it should prevent issues due to differing
handling of rounding/ceiling.
(cherry picked from commit 40fe0cb9d5c40a5ee568a3196bf19452ea8fed2b)
BT.2020 will mainly be used with bit depths greater than 8, so having
this specialization is mostly pointless until we use fixed-point math
for higher bit depths.
(cherry picked from commit fe2a63d485bc9d494b06a780043eae21adfd6854)
This change is in preparation for implementing audio codecs into the
library and using audio as timing for video playback.
(cherry picked from commit 7c10e1a08d7a109b63c9258578eb98aa9dcc1425)