byte[] bDstData = scrByte && channels >= lkbBands ? bSrcData : new byte[width * height * lkbBands];
if (scrByte && bSrcData != null) {
lookup(bSrcData, bDstData, tblOffsets, bTblData);
} else if (srcDataType == DataBuffer.TYPE_USHORT && sSrcData != null && bDstData != null) {
lookupU(sSrcData, bDstData, tblOffsets, bTblData);
} else if (srcDataType == DataBuffer.TYPE_SHORT && sSrcData != null && bDstData != null) {
lookup(sSrcData, bDstData, tblOffsets, bTblData);
} else {
throw new IllegalArgumentException("Not supported LUT conversion from source dataType " + srcDataType);
short[] sDstData = !scrByte && channels >= lkbBands ? sSrcData : new short[width * height * lkbBands];
if (scrByte) {
lookup(bSrcData, sDstData, tblOffsets, sTblData);
} else if (srcDataType == DataBuffer.TYPE_USHORT) {
lookupU(sSrcData, sDstData, tblOffsets, sTblData);
} else if (srcDataType == DataBuffer.TYPE_SHORT) {
lookup(sSrcData, sDstData, tblOffsets, sTblData);
} else {
throw new IllegalArgumentException("Not supported LUT conversion from source dataType " + srcDataType);