in Vp9UncompressedHeaderParser fix reading delta quantization parameter
delta_q is encoded as signed integer (s(4)) that uses extra bit for the sign. See VP9 Bitstream Specification section 6.2.10 Delta quantizer syntax Bug: None Change-Id: Ib458c2a2ded3c4d6c153b6bedd29c48ef12cc538 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231125 Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/main@{#34908}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
d3bf4d4142
commit
cd4ab49ee7
@ -145,7 +145,10 @@ void Vp9ReadQp(BitstreamReader& br, Vp9UncompressedHeader* frame_info) {
|
||||
frame_info->is_lossless = frame_info->base_qp == 0;
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
if (br.Read<bool>()) { // if delta_coded
|
||||
if (br.ReadBits(4) != 0) {
|
||||
// delta_q is a signed integer with leading 4 bits containing absolute
|
||||
// value and last bit containing sign. There are are two ways to represent
|
||||
// zero with such encoding.
|
||||
if ((br.ReadBits(5) & 0b1111'0) != 0) { // delta_q
|
||||
frame_info->is_lossless = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user