Go to advanced search

by ewanr-bbc
Wed Aug 12, 2020 1:52 pm
Forum: Graphics programming
Topic: eglCreateImage fails when playing video in Chromium
Replies: 26
Views: 1001

Re: eglCreateImage fails when playing video in Chromium

Hi yaegashi, I have actually come across your Ozone/dispmanx repo before, nice work! I think the Ozone-GBM error you're describing sounds like the problem I stumbled on a while back, in which Ozone tries to use a platform-specific "PlatformScreen" implementation, which doesn't exist. To fix this, yo...
by ewanr-bbc
Tue Aug 11, 2020 9:42 am
Forum: Graphics programming
Topic: eglCreateImage fails when playing video in Chromium
Replies: 26
Views: 1001

Re: eglCreateImage fails when playing video in Chromium

Thanks for this, interesting to see the commits that Eric made. I will raise an issue on the Mesa repo.
I will drop you an email re: our Chromium build.
by ewanr-bbc
Mon Aug 10, 2020 4:29 pm
Forum: Graphics programming
Topic: eglCreateImage fails when playing video in Chromium
Replies: 26
Views: 1001

Re: eglCreateImage fails when playing video in Chromium

After delving into what's happening in Mesa, I have found the cause of the problem. Chromium is creating EGL images for V3D, which means it runs v3d_resource_from_handle. Here, rsc->tiled will be true if the modifier is DRM_FORMAT_MOD_BROADCOM_UIF, or if the modifier is DRM_FORMAT_MOD_INVALID and sc...
by ewanr-bbc
Fri Jul 24, 2020 3:43 pm
Forum: Graphics programming
Topic: eglCreateImage fails when playing video in Chromium
Replies: 26
Views: 1001

Re: eglCreateImage fails when playing video in Chromium

I was right, I needed to allocate capture buffers during initialisation. I now get a resolution change, which returns 1920x1088/1920x1080: [13736.174226] bcm2835-codec bcm2835-codec: handle_fmt_changed: Format changed: buff size min 3133440, rec 3133440, buff num min 1, rec 1 [13736.174233] bcm2835-...
by ewanr-bbc
Fri Jul 24, 2020 2:49 pm
Forum: Graphics programming
Topic: eglCreateImage fails when playing video in Chromium
Replies: 26
Views: 1001

Re: eglCreateImage fails when playing video in Chromium

This appears to be the culprit . If the "coded_size_" is empty, and G_FMT doesn't return EINVAL , then Chromium will trigger a resolution change regardless. As we know that the Raspberry Pi does trigger a resolution change event, I have removed this and we no longer get any EGL errors. Unfortunatel...
by ewanr-bbc
Fri Jul 24, 2020 12:00 pm
Forum: Graphics programming
Topic: eglCreateImage fails when playing video in Chromium
Replies: 26
Views: 1001

Re: eglCreateImage fails when playing video in Chromium

Have reverted changes to the kernel in order to run this on 5.4. I'm getting the same behaviour. I get the same kernel log you noted above: [ 239.310384] bcm2835-codec bcm2835-codec: bcm2835_codec_buf_prepare: type: 10 ptr 92926517 [ 239.311136] bcm2835-codec bcm2835-codec: bcm2835_codec_buf_queue: ...
by ewanr-bbc
Fri Jul 24, 2020 11:23 am
Forum: Graphics programming
Topic: Chromium/minigbm: DRM_IOCTL_VC4_CREATE_BO failed in kernel 5.4
Replies: 6
Views: 439

Re: Chromium/minigbm: DRM_IOCTL_VC4_CREATE_BO failed in kernel 5.4

