Adding BGRA as a video type.

This CL is a prerequisite for the capture module update CL. 
Review URL: http://webrtc-codereview.appspot.com/329021

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1317 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
mikhal@webrtc.org 2012-01-03 18:49:15 +00:00
parent 877c54e230
commit c00f91d62d
2 changed files with 6 additions and 0 deletions

View File

@ -433,6 +433,7 @@ enum RawVideoType
kVideoMJPEG = 10,
kVideoNV12 = 11,
kVideoNV21 = 12,
kVideoBGRA = 13,
kVideoUnknown = 99
};

View File

@ -47,6 +47,8 @@ VideoType RawVideoTypeToCommonVideoVideoType(RawVideoType type) {
return kNV21;
case kVideoNV12:
return kNV12;
case kVideoBGRA:
return kBGRA;
default:
assert(false);
}
@ -73,6 +75,7 @@ int CalcBufferSize(VideoType type, int width, int height) {
case kRGB24:
bits_per_pixel = 24;
break;
case kBGRA:
case kARGB:
bits_per_pixel = 32;
break;
@ -105,6 +108,7 @@ int CalcBufferSize(VideoType src_video_type,
case kRGB24:
src_bits_per_pixel = 24;
break;
case kBGRA:
case kARGB:
src_bits_per_pixel = 32;
break;
@ -130,6 +134,7 @@ int CalcBufferSize(VideoType src_video_type,
case kRGB24:
dst_bits_per_pixel = 24;
break;
case kBGRA:
case kARGB:
dst_bits_per_pixel = 32;
break;