2022-04-03
00:01Ph03n1ks has quit [Remote host closed the connection]
00:02doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
00:03doggkruse has joined #asahi-dev
00:04Ph03n1ks has joined #asahi-dev
00:19doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
00:47Ph03n1ks has quit [Remote host closed the connection]
00:48chadmed has joined #asahi-dev
00:54chadmedrqou_: could you also try 4:2:2 YUV if ffmpeg supports it? it's the prores native pixel format
00:56chadmedi would be surprised if the hardware block could process raw BRGA pixel data since no version of prores uses this
01:06akemin_dayo has joined #asahi-dev
01:17Ph03n1ks has joined #asahi-dev
01:17Ph03n1ks has quit [Read error: Connection reset by peer]
01:21Ph03n1ks has joined #asahi-dev
01:30chadmedtaking a 1080p H.264 video and encoding it into prores using the hardare goes at about 500fps
01:34bisko has quit [Read error: Connection reset by peer]
01:37kode54I think you have to specify the decoders manually, otherwise it prefers its built in ones
01:38bisko has joined #asahi-dev
01:46chadmedi think this is probably something funky with ffmpeg or my machine, but at least we know the pixel formats actually do work
01:52chadmedhttps://sourceforge.net/p/mediainfo/discussion/297610/thread/4bc21b18/ee82/2d5e/attachment/SMPTE%20ProRes%20rdd36-2015.pdf
01:53nicolas17chadmed: sometimes hwaccel is slow because it needs to copy back to RAM, but that shouldn't be the case here, especially on M1
01:58Ph03n1ks has quit [Remote host closed the connection]
01:58Ph03n1ks has joined #asahi-dev
02:04nicolas17maybe the h264 hardware is significantly more power-efficient, but if you're doing a transcode you'd likely want best speed so that's good to know...
02:05chadmedit almost certainly is more power efficient, i just find it odd that its many times slower in absolute terms too
02:06nicolas17also maybe if you want all your CPU cores to be dedicated to encoding, pushing the decoder to hardware is also a speed win? idk
02:06chadmedit makes sense to throttle these sorts of things in a mobile soc because youre only ever going to be watching a single stream of something on those devices
02:07chadmedbut apple heavily markets these things to "creators" who might want fast h264 encode for stuff like youtube
02:07Ph03n1ks has quit [Ping timeout: 480 seconds]
02:15chadmedlike i said its something youd definitely do on a mobile device and if they just plonked the blocks down into these chips with no changes...
02:16Ph03n1ks has joined #asahi-dev
02:17chadmedthe bloomer in me wants to say they just "forgot" to take off the throttle in the firmware or something :P
02:17nicolas17speaking of mobile devices, I wonder if there's anyone interested / crazy enough to port asahi to A10 or something :p
02:18tpw_rulesin fairness, for a given level of effort/silicon/whatever, prores will be far easier to encode
02:24chadmedwould kind of ruin my plans to buy an m2 mac mini and use it as a server if that's the case :P
02:24chadmedit could just be a macos thing too, once we have access to these blocks from linux we might be able to shed some light on the situation
02:25chadmedi really just wanted to confirm my theory about the pixel format and got super carried away (spectrum moment)
02:29riceballnice[m] has joined #asahi-dev
02:29Ph03n1ks has quit [Ping timeout: 480 seconds]
02:47Ph03n1ks has joined #asahi-dev
03:00PhilippvK has joined #asahi-dev
03:04phiologe has quit [Ping timeout: 480 seconds]
03:25kov has quit [Quit: Coyote finally caught me]
03:25kov has joined #asahi-dev
03:31Ph03n1ks has quit [Remote host closed the connection]
03:31bisko has quit [Read error: Connection reset by peer]
03:33Ph03n1ks has joined #asahi-dev
03:35doggkruse has joined #asahi-dev
03:36bisko has joined #asahi-dev
03:41Ph03n1ks has quit [Ping timeout: 480 seconds]
03:50Ph03n1ks has joined #asahi-dev
03:54doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
04:01Ph03n1ks has quit [Ping timeout: 480 seconds]
04:10Ph03n1ks has joined #asahi-dev
04:51Ph03n1ks has quit [Remote host closed the connection]
04:51Ph03n1ks has joined #asahi-dev
04:55alcazar has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
04:56doggkruse has joined #asahi-dev
05:03Ph03n1ks has quit [Remote host closed the connection]
05:04Ph03n1ks has joined #asahi-dev
05:08rqou_chadmed: working: ffmpeg -loglevel debug -y -r 60 -f image2 -s 1920x1080 -i test.png -vcodec prores_videotoolbox -pix_fmt yuv420p test.mov
05:10Jamie[m]1fyi there are multiple decoders inside the AVD for HEVC and H.264 (but only one for VP9), maybe the way to get 60fps is to somehow feed multiple blocks at a time, and ffmpeg isn't successfully doing that?
05:10rqou_i got it to encode one frame at least one particular way, which is enough to get started on the RE effort
05:11chadmedJamie[m]1: ffmpeg just passes the data through VideoToolbox so if its not fully utilising the hardware that would be an apple thing, right?
05:13chadmedi might see if i have any high framerate video lying around i can feed it. since all the framerates are still above realtime theres still one theory id like to eliminate
05:14chadmedit could be possible that it limits itself to some number above realtime so that video plays back and the buffer fills up at a decent speed, but no unnecessary power is used
05:19chadmedi mean we could also just apply occams razor and conclude that the encoders are not that fast
05:20chadmedthe gist i posted above has the figures, but i can transcode an HDR10 4K HEVC stream to ProRes at 300+ fps
05:28bisko has quit [Read error: Connection reset by peer]
05:30bisko has joined #asahi-dev
05:33r0ni has quit [Quit: Textual IRC Client: www.textualapp.com]
05:42doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
06:13Ph03n1ks has quit [Remote host closed the connection]
06:17doggkruse has joined #asahi-dev
06:18the_lanetly_052 has joined #asahi-dev
06:20veloek has joined #asahi-dev
06:30doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
06:47abrasivechadmed: sorry if I missed something earlier, but did you notice your hw/sw results for hevc and x264 are bang on identical?
07:12chadmed has quit [Remote host closed the connection]
07:21veloek_ has joined #asahi-dev
07:22veloek has quit [Ping timeout: 480 seconds]
07:23veloek_ has quit [Remote host closed the connection]
07:26bisko has quit [Read error: Connection reset by peer]
07:28bisko has joined #asahi-dev
07:29chadmed has joined #asahi-dev
07:42nicolas17 has quit [Ping timeout: 480 seconds]
07:59chadmed has quit [Remote host closed the connection]
08:00chadmed has joined #asahi-dev
08:09chadmed has quit [Remote host closed the connection]
08:09chadmed has joined #asahi-dev
08:18MajorBiscuit has joined #asahi-dev
08:21Ph03n1ks has joined #asahi-dev
08:22Ph03n1ks has quit []
08:50chadmed has quit [Ping timeout: 480 seconds]
08:56bisko has quit [Read error: Connection reset by peer]
08:57bisko has joined #asahi-dev
09:10MajorBiscuit has quit [Ping timeout: 480 seconds]
09:37herbas has joined #asahi-dev
10:19MajorBiscuit has joined #asahi-dev
10:34marcanbut also encoding HEVC/h264 is, afaik, *much* more compute-intensive than prores (especially HEVC)
10:35marcanalso IIRC rcombs said that the h264/hevc blocks work better parallelizing, so you need to have multiple streams going on simultaneously to get the full throughput, but that might be mostly decode?
10:35Guest1043 has joined #asahi-dev
10:42MajorBiscuit has quit [Ping timeout: 480 seconds]
10:43jannauI haven't looked at the interface apple offers but increasing the number of reference frames obviously makes the encoding more complex
10:44jannaudoubling it it means the encoder as to check twice as many frames whether which block is good predictor for current block
10:54bisko has quit [Read error: Connection reset by peer]
10:55bisko has joined #asahi-dev
11:04amarioguy has joined #asahi-dev
11:06amarioguy has quit [Remote host closed the connection]
11:51marcanyou can disable it and it'll still run though, if need be, but it slows down a lot and some things won't work in that state
11:52gladiac has joined #asahi-dev
11:52kameks has joined #asahi-dev
11:59jluthra has quit [Remote host closed the connection]
12:00jluthra has joined #asahi-dev
12:08jannausigh, the new reserved memory/iommu mapping devicetree bindings proposed by Thierry are a pain to handle in m1n1
12:22bisko has quit [Read error: Connection reset by peer]
12:27dbldthe3ed[m] has joined #asahi-dev
12:27bisko has joined #asahi-dev
12:37herbas has quit [Quit: herbas]
12:41the_lanetly_052 has quit [Ping timeout: 480 seconds]
12:53veloek has joined #asahi-dev
13:00jannauno, we have no way to decide that on the devicetree level. if anything m1n1 should remove the unneeded power domain
13:04marcanit's 3 power domains for all of them, it's just that one power domain can be turned off on <4T but I don't think apple does at the OS level and neither should we
13:05jannausven: buffer->iova is not set in the dma_alloc_coherent() case in apple_rtkit_common_rx_get_buffer
13:10jannaunot sure if it is wise to leave buffer partially initialized on errors. we check bfr->size in apple_rtkit_free_buffer()
13:32MajorBiscuit has joined #asahi-dev
14:19bisko has quit [Read error: Connection reset by peer]
14:21bisko has joined #asahi-dev
14:45gladiac is now known as Guest1106
14:45gladiac has joined #asahi-dev
14:51Guest1106 has quit [Ping timeout: 480 seconds]
14:53themojoman_ has joined #asahi-dev
14:53kevans91anyone know off-hand if u-boot can be convinced to run a UEFI m1n1-attached payload? I've already repurposed 'initramfs' for passing our kernel
14:55kevans91no, I want m1n1 to execute u-boot and pass it a UEFI payload to execute as the next stage
14:57kevans91i'm hacking our loader to take an "initramfs", chop off the cpio magic then execute that, but there's problems there and I still have to pass a flash drive back and forth to hack on our loader
14:57kevans91so it'd be quite neat if I could further eliminate that step and pass both loader (uefi payload) and kernel (elf) along
15:01j`eyyou could look at src/payload.c, a while ago I hacked in support locally for u-boot fit images, you might be able to do similar. and maybe pass the address in the device tree somehow
15:03themojoman_ has quit [Quit: Page closed]
15:07kameks has quit [Ping timeout: 480 seconds]
15:32kevans91sweet, with a proper freebsd.py I should able t stop preprocessing our kernel to fake cpio
15:58c10l53 has quit []
15:58marcanyeah, for development feel free to put together a fbsd-specific loader script and submit that for upstreaming; I'm happy to carry whatever as long as it works for you
15:59marcanfor production of course I'd rather everyone use UEFI but it sounds like you're already doing that
15:59c10l53 has joined #asahi-dev
16:00marcanwe actually need to make sure that u-boot+linux thing still works / is a bit saner in the near future as we start depending on u-boot to provide PSCI over EFI services
16:02kevans91nice, thanks for considering it upstreamable. :-) I'm trying to do minimal hacking to m1n1/u-boot to minimize the patches I need to send the other developer working on freebsd support (or anyone else I can get to engage)
16:02kevans91final setup will use standard u-boot efi, mostly just hacking together something for quicker development iteration
16:04nicolas17 has joined #asahi-dev
16:14marcanbasically all the python stuff is for development and we're pretty loose with what goes in, standalone scripts to achieve something useful for someone are fine, that's kind of the whole point
16:17bisko has quit [Read error: Connection reset by peer]
16:21bisko has joined #asahi-dev
16:40doggkruse has joined #asahi-dev
16:43RenatoMarinho[m] has joined #asahi-dev
17:26bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
17:26kevans91ah, that's unfortunate. u-boot really wants you to `load` it before you can `bootefi` it, so I might have to switch loaders just for testing
17:27bisko has joined #asahi-dev
17:29kevans91the alternative seems to be FIT + bootm, which looks like it will recognize the preloaded FIT image and do the right thing
17:30kevans91my image is currently in a well-known place, but there's no way to point u-boot at said place and fake loaded image information, I guess
17:34kevans91nope, apparently not. :-( it checks the address you feed it against a prior efi_set_bootdev()
17:50MajorBiscuit has quit [Ping timeout: 480 seconds]
18:14bisko has quit [Read error: Connection reset by peer]
18:17bisko has joined #asahi-dev
18:21veloek has quit [Quit: leaving]
18:25kevans91it's interesting because there's hints that it used to work. efi_run_image() will explicitly use a memory device path if one's not set, under the assumption that it, e.g., may be loaded directly into memory via JTAG
18:48kevans91woot, it's alive. the only concerning part of linux.py's uboot stuff might be the use of dtb_addr
18:49kevans91the prepared dt's not at that address, not sure it's necessarily intended to be passing on the unadulterated input fdt
18:56sveni guess back when I wrote that hack we either modified the fdt in place or there just weren’t any important modifications yet
18:57kevans91it kind of looks like you can just omit the fdt address from booti and it'll use the modified one, anyways
19:02kevans91the downside is we don't get any of our loader scripts, but having to manually 'load' then 'boot' is still a huge improvement in workflow
19:29bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
19:53bisko has joined #asahi-dev
20:11bisko has quit [Read error: Connection reset by peer]
20:13bisko has joined #asahi-dev
21:15bisko has quit [Quit: Textual IRC Client: www.textualapp.com]
22:05yrlf has joined #asahi-dev
22:10aw213mf3f8[m] has joined #asahi-dev
22:52c10l53 has quit []
22:54c10l53 has joined #asahi-dev