projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2da15a3
)
vl/rbsp: match initial escaped bits with valid in the buffer
author
Leo Liu
<leo.liu@amd.com>
Tue, 6 Sep 2016 17:14:48 +0000
(13:14 -0400)
committer
Leo Liu
<leo.liu@amd.com>
Mon, 12 Sep 2016 14:09:27 +0000
(10:09 -0400)
Otherwise the check for the three byte will not make sense.
Signed-off-by: Leo Liu <leo.liu@amd.com>
src/gallium/auxiliary/vl/vl_rbsp.h
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/vl/vl_rbsp.h
b/src/gallium/auxiliary/vl/vl_rbsp.h
index 160b2f82773cd55053ed84fd4a6049661e8d408c..4d90c2de09c85af79224c5b2bfe8093c7692cec7 100644
(file)
--- a/
src/gallium/auxiliary/vl/vl_rbsp.h
+++ b/
src/gallium/auxiliary/vl/vl_rbsp.h
@@
-56,8
+56,6
@@
static inline void vl_rbsp_init(struct vl_rbsp *rbsp, struct vl_vlc *nal, unsign
/* copy the position */
rbsp->nal = *nal;
- rbsp->escaped = 16;
-
/* search for the end of the NAL unit */
while (vl_vlc_search_byte(nal, num_bits, 0x00)) {
if (vl_vlc_peekbits(nal, 24) == 0x000001 ||
@@
-76,6
+74,10
@@
static inline void vl_rbsp_init(struct vl_rbsp *rbsp, struct vl_vlc *nal, unsign
i += 8;
}
}
+
+ valid = vl_vlc_valid_bits(&rbsp->nal);
+
+ rbsp->escaped = (valid >= 16) ? 16 : ((valid >= 8) ? 8 : 0);
}
/**