narmstrong changed the topic of #linux-amlogic to: Amlogic mainline kernel development discussion - our wiki http://linux-meson.com/ - ml linux-amlogic@lists.infradead.org - Publicly Logged on https://irclog.whitequark.org/linux-amlogic
Ivanovic_ has joined #linux-amlogic
Ivanovic has quit [*.net *.split]
Ivanovic_ is now known as Ivanovic
cthugha has joined #linux-amlogic
ldevulder has quit [Ping timeout: 255 seconds]
<dlan> jakogut: true, NAND is not supported. but isn't eMMC kind of one onboard storage?
dlan has quit [Quit: leaving]
dlan has joined #linux-amlogic
dlan has quit [Changing host]
dlan has joined #linux-amlogic
Elpaulo_m has joined #linux-amlogic
Barada has joined #linux-amlogic
chewitt has quit [Ping timeout: 256 seconds]
chewitt has joined #linux-amlogic
chewitt has quit [Ping timeout: 265 seconds]
chewitt has joined #linux-amlogic
Ivanovic has quit [Changing host]
Ivanovic has joined #linux-amlogic
chewitt_ has joined #linux-amlogic
chewitt has quit [Ping timeout: 265 seconds]
chewitt has joined #linux-amlogic
chewitt_ has quit [Ping timeout: 264 seconds]
a5m has joined #linux-amlogic
T_X has quit [Read error: Connection reset by peer]
yann has quit [Ping timeout: 255 seconds]
cthugha is now known as ldevulder
chewitt has quit [Ping timeout: 265 seconds]
Elpaulo_m2 has joined #linux-amlogic
Elpaulo_m has quit [Ping timeout: 240 seconds]
tingoose has joined #linux-amlogic
Elpaulo_m has joined #linux-amlogic
Elpaulo_m2 has quit [Ping timeout: 265 seconds]
<narmstrong> Ely: is the vififo size correctly reported ?
mchappellier has joined #linux-amlogic
chewitt has joined #linux-amlogic
tingoose has quit [Ping timeout: 268 seconds]
TobiasTh1Viking has joined #linux-amlogic
TobiasTheViking has quit [Ping timeout: 264 seconds]
cosm has quit [Ping timeout: 264 seconds]
cosm has joined #linux-amlogic
ramcq has quit [Ping timeout: 245 seconds]
ramcq has joined #linux-amlogic
Ely has quit [Ping timeout: 264 seconds]
edcragg has quit [Ping timeout: 264 seconds]
mastertheknife has quit [Ping timeout: 264 seconds]
mastertheknife has joined #linux-amlogic
edcragg has joined #linux-amlogic
Ely has joined #linux-amlogic
Elpaulo has quit [Read error: Connection reset by peer]
Elpaulo has joined #linux-amlogic
tingoose has joined #linux-amlogic
vagrantc has quit [Quit: leaving]
<Pix> https://developer.arm.com/products/software/mali-drivers/user-space Midgard linux drivers have been released..
<Pix> could it mean S912 could now have full linux support ? :)
<narmstrong> Pix: drivers for certain boards and Mali Midgards version has been release
<narmstrong> Amlogic or ARM did not release any User Space Mali driver for the T820 on S912
<Ely> narmstrong: Your comment about the size had me remember that they add a -8 offset to the vififo end. And sure enough I did that for the stbuf, but not the esparser vififo end. So is ends up being a silly mistake, luckily easy fix..
<narmstrong> Yeah !
<Pix> narmstrong, even if they released a midgard userland version for the kirin 960, you don't think it would enable the t820 ? (it's the same family, afaik)
<narmstrong> Maybe, some has already tried and it lead to artefacts.
<narmstrong> Anyway the kernel driver for Midgard is not finished on my side... it build ms but it seems the drivers needs some platform specific tweaks I did not had time to investigate
<Pix> :)
[TheBug] has quit [Ping timeout: 264 seconds]
[TheBug] has joined #linux-amlogic
dsd_ has joined #linux-amlogic
<ndufresne> Ely, hmm, 32 -> 64 is strangely familiar ...
<ndufresne> Ely, but how dos that vfifo works, does it move the pages when done with the oldest ?
<Ely> esparser fills the vififo and decoder takes the data from it
<Ely> But I didn't have the exact same vififo memory bounds set for both IPs
<Ely> so decoder was reading 8 bytes more, and then the read/write pointers got out of sync, and it failed badly
<ndufresne> oops
<ndufresne> good catch then
<Ely> Or maybe vice versa, esparser was writing 8 bytes that were never read by the decoder
<ndufresne> so 64mb was just delaying the moment it will break
<Ely> exactly
<Ely> but it did break anyway
<ndufresne> it was just a fixed lenght cycle in bytes ...
<Ely> yup, silly mistake
<ndufresne> the devil is in the detail as they say
Elpaulo_m2 has joined #linux-amlogic
Barada has quit [Quit: Barada]
Elpaulo_m has quit [Ping timeout: 240 seconds]
<Ely> This also drastically reduces errors seen when decoding at full speed with ffmpeg -f null -, like 1080p at 130fps
<Ely> although there are still a fews
<Ely> -s
Elpaulo_m has joined #linux-amlogic
Elpaulo_m2 has quit [Ping timeout: 265 seconds]
Elpaulo_m2 has joined #linux-amlogic
Elpaulo_m2 has quit [Client Quit]
Elpaulo_m has quit [Ping timeout: 260 seconds]
<ndufresne> Ely, and 4K ?
<Ely> Haven't tested yet, right now I'm fixing a bug where bitstreams with SEI data aren't decoded
<Ely> 4K is next
<Ely> unfortunately gst refuses to launch pipelines for like 80% of the mkv/mp4 files I find so it's a pain everytime
<ndufresne> Ely, can you show me how, with GST_DEBUG=2 ?
<ndufresne> there was some negotiation error on 1.12, some of them are fixed in 1.14, but the reporter from comcast couldn't give me streams to test with
<Ely> it's indeed a non negotiated error, let me dump the logs for you
<ndufresne> Ely, best is just to give me the link to the file, then I can reproduce
<ndufresne> this way you can focus on the driver ;-P
<ndufresne> Ely, for anyfiles, you can always do parsebin ! h264parse ! video/x-h264,stream-format=byte-stream ! filesink location=raw.h264
<ndufresne> this way you get rid of the noise coming from containers
<Ely> Thanks
<Ely> I dumped the h264 raw stream but even so, I get "h264parse0: Internal data stream error." when trying afterwards
<Ely> I really want to upgrade to 1.14 but not updated yet poky side :D
<ndufresne> this one is mov, so it AVC, you need to convert to byte-stream before you dump
<Ely> I did that with your command but unfortunately the pipeline fails thereafter
<Ely> gst-launch-1.0 filesrc location=raw.h264 ! h264parse ! v4l2video0dec ! videoconvert n-threads=4 ! kmssink driver-name=meson force-modesetting=true connector-id=31
<ndufresne> hmm, ok, I'll investigate
* ndufresne in meeting now
<Ely> Thanks a lot
jakogut_ has joined #linux-amlogic
Ntemis has joined #linux-amlogic
a5m has quit [Remote host closed the connection]
<Ely> ndufresne: 4K seems to work fine (using ffmpeg v4l2m2m), which is good news
<Ely> decode speed is 4k30 which I think is expected from spec
<Ely> at least for h264
<ndufresne> I think for H264 it's 30fps yest
<Ely> Had to cramp down max buffers because otherwise ffmpeg requests 20 4K capture buffers and cma is like "nope", but otherwise the picture looks good with ffplay
<ndufresne> hehe, and on gst side, 2M is probably too small
<Ely> oh, capture = output, sorry. I was talking in V4L2 terms :P
<Ely> for OUTPUT (input) buffers, I think the driver forces the size anyway to w*h, which would be around 8MB
<ndufresne> haha, that big, but ok
<ndufresne> I think gst will only allocate two anyway
<Ely> yeh gst is very minimalistic
<Ely> ffmpeg requests 20 of both types
<Ely> Maybe that's configurable though, I didn't look
<ndufresne> but as the parser makes a copy, I wonder why more then 2-3 would give better results
<Ely> absolutely
<Ely> But I don't think it's the driver's job to limit the amount of input buffers
<Ely> even if it knows it won't make a difference
<Ely> eh idk
<ndufresne> no, but if we don't set that value, aka 0, the drivers usually have small heuristic to give a size that usually works
<ndufresne> in fact, that should be come an utility in the kernel, and shared across drivers
<ndufresne> it's based on the profile level (and tier for hevc)
<Ely> I may have spoken too soon, I can't find the 20 in FFmpeg, looks like they request 0.. maybe v4l2 sets it to 20
<Ely> nope nevermind
<Ely> OFFSET(capture.num_buffers), AV_OPT_TYPE_INT, {.i64 = 20}, 20, INT_MAX, FLAGS },
<Ely> It is an option though, I wonder how I translate that in cmdline
<Ely> ahh but the minimum is 20.. Oh well :D
<Ely> Minimum possible is ffmpeg -num_capture_buffers 20 -num_output_buffers 6 -c:v h264_v4l2m2m
<ndufresne> weird
<Ely> I'll post a patch lowering these down and see what happens
<ndufresne> good idea
<ndufresne> I'm asking ndec, to mind me who's the author, so I can ask the author why ;-P
<ndufresne> (on #linux-msm)
<Ely> righto$
<ndufresne> his nick is ldts
<ndufresne> Jorge Ramirez-Ortiz, a nice guy, I met him at ELCE last year
<ndufresne> I'm just very bad with names
<Ely> He's right here as well, o/ ldts
<ndufresne> hehe
<ndufresne> he's probbly on European timezone
<chewitt> Jorge helped us get Kodi running with v4l2 m2m on a DragonBoard 410c towards the end of last year
<ndufresne> Ely, so back to H264 4K, means we have full HW performance with the default firmware, that makes things easier ...
<chewitt> https://www.youtube.com/watch?v=gEEmCsgioII <= blue t-shirt on the left side
<ndufresne> chewitt, wasn't the lack of dmabuf in ffmepg a problem ? or was this added and I missed it ?
<ndufresne> at least, DB410c decoder is decoding to cacheable memory ;-P
<chewitt> i'm the wrong person to ask :)
<chewitt> that video might have the answer
<ndufresne> the commenter is funny
<ndufresne> chewitt, did you notice that khodi says "SW", because it assumed everything ffmpeg is SW
<chewitt> that's just cosmetic
<chewitt> there was quite a bit of work done Kodi side since then
<ndufresne> but yeah, true zero-copy is needed to reach high framerate (1080p60)
<ndufresne> I'm curious how they are going to add support for FD backed frames in ffmpeg, because I could then use that in gst, and then less code for me to maintain !
<chewitt> specific to Rockchip at the time
<chewitt> but can be adapted once the scheduler API changes land .. afaik
<ndufresne> request apis, rockchip codec is stateless
<ndufresne> oh, this is downstream mvpp thing
<chewitt> again, i'm not really the person to ask :)
<ndufresne> not the one running on chrome books
<ndufresne> this one is a simple mailbox driver with a fully userspace driver, the driver implements DRM Dumb to let userspace allocate memory
<ndufresne> (a big hack)
<chewitt> at that point we were forced to use a 4.4 bsp for support
<chewitt> for RK things are being reworked around 4.16 at the moment, which gives a base to start poking m2m things
<ndufresne> av_drmprime struct isn't a great idea though, like if DMABuf was a DRM thing ...
<ndufresne> I didn't realize how much downstream HW accel support was in ffmpeg
<chewitt> the same guy who did that work has just finished submitting v4l2 support to Qt as well
<ndufresne> with super evident names, like h264_mmal
<ndufresne> I know it's RPi, but what the ....
<ndufresne> the problem is that each of these have "special" format, so it never just work ...
<ndufresne> imho, dmabuf should be exposed as normal formats, and a side API to access the FDs, this way, it just work like any SW codec, and you can optimized once for Linux
<dsd_> cale
tingoose has quit [Ping timeout: 260 seconds]
Ntemis has quit [Remote host closed the connection]
trem has joined #linux-amlogic
Barada has joined #linux-amlogic
<ndufresne> Ely, ok, for the stream you gave me, you'll have to fix your try_fmt implementation
<ndufresne> right now I do TRY_FMT(32768x32768 with format H264)
<ndufresne> and it gives me 1080p
<ndufresne> so I assume that 1080p is the maximum supported by that codec, and then it fails negotiation
<ndufresne> long term, you should implement ENUM_FRAMESIZE
<Ely> Both those were fixed recently :/
<Ely> I added enum_framesize and bumped try_fmt to 3840*2160
<ndufresne> arg, oops, wrong kernel, 4.16.0-rc7-vdec+ -> 4.16.0-vdec+
Barada has quit [Quit: Barada]
* ndufresne need to rebase gst HEVC support
<Ely> I see 3 anomalies, but don't know which one is critical:
<Ely> - Both the "Returning sink caps video/x-h264" are 1920x1080 even though I do I don't hardcode that anymore
<Ely> - Unknown enum v4l2_colorspace 0
<Ely> - Unable to enumerate intervals for NM12@3840x2160
<Ely> well, the last point is more about the lack of 3840*2160 instead of the presence of 1920*1080
<ndufresne> Ely, it chokes on code added by Philipe Zabel for the CODA
<ndufresne> I've booted the right kernel now, so I'm at the same page
<Ely> ah
<Ely> I don't implement g_selection, could that be the reason ?
mag- is now known as mag
<ndufresne> Ely, no, it fails on re-enumeration of format
<ndufresne> This is because the CODA driver can produce multiple color formats (like ours)
<ndufresne> and gst will negotiate that with downstream
<ndufresne> and 1.12 is different then 1.14
<ndufresne> on 1.14, I get Device wants 2:3:11:1 colorimetry
<ndufresne> did you hardcode BT709 ?
<Ely> I do everything like venus, the colorspace is initialized at 0, and it stays like that until we set it to what we have in s_fmt
lrusak has joined #linux-amlogic
<ndufresne> so there was this being fixed, but it should be in 1.12.3
<Ely> side question, can you run the iphone sample with 1.14 ?
<ndufresne> no, it fails earlier with this colorimetry thing, working on it
<Ely> Ah kk
<ndufresne> Ely, on 1.14, if I extract the raw h264, then it playes, gst-launch-1.0 filesrc location=test.h264 ! h264parse ! v4l2h264dec ! fakevideosink
<ndufresne> but currently it fails with the mov provided colorimetry, and I don't know why yet
<ndufresne> Ely, it's no full framerate though, I get 27fps
<Ely> Yeah there's some clock work in the dts that I haven't fixed yet and was suggested by narmstrong
<Ely> I don't think in the current branch the decoder is actually running at max speed
<ndufresne> and the raw h264 works on 1.12.3 here
<ndufresne> so it's really the colorimetry stuff that messes up, I'll have to continue this later
<ndufresne> Ely, though, you cannot test for decoding speed on 1.12, you need fakevideosink element for that
<Ely> Mh, I can't get the raw h264 to work on 1.12.4..
<ndufresne> how did you extract ?
<ndufresne> gst-launch-1.0 -v filesrc location=~/Videos/iphone6s_4k.mov ! parsebin ! video/x-h264,stream-format=byte-stream ! filesink location=test.h264
<ndufresne> gst-launch-1.0 filesrc location=test.h264 ! h264parse ! queue ! v4l2video0dec ! queue ! fpsdisplaysink video-sink=fakesink text-overlay=0 sync=0 -v
<Ely> For speed I test with ffmpeg -c:v h264_v4l2m2m -i iphone6s_4k.mov -f null -
<ndufresne> maybe yocto applies some broken patches ?
<Ely> I extracted it with your previous gst commands, but let me try again with those 2
<ndufresne> and md5: 4fb1d285ad4aa258ba4615c302872b1c test.h264
<Ely> ah, works fine now
<ndufresne> I'll check the colorimetry problem later
<Ely> But it doesn't with kmssink, maybe that's what was the limiting factor
<Ely> Alright thanks!!
<ndufresne> well, here it fails with no-more cMA
<ndufresne> meson-drm d0100000.vpu: swiotlb: coherent allocation failed, size=33177600
<Ely> :D
<Ely> I locally increased my cma pool in the dts so might be why
<ndufresne> (note, you can also pass cma=...M to your kernel
tingoose has joined #linux-amlogic
tingoose has quit [Ping timeout: 260 seconds]
tingoose has joined #linux-amlogic
pionen has joined #linux-amlogic
pionen has quit [Changing host]
pionen has joined #linux-amlogic
pionen has quit [Client Quit]
pionen has joined #linux-amlogic
tingoose has quit [Ping timeout: 264 seconds]
mchappellier has quit []
trem has quit [Quit: Leaving]
pionen has quit [Ping timeout: 245 seconds]
sputnik_ has quit [Remote host closed the connection]
pionen has joined #linux-amlogic
sputnik_ has joined #linux-amlogic
vagrantc has joined #linux-amlogic
The_Coolest has joined #linux-amlogic
<The_Coolest> Elpaulo>> https://i.imgur.com/GoeYTak.jpg
<The_Coolest> :P
dsd_ has quit [Quit: Lost terminal]
steamport_ is now known as steamport
pionen has quit [Quit: leaving]