Skip to content

util/rbsp: Fill bits twice if reading more than 16 bits

David Rosca requested to merge nowrep/mesa:rbsp-fill32 into main

What does this MR do and why?

util/rbsp: Fill bits twice if reading more than 16 bits

vl_rbsp_fillbits may fill less than 32 bits if it removes emulation
prevention bytes, but will fill at least 16 bits. We need to call it
twice when reading more than 16 bits.

This fixes parsing H264 SPS packed header in va frontend when emulation
prevention bytes are at position where 32 bit values are read.

Cc: mesa-stable

Merge request reports