[Sumover-dev] [svn commit] r4750 - vic/branches/mpeg4/video
sumover-dev at cs.ucl.ac.uk
sumover-dev at cs.ucl.ac.uk
Wed Mar 31 11:31:35 BST 2010
Author: douglask
Date: Wed Mar 31 11:31:35 2010
New Revision: 4750
Modified:
vic/branches/mpeg4/video/grabber-win32DS.cpp
Log:
Inconsistency in ordering of MediaSubTypes between SampleGrabber and Capture Filter.
Thanks to Andrew Rowley for spotting
Modified: vic/branches/mpeg4/video/grabber-win32DS.cpp
==============================================================================
--- vic/branches/mpeg4/video/grabber-win32DS.cpp (original)
+++ vic/branches/mpeg4/video/grabber-win32DS.cpp Wed Mar 31 11:31:35 2010
@@ -359,26 +359,22 @@
mt_.subtype = MEDIASUBTYPE_I420; // Planar YUV 420
} else if (have_RGB24_) {
mt_.subtype = MEDIASUBTYPE_RGB24; // RGB 24 bit
- } else if (have_DVSD_) {
- mt_.subtype = MEDIASUBTYPE_UYVY;
} else {
- mt_.subtype = MEDIASUBTYPE_RGB24;
+ mt_.subtype = MEDIASUBTYPE_UYVY;
}
} else {
- if (have_I420_) {
- mt_.subtype = MEDIASUBTYPE_I420; // Planar YUV 420
- } else if (have_HDYC_) {
+ if (have_HDYC_) {
mt_.subtype = MEDIASUBTYPE_HDYC; // Blackmagic Packed YUV 422
+ } else if (have_I420_) {
+ mt_.subtype = MEDIASUBTYPE_I420; // Planar YUV 420
} else if (have_YUY2_) {
mt_.subtype = MEDIASUBTYPE_YUY2; // Packed YUV 422
} else if (have_UYVY_) {
mt_.subtype = MEDIASUBTYPE_UYVY; // Packed YUV 422
} else if (have_RGB24_) {
mt_.subtype = MEDIASUBTYPE_RGB24; // RGB 24 bit
- } else if (have_DVSD_) {
- mt_.subtype = MEDIASUBTYPE_UYVY;
} else {
- mt_.subtype = MEDIASUBTYPE_RGB24;
+ mt_.subtype = MEDIASUBTYPE_UYVY;
}
}
@@ -747,25 +743,33 @@
switch (cformat_) {
case CF_420:
case CF_CIF:
- if (have_I420_)
+ if (have_HDYC_)
+ packedUYVY422_to_planarYUYV420((char *)frame_, outw_, outh_, (char *)last_frame_, inw_, inh_);
+ else if (have_I420_)
planarYUYV420_to_planarYUYV420((char *)frame_, outw_, outh_, (char *)last_frame_, inw_, inh_);
else if (have_YUY2_)
packedYUYV422_to_planarYUYV420((char *)frame_, outw_, outh_, (char *)last_frame_, inw_, inh_);
- else if (have_UYVY_ || have_HDYC_ || have_DVSD_)
+ else if (have_UYVY_)
packedUYVY422_to_planarYUYV420((char *)frame_, outw_, outh_, (char *)last_frame_, inw_, inh_);
- else // if (have_RGB24_)
+ else if (have_RGB24_)
converter_->convert((u_int8_t*)last_frame_, width_, height_, frame_, outw_, outh_, TRUE);
+ else
+ packedUYVY422_to_planarYUYV420((char *)frame_, outw_, outh_, (char *)last_frame_, inw_, inh_);
break;
case CF_422:
+ if (have_HDYC_)
+ packedUYVY422_to_planarYUYV422((char *)frame_, outw_, outh_, (char *)last_frame_, inw_, inh_);
if (have_YUY2_)
packedYUYV422_to_planarYUYV422((char *)frame_, outw_, outh_, (char *)last_frame_, inw_, inh_);
- else if (have_UYVY_ || have_HDYC_ || have_DVSD_)
+ else if (have_UYVY_)
packedUYVY422_to_planarYUYV422((char *)frame_, outw_, outh_, (char *)last_frame_, inw_, inh_);
else if (have_I420_)
planarYUYV420_to_planarYUYV422((char *)frame_, outw_, outh_, (char *)last_frame_, inw_, inh_);
- else // if (have_RGB24_)
+ else if (have_RGB24_)
converter_->convert((u_int8_t*)last_frame_, width_, height_, frame_, outw_, outh_, TRUE);
+ else
+ packedUYVY422_to_planarYUYV422((char *)frame_, outw_, outh_, (char *)last_frame_, inw_, inh_);
break;
}
@@ -869,7 +873,7 @@
min_height_ = scc.MinOutputSize.cy;
}
if (pmtConfig->subtype == MEDIASUBTYPE_I420) {
- have_I420_ = true; // Planar YUV 420
+ have_I420_ = true; // Planar YUV 420
} else if (pmtConfig->subtype == MEDIASUBTYPE_UYVY) {
have_UYVY_ = true; // Packed YUV 422
} else if (pmtConfig->subtype == MEDIASUBTYPE_YUY2) {
@@ -952,10 +956,10 @@
mediasubtype = MEDIASUBTYPE_HDYC; // Blackmagic Packed YUV 422
else if (have_I420_)
mediasubtype = MEDIASUBTYPE_I420; // Planar YUV 420
- else if (have_UYVY_)
- mediasubtype = MEDIASUBTYPE_UYVY; // Packed YUV 422
else if (have_YUY2_)
mediasubtype = MEDIASUBTYPE_YUY2; // Packed YUV 422
+ else if (have_UYVY_)
+ mediasubtype = MEDIASUBTYPE_UYVY; // Packed YUV 422
else if (have_RGB24_)
mediasubtype = MEDIASUBTYPE_RGB24; // RGB 24 bit
break;
@@ -963,12 +967,12 @@
case CF_422:
if (have_HDYC_)
mediasubtype = MEDIASUBTYPE_HDYC; // Blackmagic Packed YUV 422
- else if (have_I420_)
- mediasubtype = MEDIASUBTYPE_I420; // Planar YUV 420
- else if (have_UYVY_)
- mediasubtype = MEDIASUBTYPE_UYVY; // Packed YUV 422
else if (have_YUY2_)
mediasubtype = MEDIASUBTYPE_YUY2; // Packed YUV 422
+ else if (have_UYVY_)
+ mediasubtype = MEDIASUBTYPE_UYVY; // Packed YUV 422
+ else if (have_I420_)
+ mediasubtype = MEDIASUBTYPE_I420; // Planar YUV 420
else if (have_RGB24_)
mediasubtype = MEDIASUBTYPE_RGB24; // RGB 24 bit
break;
More information about the Sumover-dev
mailing list