Remove wrong range check for CurrRpsIdx and fix its naming.
CurrRpsIdx value is specified in spec section 7.4.7.1. CurrRpsIdx can be non-zero and the check here makes no sense. Bug: webrtc:13485 Change-Id: Ie7b7fab3286fdb812fca7aaf6f68bb5a8df81386 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347764 Reviewed-by: Sergey Silkin <ssilkin@webrtc.org> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#42122}
This commit is contained in:
parent
ec2fda9daa
commit
d9c1b335b7
@ -276,18 +276,16 @@ H265BitstreamParser::Result H265BitstreamParser::ParseNonParameterSetNalu(
|
||||
}
|
||||
|
||||
uint32_t num_pic_total_curr = 0;
|
||||
uint32_t curr_sps_idx = 0;
|
||||
uint32_t curr_rps_idx = 0;
|
||||
if (short_term_ref_pic_set_sps_flag) {
|
||||
curr_sps_idx = short_term_ref_pic_set_idx;
|
||||
curr_rps_idx = short_term_ref_pic_set_idx;
|
||||
} else {
|
||||
curr_sps_idx = sps->num_short_term_ref_pic_sets;
|
||||
}
|
||||
if (sps->short_term_ref_pic_set.size() <= curr_sps_idx) {
|
||||
TRUE_OR_RETURN(!(curr_sps_idx != 0 || short_term_ref_pic_set_sps_flag));
|
||||
curr_rps_idx = sps->num_short_term_ref_pic_sets;
|
||||
}
|
||||
|
||||
const H265SpsParser::ShortTermRefPicSet* ref_pic_set;
|
||||
if (curr_sps_idx < sps->short_term_ref_pic_set.size()) {
|
||||
ref_pic_set = &(sps->short_term_ref_pic_set[curr_sps_idx]);
|
||||
if (curr_rps_idx < sps->short_term_ref_pic_set.size()) {
|
||||
ref_pic_set = &(sps->short_term_ref_pic_set[curr_rps_idx]);
|
||||
} else {
|
||||
ref_pic_set = &short_term_ref_pic_set;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user