Makes sense! I accidentally created a pull request to raspberrypi/linux instead of bbc/linux (d'oh!). Feel free to close if you want.
by ewanr-bbc
Fri Jul 24, 2020 10:16 am
Forum: Graphics programming
Topic: Chromium/minigbm: DRM_IOCTL_VC4_CREATE_BO failed in kernel 5.4
Replies: 6
Views: 439

Re: Chromium/minigbm: DRM_IOCTL_VC4_CREATE_BO failed in kernel 5.4

Will do, shall I create a pull request to raspberrypi/linux?
by ewanr-bbc
Fri Jul 24, 2020 9:09 am
Forum: Graphics programming
Topic: Chromium/minigbm: DRM_IOCTL_VC4_CREATE_BO failed in kernel 5.4
Replies: 6
Views: 439

Re: Chromium/minigbm: DRM_IOCTL_VC4_CREATE_BO failed in kernel 5.4

Okay, I'll remove it from my kernel for now. Let me know if you find anything out.
by ewanr-bbc
Thu Jul 23, 2020 4:05 pm
Forum: Graphics programming
Topic: Chromium/minigbm: DRM_IOCTL_VC4_CREATE_BO failed in kernel 5.4
Replies: 6
Views: 439

Chromium/minigbm: DRM_IOCTL_VC4_CREATE_BO failed in kernel 5.4

I'm creating a separate post for the issue I mentioned in a post about a different issue . When trying to run Chromium Ozone-GBM on Raspbian with kernel 5.4, I get an error from minigbm: [minigbm:vc4.c(76)] DRM_IOCTL_VC4_GEM_CREATE failed (size=8294400) Having looked more closely, this should actual...
by ewanr-bbc
Thu Jul 23, 2020 8:57 am
Forum: Graphics programming
Topic: eglCreateImage fails when playing video in Chromium
Replies: 26
Views: 1001

Re: eglCreateImage fails when playing video in Chromium

I have not personally noticed any differences in V4L2 between 4.19 and 5.4, but I don't know very much about the backed of course.

I have only upgraded the kernel so perhaps this is why I'm running into issues. Maybe it's worth sticking to 4.19 if I can continue to address V4L2 first.
by ewanr-bbc
Wed Jul 22, 2020 4:40 pm
Forum: Graphics programming
Topic: eglCreateImage fails when playing video in Chromium
Replies: 26
Views: 1001

Re: eglCreateImage fails when playing video in Chromium

Looks like I will have to put V4L2 on the back burner for the moment. I have upgraded the kernel to 5.4.45 which appears to make minigbm unhappy: MINIGBM: CREATE! Format: AR24 MINIGBM: CREATE_FOR_MODIFIER! Format: DRM_FORMAT_MOD_LINEAR [minigbm:vc4.c(76)] DRM_IOCTL_VC4_GEM_CREATE failed (size=829440...
by ewanr-bbc
Wed Jul 22, 2020 3:48 pm
Forum: Graphics programming
Topic: eglCreateImage fails when playing video in Chromium
Replies: 26
Views: 1001

Re: eglCreateImage fails when playing video in Chromium

Ah, I'm running on 4.19.118... I will switch to 5.4 and give this all another try...
by ewanr-bbc
Wed Jul 22, 2020 3:29 pm
Forum: Graphics programming
Topic: eglCreateImage fails when playing video in Chromium
Replies: 26
Views: 1001

Re: eglCreateImage fails when playing video in Chromium

I popped some logging in V4L2VideoDecodeAccelerator::FinishResolutionChange and we get: [2617:2744:0722/162242.868687:VERBOSE1:v4l2_video_decode_accelerator.cc(2014)] FinishResolutionChange(): ret=1, again=0 [2617:2744:0722/162242.869055:VERBOSE2:v4l2_video_decode_accelerator.cc(2145)] CreateBuffers...
by ewanr-bbc
Wed Jul 22, 2020 3:13 pm
Forum: Graphics programming
Topic: eglCreateImage fails when playing video in Chromium
Replies: 26
Views: 1001

Re: eglCreateImage fails when playing video in Chromium

This is the dmesg output for the same run: [ 252.642443] video10: VIDIOC_ENUM_FMT: index=0, type=vid-out-mplane, flags=0x1, pixelformat=H264, description='H.264' [ 252.642663] video10: VIDIOC_ENUM_FMT: index=1, type=vid-out-mplane, flags=0x1, pixelformat=MJPG, description='Motion-JPEG' [ 252.642865]...
by ewanr-bbc
Wed Jul 22, 2020 3:12 pm
Forum: Graphics programming
Topic: eglCreateImage fails when playing video in Chromium
Replies: 26
Views: 1001

Re: eglCreateImage fails when playing video in Chromium

Yes, that's what I meant sorry. The H.264 output buffers (type 10) are set to 0x0, the YV12 capture buffers (type 9) are then set to 32x32. I may have made this more confusing by saying "Chromium output" when I meant the log! While 32x32 is not the default, like you say, it is the minimum. So certai...
by ewanr-bbc
Wed Jul 22, 2020 2:40 pm
Forum: Graphics programming
Topic: eglCreateImage fails when playing video in Chromium
Replies: 26
Views: 1001

Re: eglCreateImage fails when playing video in Chromium

It appears Chromium has set the input H.264 buffers to 0x0px. [ 154.757992] bcm2835-codec bcm2835-codec: Setting format for type 10, wxh: 0x0, fmt: H264, size 524288 [ 154.758000] bcm2835-codec bcm2835-codec: Calulated bpl as 0, size 524288 [ 154.759607] bcm2835-codec bcm2835-codec: Setting format f...
by ewanr-bbc
Wed Jul 22, 2020 11:18 am
Forum: Graphics programming
Topic: eglCreateImage fails when playing video in Chromium
Replies: 26
Views: 1001

Re: eglCreateImage fails when playing video in Chromium

I was looking into implementing something like your suggestion, but in doing so have found that there isn't just 1 plane, in fact. As mentioned here , the num_planes variable is actually the number of components in the format, not the number of V4L2 planes. So Chromium does actually set up 2/3 plane...
by ewanr-bbc
Tue Jul 21, 2020 4:41 pm
Forum: Graphics programming
Topic: eglCreateImage fails when playing video in Chromium
Replies: 26
Views: 1001

Re: eglCreateImage fails when playing video in Chromium

Okay, it's making sense so far! I'm using a Pi 4, which means V3D? I have, in fact, forced the decoder to use NV12 instead of YV12 , as this was the only format that worked with the VDA tests. I believe this is irrelevant, though, as V4L2 sees YV12 as a single plane too? I get the same error regardl...
by ewanr-bbc
Tue Jul 21, 2020 2:49 pm
Forum: Graphics programming
Topic: eglCreateImage fails when playing video in Chromium
Replies: 26
Views: 1001

eglCreateImage fails when playing video in Chromium

I'm trying to get V4L2 decode working in a custom build of Chromium. I have successfully run tests on the Pi using the Video Decode Accelerator (VDA), which I am now trying to use in-browser. The decoder successfully initialises, requests buffers, streams, and handles the initial resolution change. ...
by ewanr-bbc
Fri Jun 19, 2020 2:40 pm
Forum: Graphics programming
Topic: Location of kernel media headers
Replies: 1
Views: 250

Location of kernel media headers

This is more of a general question about the Linux kernel, so please correct me if this is the wrong board. I am attempting to compile a C++ project against the V4L2 kernel headers, but am having some trouble. The project is cross-compiled on Ubuntu, using a Debian ARM sysroot, but fails with the fo...
by ewanr-bbc
Fri May 29, 2020 9:31 am
Forum: Graphics programming
Topic: Video acceleration on Raspberry Pi OS 64-bit
Replies: 6
Views: 1164

Re: Video acceleration on Raspberry Pi OS 64-bit

Excellent, thanks :)
by ewanr-bbc
Fri May 29, 2020 9:06 am
Forum: Graphics programming
Topic: Video acceleration on Raspberry Pi OS 64-bit
Replies: 6
Views: 1164

Re: Video acceleration on Raspberry Pi OS 64-bit

Okay thanks for this. My understanding is that the V4L2 M2M stateful decoder is a wrapper around MMAL. So, by extension, I assume this decoder does not work either?
by ewanr-bbc
Thu May 28, 2020 1:37 pm
Forum: Graphics programming
Topic: Video acceleration on Raspberry Pi OS 64-bit
Replies: 6
Views: 1164

Video acceleration on Raspberry Pi OS 64-bit

Great to see some progress on a 64-bit version of Raspberry Pi OS! I wanted to ask for some clarification on one of the known issues : 1) There is no hardware video acceleration in VLC or Chromium Is this because of the specific implementations in the current versions of VLC/Chromium, or because the...
by ewanr-bbc
Mon May 18, 2020 4:38 pm
Forum: Graphics programming
Topic: Corrupted video output using multi-planar V4L2 M2M
Replies: 5
Views: 493

Re: Corrupted video output using multi-planar V4L2 M2M

Thanks for the comprehensive response! That explains a lot.

I will have a go at parsing the bytestream myself. Is there any plan to enable V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM in future?

Go to advanced search