#
#asahi-dev · 2023-11-24 16:18
nicolas17ArcaneNibble: I tried to reverse engineer the weird proprietary PNG extensions Apple has and I found even Apple's own code doesn't decode it consistently
#asahi-dev · 2023-11-24 16:16
ArcaneNibbleoh yeah, i also still have the hardware JPEG block RE'd without a linux driver, but that's of questionable utility (mjpeg accelerator?)
#asahi-dev · 2023-11-24 16:14
ArcaneNibble(but it's certainly possible to treat that as a black box)
#asahi-dev · 2023-11-24 16:14
ArcaneNibbleoh right, prores is also missing somebody to RE the bitstream for "prores raw"
#asahi-dev · 2023-11-24 16:13
ArcaneNibbleyes
#asahi-dev · 2023-11-24 16:13
nicolas17so you don't even have to worry about order of frames, you just throw a pile of images there and they come back out decoded
#asahi-dev · 2023-11-24 16:13
ArcaneNibbleinherently
#asahi-dev · 2023-11-24 16:13
ArcaneNibbleyes
#asahi-dev · 2023-11-24 16:13
nicolas17prores is entirely intra-only?
#asahi-dev · 2023-11-24 16:12
ArcaneNibblehardware is conceptually very simple: you just give it a frame (by putting a descriptor in a ring buffer) and it encodes/decodes it and tells you when it's done
#asahi-dev · 2023-11-24 16:11
ArcaneNibbleif someone wants to tackle prores on the linux side, feel free to message me (and/or publicly here)
#asahi-dev · 2023-11-24 16:10
ArcaneNibblebut it's *so* complicated and i don't really know how to trigger most operations from userspace
#asahi-dev · 2023-11-24 16:10
ArcaneNibblei have basic work on scaler/csc
#asahi-dev · 2023-11-24 16:10
ArcaneNibbleunless someone wants to do a char/misc proof-of-concept
#asahi-dev · 2023-11-24 16:09
ArcaneNibblei haven't tried, since i know the vast majority of the complexity is integrating into the linux frameworks (v4l2?) that i know absolutely nothing about
#asahi-dev · 2023-11-24 16:09
ArcaneNibbleprores on M1 Max is RE-ed enough that someone could theoretically write a driver
#asahi-dev · 2023-11-24 16:08
ArcaneNibble(sorry, I *am* kinda alive despite having been too burned out to do any work on this)
#asahi-dev · 2023-11-24 16:08
ArcaneNibbleM1 Max is LilyD
#asahi-dev · 2023-11-24 15:44
eilnyeah I'd guess so. you can run 'log show' grep AppleAVD
#asahi-dev · 2023-11-24 15:41
nicolas17it would be weird if it was j293-specific
#asahi-dev · 2023-11-24 15:41
nicolas17sorry I mean on every device with M1, not Pro/Max
#asahi-dev · 2023-11-24 15:40
eilnno. m1+s were "V4" in device tree
#asahi-dev · 2023-11-24 15:39
nicolas17I assume it's Viola on every M1 SoC?
#asahi-dev · 2023-11-24 15:39
nicolas17but it's gonna be Work to figure out which is which :D
#asahi-dev · 2023-11-24 15:38
nicolas17https://theapplewiki.com/wiki/Codenames
#asahi-dev · 2023-11-24 15:38
nicolas17I just went "ooh codenames I love codenames"
#asahi-dev · 2023-11-24 15:37
nicolas17wow, that's a lot
#asahi-dev · 2023-11-24 15:37
eilnwho does that?
#asahi-dev · 2023-11-24 15:36
eilnthere's viola, cactus, ixora, daisy, salvia, lilyd, radish, clover, lotus, tansy, clary, catnip, dahlia. not all are supported
#asahi-dev · 2023-11-24 15:36
eiln*strings*
#asahi-dev · 2023-11-24 15:36
eilnnicolas17: viola is j293 AVD (V3 in device tree). the revision codenames are all some weird plantae
#asahi-dev · 2023-11-24 14:37
nicolas17eiln: is "Viola" the codename for AVD or for this particular revision? do you know of other names?
#asahi-dev · 2023-11-24 12:16
leiofor linux direct scanout, having it in DMABuf would be most interesting, I believe
#asahi-dev · 2023-11-24 12:14
leioall except gpu, meaning we can't "zero-copy" it for stuff like video/x-raw(memory:GLMemory) or vulkan video?
#asahi-dev · 2023-11-24 12:13
eilnleio: all dma-capable peripherals operate in iommu/dart space (all except gpu). we could double iommu-map the underlying page to do m2m or zero copy
#asahi-dev · 2023-11-24 12:11
leiowhere do the decoded frames end up in terms of memory location, in the context of achieving zero-copy to display?
#asahi-dev · 2023-11-24 12:10
eilnawh they couldn't have outsourced their own codec
#asahi-dev · 2023-11-24 12:06
chadmedwait no it cant be i dont think they ever did a prores codec
#asahi-dev · 2023-11-24 12:00
chadmedprob that imagination chip on a card then
#asahi-dev · 2023-11-24 11:59
chadmedits a decode only version and doesnt do demosaicing so it might be something different
#asahi-dev · 2023-11-24 11:59
eilnis that the same avd/ave/apr? intel macs shipped with imagination's decode IP, ave sucks enough that I trust it's the same one, but apr wasn't released until m1+s
#asahi-dev · 2023-11-24 11:58
chadmedand they didnt have avd or ave, only an older version of apr
#asahi-dev · 2023-11-24 11:58
chadmednope
#asahi-dev · 2023-11-24 11:57
ydaltonwonder if there was any linux support for those, probably not
#asahi-dev · 2023-11-24 11:56
chadmedpeople working in prores probably just bought mac pros with the afterburner card which aiui is just avd, ave and apr on a pcie card
#asahi-dev · 2023-11-24 11:56
eilnit's not really a parallelizable task
#asahi-dev · 2023-11-24 11:55
chadmedand no i dont think anyones done a prores hw block on a commodity gpu
#asahi-dev · 2023-11-24 11:54
chadmedleio: yes and bootlin have a basic v4l2 backend for vaapi but if eilin says its not good enough for avd or apr then i trust her
#asahi-dev · 2023-11-24 11:54
leiovaapi driver being userspace
#asahi-dev · 2023-11-24 11:54
leioisn't vaapi so that there's a hardware-specific kernel side and then a vaapi driver that makes it usable through a common API for userspace apps, while you could also use the specific stuff exposed by the kernel driver for other things?

plus ›