Cannot enable CABAC h264_entropy_mode on Venus encoder


#1

Hello All,

I’m on the latest 18.01 kernel and I’m attempting to use the better CABAC entropy coding mode that should be supported by the Venus h.264 encoder on board the DragonBoard 410c.

The issue is when I enable CABAC entropy coding mode with my GStreamer pipeline using the following parameters: controls,h264_level=9,h264_profile=4,video_gop_size=121,video_bitrate=1000000,h264_entropy_mode=1

I get the following errors from Venus:
[71482.209033] qcom-venus 1d00000.video-codec: no valid instance(pkt session_id:dead, pkt:21001)
[71482.209181] qcom-venus-encoder 1d00000.video-codec:video-encoder: enc: event session error 0
[71482.216712] qcom-venus 1d00000.video-codec: SFR message from FW: QC_IMAGE_VERSION_STRING=VIDEO.VE.1.8-00109, Err_Fatal - Z:\b\venus\encoders\src\venus_venc_host_driver.c:5038:
[71482.320046] qcom-venus 1d00000.video-codec: system error has occurred, starting recovery!

All other functionalities of the venus driver seem to work.

I have the proper patch submitted by @Loic that exposes this venus functionality to V4L2 - https://git.linaro.org/landing-teams/working/qualcomm/kernel.git/commit/drivers/media/platform/qcom/venus/venc.c?h=debian-qcom-dragonboard410c-18.01&id=19a3da7ae13404c581d8240942c1065e035a1492


#2

@svarbanov any ideas?


#3

Could you try without set gop_size? I will try to investigate that further.


#4

With the following extra-controls element on my pipeline:
controls,h264_level=15,h264_profile=0,video_bitrate_mode=1,video_bitrate=2000000,h264_entropy_mode=1

I still get the following errors:
[ 34.017950] qcom-venus 1d00000.video-codec: no valid instance(pkt session_id:dead, pkt:21001)
[ 34.017995] qcom-venus-encoder 1d00000.video-codec:video-encoder: enc: event session error 0
[ 34.025628] qcom-venus 1d00000.video-codec: SFR message from FW: QC_IMAGE_VERSION_STRING=VIDEO.VE.1.8-00109, Err_Fatal - Z:\b\venus\encoders\src\venus_venc_host_driver.c:5038:
[ 34.127244] qcom-venus 1d00000.video-codec: system error has occurred, starting recovery!
[ 36.099283] qcom-venus 1d00000.video-codec: recovery failed (-110)
[ 36.115258] qcom-venus 1d00000.video-codec: system error has occurred, starting recovery!


#5

@svarbanov
Anything that I can try on my side to help? Can you reproduce my issue?