Fix H.265 bitstream parser incorrect PPS reference.
H.265 bitstream parser currently always assume pps id to be 0 when calculating the last slice QP. This assumption is incorrect. Bug: webrtc:13485 Change-Id: I06918df035e8e4a8e68eb3002a49b824ffd5f516 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337080 Commit-Queue: Jianlin Qiu <jianlin.qiu@intel.com> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#41636}
This commit is contained in:
parent
056782c4b5
commit
cc83e32cdb
@ -531,8 +531,7 @@ absl::optional<int> H265BitstreamParser::GetLastSliceQp() const {
|
||||
if (!last_slice_qp_delta_ || !last_slice_pps_id_) {
|
||||
return absl::nullopt;
|
||||
}
|
||||
uint32_t pps_id = 0;
|
||||
const H265PpsParser::PpsState* pps = GetPPS(pps_id);
|
||||
const H265PpsParser::PpsState* pps = GetPPS(last_slice_pps_id_.value());
|
||||
if (!pps)
|
||||
return absl::nullopt;
|
||||
const int parsed_qp = 26 + pps->init_qp_minus26 + *last_slice_qp_delta_;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user