Commit Graph

7 Commits

Author SHA1 Message Date
Jacob Wischnat
5cf467c86d LibMedia: Support videos with BT470BG color matrix
(cherry picked from commit 7a03ef45c2fa7f416a26955593fda34c4521f123)
2024-07-13 17:37:23 -04:00
Zaggy1024
2bfaaa967c LibMedia: Give frame timestamps to video decoders
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)
2024-07-04 22:09:32 +02:00
Zaggy1024
2dfa68085a LibMedia: Store YUV planes as byte arrays with no padding for 8-bit
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)
2024-07-04 22:09:32 +02:00
Zaggy1024
1fe34874ca LibMedia: Split output bitmap size assertions to individual lines
Now Clang will stop complaining about DeMorgan's theorem.

(cherry picked from commit b49d3dcf6fbe972a46555d751e998c1e7bd5e4a2)
2024-07-04 22:09:32 +02:00
Zaggy1024
e0f3bc2b32 LibMedia: Remove fixed-point path for BT.2020 matrix coefficients
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)
2024-07-04 22:09:32 +02:00
Zaggy1024
a6153cb062 LibMedia: Ensure that buffers passed to SubsampledYUVFrame are moved
(cherry picked from commit 6f8389c48377244e631a4eb1a7423d89033a64bc)
2024-07-04 22:09:32 +02:00
Zaggy1024
0a525881b6 LibMedia: Rename LibVideo to LibMedia
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)
2024-07-04 22:09:32 +02:00