Skip to content

Draft: RkvDEC HEVC driver for pre-review

Cover letter:

Implement the HEVC codec variation for the RkVDEC driver. Currently only the RK3399 is supported, but it is possible to enable the RK3288 as it also supports this codec.

Based on top of the media tree @945a9a8e and the HEVC uABI MR by Benjamin Gaignard. (https://patchwork.linuxtv.org/project/linux-media/list/?series=8208)

Tested with the GStreamer V4L2 HEVC plugin: (https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1079)

Current Fluster score: Ran 131/147 tests successfully in 278.568 secs with python3 fluster.py run -d GStreamer-H.265-V4L2SL-Gst1.0 -ts JCT-VC-HEVC_V1 -j1

failed conformance tests:

  • DBLK_D_VIXS_2 (Success on Hantro G2)
  • DSLICE_A_HHI_5 (Success on Hantro G2)
  • EXT_A_ericsson_4 (Success on Hantro G2)
  • PICSIZE_A_Bossen_1 (Hardware limitation)
  • PICSIZE_B_Bossen_1 (Hardware limitation)
  • PICSIZE_C_Bossen_1 (Hardware limitation)
  • PICSIZE_D_Bossen_1 (Hardware limitation)
  • PPS_A_qualcomm_7 (Success on Hantro G2)
  • SAODBLK_A_MainConcept_4 (Success on Hantro G2)
  • SAODBLK_B_MainConcept_4 (Success on Hantro G2)
  • SLIST_B_Sony_9 (Success on Hantro G2)
  • SLIST_D_Sony_9 (Success on Hantro G2)
  • TSUNEQBD_A_MAIN10_Technicolor_2 (Success on Hantro G2)
  • VPSSPSPPS_A_MainConcept_1 (Success on Hantro G2)
  • WPP_D_ericsson_MAIN10_2 (Fail on Hantro G2)
  • WPP_D_ericsson_MAIN_2 (Fail on Hantro G2)

Not tested with FFMpeg so far.

Known issues:

  • Unable to reliably decode multiple videos concurrently
  • The SAODBLK_* tests timeout if the timeout time in fluster is lower than 120
  • Currently the uv_virstride is calculated in a manner that is hardcoded for the two available formats NV12 and NV15. (@config_registers)
  • The bit_writer implementation is currently a copy of an implementation in the drbd block driver

Ignored Checkpatch warnings:

WARNING: line length of 162 exceeds 100 columns
#115: FILE: drivers/media/v4l2-core/v4l2-common.c:265:
+               { .format = V4L2_PIX_FMT_NV15,    .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 5, 5, 0, 0 }, .hdiv = 2, .vdiv = 2,

ERROR: trailing statements should be on next line
#128: FILE: drivers/media/v4l2-core/v4l2-ioctl.c:1305:
+       case V4L2_PIX_FMT_NV15:         descr = "10-bit Y/CbCr 4:2:0 (Packed)"; break;

v4l2-compliance test:

Total for rkvdec device /dev/video3: 46, Succeeded: 46, Failed: 0, Warnings: 0

Merge request reports