Skip to content
Snippets Groups Projects
Commit 9c001590 authored by Liqiang Wang's avatar Liqiang Wang
Browse files

A small bugfix of common inference API to harmonize with JVET-AA0088

parent 35a020b8
No related branches found
No related tags found
No related merge requests found
...@@ -132,7 +132,7 @@ public: ...@@ -132,7 +132,7 @@ public:
#endif #endif
} }
template<typename T> template<typename T>
static void prepareInputs (Picture* pic, UnitArea inferArea, vector<sadl::Tensor<T>> &inputs, int globalQp, int localQp, bool inter, std::vector<InputData> listInputData) static void prepareInputs (Picture* pic, UnitArea inferArea, vector<sadl::Tensor<T>> &inputs, int globalQp, int localQp, int sliceType, std::vector<InputData> listInputData)
{ {
for (auto &inputData : listInputData) for (auto &inputData : listInputData)
{ {
...@@ -157,7 +157,7 @@ public: ...@@ -157,7 +157,7 @@ public:
fillInputFromConstant<T>(pic, inferArea, inputs[inputData.index], localQp, inputData.luma, inputData.scale, inputData.shift); fillInputFromConstant<T>(pic, inferArea, inputs[inputData.index], localQp, inputData.luma, inputData.scale, inputData.shift);
break; break;
case NN_INPUT_SLICE_TYPE: case NN_INPUT_SLICE_TYPE:
fillInputFromConstant<T>(pic, inferArea, inputs[inputData.index], inter ? 1 : 0, inputData.luma, inputData.scale, inputData.shift); fillInputFromConstant<T>(pic, inferArea, inputs[inputData.index], sliceType, inputData.luma, inputData.scale, inputData.shift);
break; break;
default: default:
THROW("invalid input data"); THROW("invalid input data");
...@@ -170,7 +170,7 @@ public: ...@@ -170,7 +170,7 @@ public:
{ {
if (!model.apply(inputs)) if (!model.apply(inputs))
{ {
cerr << "[ERROR] issue during luma model inference" << endl; cerr << "[ERROR] issue during inference" << endl;
exit(-1); exit(-1);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment