| 41 | using namespace parser::reader; |
| 42 | |
| 43 | void lmcs_data::parse(SubByteReaderLogging &reader, adaptation_parameter_set_rbsp *aps) |
| 44 | { |
| 45 | SubByteReaderLoggingSubLevel subLevel(reader, "lmcs_data"); |
| 46 | |
| 47 | this->lmcs_min_bin_idx = reader.readUEV("lmcs_min_bin_idx", Options().withCheckRange({0, 15})); |
| 48 | this->lmcs_delta_max_bin_idx = |
| 49 | reader.readUEV("lmcs_delta_max_bin_idx", Options().withCheckRange({0, 15})); |
| 50 | this->LmcsMaxBinIdx = 15 - lmcs_delta_max_bin_idx; |
| 51 | this->lmcs_delta_cw_prec_minus1 = |
| 52 | reader.readUEV("lmcs_delta_cw_prec_minus1", Options().withCheckRange({0, 14})); |
| 53 | for (unsigned i = lmcs_min_bin_idx; i <= this->LmcsMaxBinIdx; i++) |
| 54 | { |
| 55 | auto nrBits = this->lmcs_delta_cw_prec_minus1 + 1; |
| 56 | this->lmcs_delta_abs_cw[i] = reader.readBits(formatArray("lmcs_delta_abs_cw", i), nrBits); |
| 57 | if (this->lmcs_delta_abs_cw[i] > 0) |
| 58 | { |
| 59 | this->lmcs_delta_sign_cw_flag[i] = reader.readFlag(formatArray("lmcs_delta_sign_cw_flag", i)); |
| 60 | } |
| 61 | } |
| 62 | if (aps->aps_chroma_present_flag) |
| 63 | { |
| 64 | this->lmcs_delta_abs_crs = reader.readBits("lmcs_delta_abs_crs", 3); |
| 65 | if (this->lmcs_delta_abs_crs > 0) |
| 66 | { |
| 67 | this->lmcs_delta_sign_crs_flag = reader.readFlag("lmcs_delta_sign_crs_flag"); |
| 68 | } |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | } // namespace parser::vvc |
nothing calls this directly
no test coverage detected