| 592 | } |
| 593 | |
| 594 | void seq_parameter_set_rbsp::setDefaultSubpicValues(unsigned numSubPic) |
| 595 | { |
| 596 | for (unsigned i = 0; i <= numSubPic; i++) |
| 597 | { |
| 598 | // If not present, create default values |
| 599 | auto tmpWidthVal = |
| 600 | (this->sps_pic_width_max_in_luma_samples + this->CtbSizeY - 1) / this->CtbSizeY; |
| 601 | auto tmpHeightVal = |
| 602 | (this->sps_pic_height_max_in_luma_samples + this->CtbSizeY - 1) / this->CtbSizeY; |
| 603 | if (!this->sps_subpic_same_size_flag || i == 0) |
| 604 | { |
| 605 | this->sps_subpic_ctu_top_left_x.push_back(0); |
| 606 | this->sps_subpic_ctu_top_left_y.push_back(0); |
| 607 | this->sps_subpic_width_minus1.push_back(tmpWidthVal - this->sps_subpic_ctu_top_left_x[i] - 1); |
| 608 | this->sps_subpic_height_minus1.push_back(tmpHeightVal - this->sps_subpic_ctu_top_left_y[i] - |
| 609 | 1); |
| 610 | } |
| 611 | else |
| 612 | { |
| 613 | auto numSubpicCols = tmpWidthVal / (this->sps_subpic_width_minus1[0] + 1); // (37) |
| 614 | this->sps_subpic_ctu_top_left_x.push_back((i % numSubpicCols) * |
| 615 | (this->sps_subpic_width_minus1[0] + 1)); |
| 616 | this->sps_subpic_ctu_top_left_y.push_back((i / numSubpicCols) * |
| 617 | (this->sps_subpic_height_minus1[0] + 1)); |
| 618 | this->sps_subpic_width_minus1.push_back(this->sps_subpic_width_minus1[0]); |
| 619 | this->sps_subpic_height_minus1.push_back(sps_subpic_height_minus1[0]); |
| 620 | } |
| 621 | } |
| 622 | } |
| 623 | |
| 624 | } // namespace parser::vvc |