#
#asahi-gpu · 2022-05-26 14:14
alyssa(although your iThing catching fire *would* be apt...)
#asahi-gpu · 2022-05-26 14:12
alyssaalso for thermals, don't want your iThing getting absurdly hot bingewatching iCarly :p
#asahi-gpu · 2022-05-26 14:12
Jamie[m](they spec 21 hours for the 16” mbp)
#asahi-gpu · 2022-05-26 14:12
Jamie[m]answer: an absurdly high amount
#asahi-gpu · 2022-05-26 14:11
alyssa"hw vdec + display YUV overlay plane with no GPU in between and framebuffer compression in flight" is a winning strategy there
#asahi-gpu · 2022-05-26 14:11
alyssa"How many hours of video can you watch on $DEVICE before the battery dies?" is a metric Apple cares abou
#asahi-gpu · 2022-05-26 14:11
Jamie[m]lol
#asahi-gpu · 2022-05-26 14:10
Jamie[m]uh yeah what they said
#asahi-gpu · 2022-05-26 14:10
Jamie[m]but generally speaking hardware video decoding is much more energy efficient
#asahi-gpu · 2022-05-26 14:10
jannauhw decode is more energy efficient
#asahi-gpu · 2022-05-26 14:10
alyssaEnergy effiency => battery life on the handhelds
#asahi-gpu · 2022-05-26 14:10
Jamie[m]the decoder doesn’t do AV1
#asahi-gpu · 2022-05-26 14:10
TheLinkbesides av1 decoding in hardware isn't supported anyway
#asahi-gpu · 2022-05-26 14:09
TheLinkperhaps 4k in av1 but is that really a thing?
#asahi-gpu · 2022-05-26 14:08
TheLinkI see not much point in hardware video decoding if the cpu is so strong and has many cores
#asahi-gpu · 2022-05-26 14:04
LeidenfrostI see
#asahi-gpu · 2022-05-26 14:04
jannauLeidenfrost: no, that is a separate HW block on the SoC
#asahi-gpu · 2022-05-26 14:03
jannau2 orders of magnitude larger "devices" and I don't think apple silicon will play a role there
#asahi-gpu · 2022-05-26 14:03
LeidenfrostQuestion, will the GPU driver cover hardware video decode?
#asahi-gpu · 2022-05-26 14:03
LeidenfrostHi all
#asahi-gpu · 2022-05-26 14:01
alyssaLinux on iPod Nano when
#asahi-gpu · 2022-05-26 14:01
alyssaGot it
#asahi-gpu · 2022-05-26 14:00
jannauI unsure about the desktop linux userland status but both yuv overlays and yuv textures are used in embedded linux userland
#asahi-gpu · 2022-05-26 13:55
alyssadottedmag: right, I know the plumbing is there, just not sure if in practice it gets used (needs support from everyone: kernel, compositor, application, ..)
#asahi-gpu · 2022-05-26 13:46
dottedmagalyssa: Wayland surfaces have the provision to do so, but it's up to compositor.
#asahi-gpu · 2022-05-26 13:17
alyssaAh right I forgot M1 is ridiculous limited in overlay planes ...
#asahi-gpu · 2022-05-26 13:14
jannauI agree that it's not an use case which must be supported from the beginning. the overlay path might not available due to another video playing
#asahi-gpu · 2022-05-26 13:12
alyssaAdmittedly I'm unsure if Linux userspace is set up for either YUV overlay planes or hw YUV textures
#asahi-gpu · 2022-05-26 13:10
alyssabut again if you want energy efficient, skip the GPU blit entirely ...
#asahi-gpu · 2022-05-26 13:10
alyssa(and of course, it doesn't reall matter how fast it is as long as it's above 60fps, it's vsynced)
#asahi-gpu · 2022-05-26 13:09
alyssaSo likely the native YUV path will be no faster and only slightly more energy efficient
#asahi-gpu · 2022-05-26 13:09
alyssaFor the !fast path where you go through the GPU, the time spent texturing (both reading from memory and in the actual sampler hardware) will eclipse the little bit of arithmetic needed to do a matrix multiply
#asahi-gpu · 2022-05-26 13:08
alyssajannau: For the fast path, ideally that skips the GPU completely and goes straight to a YUV overlay plane in the DCP
#asahi-gpu · 2022-05-26 13:05
jannaualyssa: YUV support for dmabuf import, for example for HW video decoding
#asahi-gpu · 2022-05-26 13:03
alyssakeeping in mind that I have a difficult time thinking of a use case
#asahi-gpu · 2022-05-26 13:02
alyssalina: Can we skip programming these matrices (or do all 0s) for now and gate YUV support behind a kernel UABI bump in the future when we have a use case?
#asahi-gpu · 2022-05-26 10:58
linaSo for limited-range you extend with zeroes at >8 bits (this would work for 1.0 == 1<<n across depths), while for full-range you extend with ones (needs 1.0 == (1<<n)-1 across depths), and assuming the hardware only does one thing across the board, it can't be right for both.
#asahi-gpu · 2022-05-26 10:56
linaLimited-range white is defined as 235 << (8-n), while full-range white is defined as (1 << n) - 1
#asahi-gpu · 2022-05-26 10:54
linaBecause it turns out that the definition of full-range quantization and limited-range quantization interact with the bit depth differently, and therefore with any given single implementation of rounding/scaling you can only generalize the correct matrix for one of those two cases across all bit depths
#asahi-gpu · 2022-05-26 10:53
linaAaaaaa, and as far as I can tell it's actually *not possible* to program correct coefficients, assuming this needs to work across different bit depths (assuming the hardware does not special case the quantization differently for the full-range and limited-range slots)
#asahi-gpu · 2022-05-26 10:24
linaWe'll have to do some actual tests to figure out what the correct matrices would be, though, since I'm not sure if the interpretation is fixed-point 1.0 = 255 (actual max brightness) or fixed-point 1.0 = 256 (out of range but easier on the hardware) for these matrices, on both the RGB and YUV sides.
#asahi-gpu · 2022-05-26 10:22
linahttps://www.khronos.org/registry/DataFormat/specs/1.2/dataformat.1.2.html
#asahi-gpu · 2022-05-26 10:21
linaAh, khronos has an actual spec for this and it refers to BT.2100 / T.871, and that confirms Apple's coefficients are definitely wrong here.
#asahi-gpu · 2022-05-26 07:47
linaBut either way I can't see how *all* of these matrices can be consistent; I'm pretty sure no matter how you interpret them, there is weirdness.
#asahi-gpu · 2022-05-26 07:45
linaYUV full range is kind of dodgy by definition anyway because "no chroma" is supposed to be 128 but that's not the middle of the range, so I need to figure out what's correct and whether that implies that Y and UV have to have different scaling
#asahi-gpu · 2022-05-26 07:45
Sobek[m]chadmed: Identity matrices have to be square. Their the neutral element of square matrices multiplication.
#asahi-gpu · 2022-05-26 07:44
chadmedoh right right
#asahi-gpu · 2022-05-26 07:44
linachadmed: It's 3x3 + offset column (affine transform)
#asahi-gpu · 2022-05-26 07:43
linaI need to look up the relevant standards to figure out what's correct, but I'm fairly certain that whatever Apple did here isn't
#asahi-gpu · 2022-05-26 07:43
chadmedcan you have non-square identity matrices?

plus ›