MCPcopy Create free account
hub / github.com/IENT/YUView / parse

Method parse

YUViewLib/src/parser/HEVC/scaling_list_data.cpp:42–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40using namespace reader;
41
42void scaling_list_data::parse(SubByteReaderLogging &reader)
43{
44 SubByteReaderLoggingSubLevel subLevel(reader, "scaling_list_data()");
45
46 for(unsigned sizeId=0; sizeId<4; sizeId++)
47 {
48 for(unsigned matrixId=0; matrixId<6u; matrixId += (sizeId == 3) ? 3 : 1)
49 {
50
51 this->scaling_list_pred_mode_flag[sizeId][matrixId] = reader.readFlag(formatArray("scaling_list_pred_mode_flag", sizeId, matrixId));
52 if (!this->scaling_list_pred_mode_flag[sizeId][matrixId])
53 {
54 this->scaling_list_pred_matrix_id_delta[sizeId][matrixId] = reader.readUEV(formatArray("scaling_list_pred_matrix_id_delta", sizeId, matrixId));
55 }
56 else
57 {
58 int nextCoef = 8;
59 auto coefNum = std::min(64u, (1u << (4u + (sizeId << 1u))));
60 if(sizeId > 1)
61 {
62 this->scaling_list_dc_coef_minus8[sizeId-2][matrixId] = reader.readSEV(formatArray("scaling_list_dc_coef_minus8", sizeId-2, matrixId));
63 nextCoef = this->scaling_list_dc_coef_minus8[sizeId-2][matrixId] + 8;
64 }
65 for (unsigned i=0; i<coefNum; i++)
66 {
67 auto scaling_list_delta_coef = reader.readSEV("scaling_list_delta_coef");
68 nextCoef = (nextCoef + scaling_list_delta_coef + 256) % 256;
69 auto scalingListVal = nextCoef;
70 reader.logCalculatedValue(formatArray("scalingListVal", sizeId, matrixId, i), scalingListVal);
71 }
72 }
73 }
74 }
75}
76
77} // namespace parser::hevc

Callers

nothing calls this directly

Calls 5

formatArrayFunction · 0.85
readFlagMethod · 0.80
readUEVMethod · 0.80
readSEVMethod · 0.80
logCalculatedValueMethod · 0.80

Tested by

no test coverage detected