Fix previousNumDeltaPocs in skipShortTermRefPicSets

This commit is contained in:
peng bin 2023-04-13 15:08:00 +08:00 committed by Ian Baker
parent b08120d752
commit a65b5a5c2b

View file

@ -435,11 +435,15 @@ public final class H265Reader implements ElementaryStreamReader {
if (interRefPicSetPredictionFlag) { if (interRefPicSetPredictionFlag) {
bitArray.skipBit(); // delta_rps_sign bitArray.skipBit(); // delta_rps_sign
bitArray.readUnsignedExpGolombCodedInt(); // abs_delta_rps_minus1 bitArray.readUnsignedExpGolombCodedInt(); // abs_delta_rps_minus1
int numDeltaPocs = 0;
for (int j = 0; j <= previousNumDeltaPocs; j++) { for (int j = 0; j <= previousNumDeltaPocs; j++) {
if (!bitArray.readBit()) { // used_by_curr_pic_flag[j] if (!bitArray.readBit()) { // used_by_curr_pic_flag[j]
bitArray.skipBit(); // use_delta_flag[j] if(!bitArray.readBit()) // use_delta_flag[j]
continue; // if not use_delta_flag, skip increase numDeltaPocs
} }
numDeltaPocs++;
} }
previousNumDeltaPocs = numDeltaPocs;
} else { } else {
numNegativePics = bitArray.readUnsignedExpGolombCodedInt(); numNegativePics = bitArray.readUnsignedExpGolombCodedInt();
numPositivePics = bitArray.readUnsignedExpGolombCodedInt(); numPositivePics = bitArray.readUnsignedExpGolombCodedInt();