mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
util/rbsp: Fill bits again if reading more than 16 leading zeros
Same as 73d69ef1e6, this is also needed for vl_rbsp_ue.
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30672>
This commit is contained in:
parent
5bf6602d23
commit
fc1ec3c5d4
1 changed files with 4 additions and 1 deletions
|
|
@ -151,8 +151,11 @@ static inline unsigned vl_rbsp_ue(struct vl_rbsp *rbsp)
|
|||
unsigned bits = 0;
|
||||
|
||||
vl_rbsp_fillbits(rbsp);
|
||||
while (!vl_vlc_get_uimsbf(&rbsp->nal, 1))
|
||||
while (!vl_vlc_get_uimsbf(&rbsp->nal, 1)) {
|
||||
++bits;
|
||||
if (bits == 16)
|
||||
vl_rbsp_fillbits(rbsp);
|
||||
}
|
||||
|
||||
return (1 << bits) - 1 + vl_rbsp_u(rbsp, bits);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue