Project import generated by Copybara.

GitOrigin-RevId: b137378673f7d66d41bcd46e4fc3a0d9ef254894
This commit is contained in:
MediaPipe Team
2019-10-25 14:29:15 -07:00
committed by jqtang
parent a2a63e3876
commit 259b48e082
94 changed files with 8564 additions and 398 deletions
@@ -279,6 +279,8 @@ int ImageFrame::NumberOfChannelsForFormat(ImageFormat::Format format) {
return 1;
case ImageFormat::LAB8:
return 3;
case ImageFormat::SBGRA:
return 4;
default:
LOG(FATAL) << InvalidFormatString(format);
}
@@ -304,6 +306,8 @@ int ImageFrame::ChannelSizeForFormat(ImageFormat::Format format) {
return sizeof(float);
case ImageFormat::LAB8:
return sizeof(uint8);
case ImageFormat::SBGRA:
return sizeof(uint8);
default:
LOG(FATAL) << InvalidFormatString(format);
}
@@ -329,6 +333,8 @@ int ImageFrame::ByteDepthForFormat(ImageFormat::Format format) {
return 4;
case ImageFormat::LAB8:
return 1;
case ImageFormat::SBGRA:
return 1;
default:
LOG(FATAL) << InvalidFormatString(format);
}