From 67f294a48aae0531797f6aef74d94b2f806dfab9 Mon Sep 17 00:00:00 2001 From: "mikhal@webrtc.org" Date: Wed, 28 Dec 2011 23:28:45 +0000 Subject: [PATCH] Adding a return value to ConvertRotationMode Review URL: http://webrtc-codereview.appspot.com/333023 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1304 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/common_video/libyuv/libyuv.cc | 34 ++++++------------------------- 1 file changed, 6 insertions(+), 28 deletions(-) diff --git a/src/common_video/libyuv/libyuv.cc b/src/common_video/libyuv/libyuv.cc index 251a52dd1..7f94b2d6f 100644 --- a/src/common_video/libyuv/libyuv.cc +++ b/src/common_video/libyuv/libyuv.cc @@ -617,71 +617,49 @@ libyuv::RotationMode ConvertRotationMode(VideoRotationMode rotation) { switch(rotation) { case kRotateNone: return libyuv::kRotate0; - break; case kRotate90: return libyuv::kRotate90; - break; case kRotate180: return libyuv::kRotate180; - break; case kRotate270: return libyuv::kRotate270; - break; + default: + assert(false); + return libyuv::kRotate0; } - assert(false); } int ConvertVideoType(VideoType video_type) { switch(video_type) { case kUnknown: return libyuv::FOURCC_ANY; - break; case kI420: return libyuv::FOURCC_I420; - break; case kIYUV: // same as KYV12 case kYV12: return libyuv::FOURCC_YV12; - break; case kRGB24: return libyuv::FOURCC_24BG; - break; case kABGR: return libyuv::FOURCC_ABGR; - break; - case kARGB4444: - case kRGB565: - case kARGB1555: - case kARGBMac: - case kRGBAMac: - // TODO(mikhal): Not supported; - assert(false); - return libyuv::FOURCC_ANY; - break; case kYUY2: return libyuv::FOURCC_YUY2; - break; case kUYVY: return libyuv::FOURCC_UYVY; - break; case kMJPG: return libyuv::FOURCC_MJPG; - break; case kNV21: return libyuv::FOURCC_NV21; - break; case kNV12: return libyuv::FOURCC_NV12; - break; case kARGB: return libyuv::FOURCC_ARGB; - break; case kBGRA: return libyuv::FOURCC_BGRA; - break; + default: + assert(false); + return libyuv::FOURCC_ANY; } - // default value - return libyuv::FOURCC_ANY; } int ConvertToI420(VideoType src_video_type,