H.264 CABAC support

According to the documentation, cabac encoding is supported for main or high profile. This option doesn’t have any effect:


gst-launch-1.0 videotestsrc num-buffers=48 pattern=1 ! 'video/x-raw,width=1920,height=1080,format=I420,framerate=24/1' ! nvvidconv ! nvv4l2h264enc profile=2 cabac-entropy-coding=1 ! video/x-h264,stream-format=byte-stream ! filesink location=/tmp/cabac.h264

I can toggle the cabac-entropy-coding between 0 and 1 and the resulting bitstream is bit-for-bit the same.

Analyzing the stream shows cabac_init_idc = 0

I’m using Jetpack 4.2 on a TX2.

Thanks for the help.

I was mistaken. I should have been looking at entropy_coding_mode_flag. I do see CABAC set.

On second thought, is there any setting for the TX2 omxh264encoder to produce CABAC on release 28.2?
I found I can set the profile by using the omx profile=(1|2|8), but that setting still generates CAVLC on any of the profiles.

I tried setting the level by adding “level=(string)5” in the capabilities string.

I can see the profile and level changing, but the entorpy_coding_mode_flag in the resultant bitstream is still 0.

For comparison, I tried a TK1 using R21.5 and I was able to obtain CABAC (entropy_coding_mode_flag=1) by setting profile=2.

Adding summary:

R21.5(TK1): Set level to main or high -> CABAC
R28.2(TX2): cannot get CABAC
R32.1(TX2): omxh264enc has parameter cabac-entropy-coding=1 to enable CABAC

I was hoping we could enable CABAC on deployed systems without having to upgrade the tegra release version.