cisco / openh264

Open Source H.264 Codec
BSD 2-Clause "Simplified" License
5.49k stars 1.78k forks source link

CABAC decoding performance #3490

Open jrmuizel opened 2 years ago

jrmuizel commented 2 years ago

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.

jrmuizel commented 2 years ago

Better ffmpeg profile: https://share.firefox.dev/3C57kSu