Public bug reported:

[ Impact ]

 * Raspberry Pi 5 users on Ubuntu Noble cannot use the rpivid_hevc hardware
   decoder to decode the tested HEVC stream with source-built GStreamer
   1.26.11. The pipeline fails before playback starts, with these errors:

     MEDIA_REQUEST_IOC_QUEUE, failed: No such file or directory
     Driver did not accept the decode request.

   The kernel reports "Missing required codec control". This stops hardware
   decoding through v4l2slh265dec. Affected applications must use another
   decoder, such as a software decoder.

[ Test Plan ]

 * Use a Raspberry Pi 5 running Ubuntu Noble. Make sure the rpivid_hevc
   decoder is available and no other application is using it. The test
   requires source-built GStreamer 1.26.11 with v4l2slh265dec and
   fakevideosink.

 * Create a 20-second, 1920x1080, 60 fps, 8-bit HEVC test clip:

   ```bash
   ffmpeg -f lavfi -i testsrc2=size=1920x1080:rate=60 -t 20 \
       -c:v libx265 -preset veryfast -b:v 15M hevc-1080p60.mkv
   ```

 * Try decoding the clip with the hardware decoder:

   ```bash
   gst-launch-1.0 filesrc location=hevc-1080p60.mkv ! matroskademux ! h265parse 
! \
       v4l2slh265dec ! fakevideosink
   ```

 * With the stock kernel, expect "Driver did not accept the decode request"
   and a nonzero exit status.

 * Boot the patched kernel and run the same decode command with the same
   GStreamer build and test clip. Expect exit status 0 and EOS (end of
   stream), with no decode errors.

[ Where problems could occur ]

 * Applications that send a decode request before providing SPS/PPS will
   get a different error if SPS is missing. Before this fix, the request
   was rejected when queued, with ENOENT. With the fix, the request passes
   validation but fails later, during frame setup. The kernel then reports
   "SPS never set" and marks the output buffer with an error. Applications
   that depend on the earlier queue-time error may need to handle this
   later failure instead.

[ Other Info ]

 * Upstream fix:
   https://github.com/raspberrypi/linux/pull/6323
   Subject: "media/rpivid: Make SPS / PPS optional in a request"
   The fix is in Raspberry Pi's 6.6, 6.10 and 6.11 branches. It is not in
   rpi-6.8.y, whose latest commit is older than the fix.

 * The issue was reproduced on Ubuntu Noble, arm64, Raspberry Pi 5, with
   kernel 6.8.0-1065-raspi, source package linux-raspi 6.8.0-1065.69, and
   source-built GStreamer 1.26.11. Noble's installed GStreamer 1.24.2 did
   not provide v4l2slh265dec on this device, so the test required the
   source-built version.

** Affects: linux-raspi (Ubuntu)
     Importance: Undecided
     Assignee: Maizi Liao (liaomaizi)
         Status: New

** Affects: linux-raspi (Ubuntu Noble)
     Importance: Undecided
     Assignee: Maizi Liao (liaomaizi)
         Status: New

** Changed in: linux-raspi (Ubuntu)
     Assignee: (unassigned) => Maizi Liao (liaomaizi)

** Also affects: linux-raspi (Ubuntu Noble)
   Importance: Undecided
       Status: New

** Changed in: linux-raspi (Ubuntu Noble)
     Assignee: (unassigned) => Maizi Liao (liaomaizi)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2173603

Title:
  rpivid rejects HEVC decode requests unless SPS/PPS controls are sent
  again

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/2173603/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to