VTM-20.0 compatibility
Refactored to new strong-typed enums for channel type and chroma format in VTM-20.0.
Main changes:
-
CHROMA_420
->ChromaFormat::_420
(others accordingly) -
CHANNEL_TYPE_LUMA
->ChannelType::LUMA
(others accordingly) -
Void setOutputBitDepth(Int iOutputBitDepth[MAX_NUM_CHANNEL_TYPE]);
->Void setOutputBitDepth(const BitDepths &outputBitDepths);
(others accordingly)
Refactoring to strong-typed enum for channel type required type casting for indexing of several arrays, e.g., iInterp[CHANNEL_TYPE_LUMA]
became iInterp[Int(ChannelType::LUMA)]
. This leads to minimal changes to the internal data structure of 360lib.
An alternative with more changes to the internal data structure would be to use EnumArray
s for these arrays, e.g., EnumArray<Int, ChannelType> iInterp;
instead of Int iInterp[MAX_NUM_CHANNEL_TYPE];
. iInterp
could then again be directly addressed using the enum value -> iInterp[ChannelType::LUMA]
.
Let me know whether you are okay with the current way of type-casting for array indexing or whether EnumArray
s should be used instead. I could look into this.