One notable difference between ffmpeg's CABAC decoding and openh264's is that no errors are ever returned from decoding. Instead, the buffer is not advanced if the end is reached. This lets the return value be used for the decoded value and allows the callers to avoid needing to check for errors.
While decoding https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/1080/Big_Buck_Bunny_1080_10s_30MB.mp4 CABAC decoding shows up as the biggest bottleneck: https://share.firefox.dev/36VWWkH
compare with: https://share.firefox.dev/3Mb6hFz
One notable difference between ffmpeg's CABAC decoding and openh264's is that no errors are ever returned from decoding. Instead, the buffer is not advanced if the end is reached. This lets the return value be used for the decoded value and allows the callers to avoid needing to check for errors.