webrtc_libyuv: Add support for more video types for consistency
Bug: webrtc:14830
Change-Id: I0998fb04a03745131f9f5cca878b0cdb46f3b62b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291529
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39940}
diff --git a/common_video/libyuv/include/webrtc_libyuv.h b/common_video/libyuv/include/webrtc_libyuv.h
index 08a035a..68831c7 100644
--- a/common_video/libyuv/include/webrtc_libyuv.h
+++ b/common_video/libyuv/include/webrtc_libyuv.h
@@ -32,7 +32,9 @@
kI420,
kIYUV,
kRGB24,
+ kBGR24,
kARGB,
+ kABGR,
kRGB565,
kYUY2,
kYV12,
diff --git a/common_video/libyuv/webrtc_libyuv.cc b/common_video/libyuv/webrtc_libyuv.cc
index 4632250..31ba1fe 100644
--- a/common_video/libyuv/webrtc_libyuv.cc
+++ b/common_video/libyuv/webrtc_libyuv.cc
@@ -36,9 +36,11 @@
case VideoType::kUYVY:
return width * height * 2;
case VideoType::kRGB24:
+ case VideoType::kBGR24:
return width * height * 3;
case VideoType::kBGRA:
case VideoType::kARGB:
+ case VideoType::kABGR:
return width * height * 4;
case VideoType::kMJPEG:
case VideoType::kUnknown:
@@ -90,6 +92,10 @@
return libyuv::FOURCC_YV12;
case VideoType::kRGB24:
return libyuv::FOURCC_24BG;
+ case VideoType::kBGR24:
+ return libyuv::FOURCC_RAW;
+ case VideoType::kABGR:
+ return libyuv::FOURCC_ABGR;
case VideoType::kRGB565:
return libyuv::FOURCC_RGBP;
case VideoType::kYUY2: