@@ -366,7 +366,7 @@ CPLErr GDALWarpNoDataMasker(void *pMaskFuncArg, int nBandCount,
366366
367367 switch (eType)
368368 {
369- case GDT_Byte :
369+ case GDT_UInt8 :
370370 return GDALWarpNoDataMaskerT (padfNoData, nPixels,
371371 *ppImageData, // Already a GByte *.
372372 panValidityMask, pbOutAllValid);
@@ -540,7 +540,7 @@ CPLErr GDALWarpSrcAlphaMasker(void *pMaskFuncArg, int /* nBandCount */,
540540 GDALDataType eDT = GDALGetRasterDataType (hAlphaBand);
541541 // Make sure that pafMask is at least 8-byte aligned, which should
542542 // normally be always the case if being a ptr returned by malloc().
543- if ((eDT == GDT_Byte || eDT == GDT_UInt16) && CPL_IS_ALIGNED (pafMask, 8 ))
543+ if ((eDT == GDT_UInt8 || eDT == GDT_UInt16) && CPL_IS_ALIGNED (pafMask, 8 ))
544544 {
545545 // Read data.
546546 eErr = GDALRasterIOEx (
@@ -554,7 +554,7 @@ CPLErr GDALWarpSrcAlphaMasker(void *pMaskFuncArg, int /* nBandCount */,
554554 // Make sure we have the correct alignment before doing SSE
555555 // On Linux x86_64, the alignment should be always correct due
556556 // the alignment of malloc() being 16 byte.
557- const GUInt32 mask = (eDT == GDT_Byte ) ? 0xff : 0xffff ;
557+ const GUInt32 mask = (eDT == GDT_UInt8 ) ? 0xff : 0xffff ;
558558 if (!CPL_IS_ALIGNED (pafMask, 16 ))
559559 {
560560 pafMask[iPixel] =
@@ -752,7 +752,7 @@ CPLErr GDALWarpSrcMaskMasker(void *pMaskFuncArg, int /* nBandCount */,
752752 /* Read the mask band. */
753753 /* -------------------------------------------------------------------- */
754754 CPLErr eErr = GDALRasterIO (hMaskBand, GF_Read, nXOff, nYOff, nXSize, nYSize,
755- pabySrcMask, nXSize, nYSize, GDT_Byte , 0 , 0 );
755+ pabySrcMask, nXSize, nYSize, GDT_UInt8 , 0 , 0 );
756756
757757 if (eErr != CE_None)
758758 {
@@ -840,7 +840,7 @@ CPLErr GDALWarpDstAlphaMasker(void *pMaskFuncArg, int nBandCount,
840840 const GDALDataType eDT = GDALGetRasterDataType (hAlphaBand);
841841 // Make sure that pafMask is at least 8-byte aligned, which should
842842 // normally be always the case if being a ptr returned by malloc().
843- if ((eDT == GDT_Byte || eDT == GDT_UInt16) &&
843+ if ((eDT == GDT_UInt8 || eDT == GDT_UInt16) &&
844844 CPL_IS_ALIGNED (pafMask, 8 ))
845845 {
846846 // Read data.
@@ -855,7 +855,7 @@ CPLErr GDALWarpDstAlphaMasker(void *pMaskFuncArg, int nBandCount,
855855 // Make sure we have the correct alignment before doing SSE
856856 // On Linux x86_64, the alignment should be always correct due
857857 // the alignment of malloc() being 16 byte.
858- const GUInt32 mask = (eDT == GDT_Byte ) ? 0xff : 0xffff ;
858+ const GUInt32 mask = (eDT == GDT_UInt8 ) ? 0xff : 0xffff ;
859859 if (!CPL_IS_ALIGNED (pafMask, 16 ))
860860 {
861861 pafMask[iPixel] =
@@ -958,7 +958,7 @@ CPLErr GDALWarpDstAlphaMasker(void *pMaskFuncArg, int nBandCount,
958958 const float cst_alpha_max =
959959 static_cast <float >(CPLAtof (CSLFetchNameValueDef (
960960 psWO->papszWarpOptions , " DST_ALPHA_MAX" , " 255" ))) +
961- ((eDT == GDT_Byte || eDT == GDT_Int16 || eDT == GDT_UInt16 ||
961+ ((eDT == GDT_UInt8 || eDT == GDT_Int16 || eDT == GDT_UInt16 ||
962962 eDT == GDT_Int32 || eDT == GDT_UInt32)
963963 ? 0 .1f
964964 : 0 .0f );
@@ -968,7 +968,7 @@ CPLErr GDALWarpDstAlphaMasker(void *pMaskFuncArg, int nBandCount,
968968#if (defined(__x86_64) || defined(_M_X64))
969969 // Make sure that pafMask is at least 8-byte aligned, which should
970970 // normally be always the case if being a ptr returned by malloc()
971- if ((eDT == GDT_Byte || eDT == GDT_Int16 || eDT == GDT_UInt16) &&
971+ if ((eDT == GDT_UInt8 || eDT == GDT_Int16 || eDT == GDT_UInt16) &&
972972 CPL_IS_ALIGNED (pafMask, 8 ))
973973 {
974974 // Make sure we have the correct alignment before doing SSE
@@ -1756,7 +1756,7 @@ void CPL_STDCALL GDALWarpResolveWorkingDataType(GDALWarpOptions *psOptions)
17561756 return ;
17571757 }
17581758
1759- psOptions->eWorkingDataType = GDT_Byte ;
1759+ psOptions->eWorkingDataType = GDT_UInt8 ;
17601760
17611761 // If none of the provided input nodata values can be represented in the
17621762 // data type of the corresponding source band, ignore them.
0 commit comments