Repository navigation
Patch release fixing H.264/HEVC encoder configuration on the V4L2 backend with the i.MX 8M Plus Hantro driver (vsi_v4l2enc). No API or ABI changes.
Fixed
- V4L2 encoder controls had no effect (
lib/encoder_v4l2.c). Bitrate, GOP, profile and level were set after buffer allocation, which thevsi_v4l2driver accepts but does not apply, so streams were Baseline profile with the driver's default rate control regardless of the requested bitrate. They are now set beforeVIDIOC_REQBUFS. (EDGEAI-2013) - Encoder frame rate was never set.
VIDIOC_S_PARMnow sets the OUTPUT frame interval, so rate control budgets each frame. At 1080p30 the measured bitrate now tracks each profile (5, 25, 50 and 100 Mbps), where it was previously 88 to 105 Mbps for every profile. (EDGEAI-2013) - IDR frames were coded 15 to 20 QP coarser than the surrounding P-frames, producing a visible drop in quality once per GOP. The V4L2 backend now uses constant bitrate with macroblock-level rate control. (EDGEAI-2013)
Changed
VSL_ENCODE_PROFILE_AUTOon the V4L2 backend scales the bitrate with resolution and frame rate, about 10 Mbps at 1080p30, instead of a fixed 5 Mbps. (EDGEAI-2013)- The V4L2 backend selects the H.264 and HEVC levels from resolution, frame rate and bitrate instead of always using 4.0 and 4. Encoder setup fails when the resolution or frame rate exceeds level 5.1, the highest the driver accepts. A bitrate above the level 5.1 limit is reduced to that limit; for HEVC, which the driver encodes in Main tier only, this caps the 50 and 100 Mbps profiles at 40 Mbps. (EDGEAI-2013)