HEVC bit depth increasment
/// encoder configuration class
class TAppEncCfg
{
// coding tools (bit-depth)
UInt m_uiInputBitDepth; ///< bit-depth of input file
UInt m_uiOutputBitDepth; ///< bit-depth of output file
UInt m_uiInternalBitDepth; ///< Internal bit-depth (BitDepth+BitIncrement)
}
bool TVideoIOYuv::read ( TComPicYuv* pPicYuv, Int aiPad[2] ) Read one Y'CbCr frame 中,通过scalePlane函数将读入的像素值左移 BitIncrement 位转换到 InternalBitDepth。
在重建及解码时则调用bool TVideoIOYuv::write( TComPicYuv* pPicYuv, Int aiPad[2] )函数,No bit-depth conversion is performed,pcPicYuv is assumed to be at TVideoIO::m_fileBitdepth depth。m_fileBitdepth 由OutputBitDepth指定。InternalBitDepth 与 OutputBitDepth不一样时也会掉用scalePlane 转换(右移BitIncrement )。
解码时,cfg文件中-d指定重建的depth,写出时再将InternalBitDepth转为OutputBitDepth.
编码时,默认的cfg文件中,没有指定OutputBitDepth的值,OutputBitDepth默认与InternalBitDepth相同,需要自己加上以指定重建图像的bitdepth.