| 402 | } |
| 403 | |
| 404 | void HRD::removeFromBufferAndCheck(const HRDFrameToRemove &frame, |
| 405 | int poc, |
| 406 | time_t removalTime, |
| 407 | HRDPlotModel * plotModel) |
| 408 | { |
| 409 | (void)poc; |
| 410 | |
| 411 | // Remove the frame from the buffer |
| 412 | auto bufferSub = frame.bits; |
| 413 | const auto bufferOld = this->decodingBufferLevel; |
| 414 | this->decodingBufferLevel -= bufferSub; |
| 415 | { |
| 416 | HRDPlotModel::HRDEntry entry; |
| 417 | entry.type = HRDPlotModel::HRDEntry::EntryType::Removal; |
| 418 | entry.cbp_fullness_start = bufferOld; |
| 419 | entry.cbp_fullness_end = this->decodingBufferLevel; |
| 420 | entry.time_offset_start = removalTime; |
| 421 | entry.time_offset_end = removalTime; |
| 422 | entry.poc = frame.poc; |
| 423 | plotModel->addHRDEntry(entry); |
| 424 | } |
| 425 | if (this->decodingBufferLevel < 0) |
| 426 | { |
| 427 | // The buffer did underflow; i.e. we need to decode a pictures |
| 428 | // at the time but there is not enough data in the buffer to do so (to take the AU |
| 429 | // out of the buffer). |
| 430 | DEBUG_AVC_HRD("HRD AU " << this->au_n << " POC " << poc << " - Warning: Time " |
| 431 | << double(frame.t_r) << " Decoding Buffer underflow by " |
| 432 | << this->decodingBufferLevel << "bits"); |
| 433 | } |
| 434 | } |
| 435 | |
| 436 | void HRD::addConstantBufferLine(int poc, time_t t_begin, time_t t_end, HRDPlotModel *plotModel) |
| 437 | { |
no test coverage detected