diff -u GSdx-4529/GSCapture.cpp GSdx/GSCapture.cpp --- GSdx-4529/GSCapture.cpp 2011-04-04 17:19:35 -0600 +++ GSdx/GSCapture.cpp 2011-04-04 18:20:32 -0600 @@ -64,7 +64,7 @@ vector m_mts; public: - GSSourceOutputPin(const GSVector2i& size, REFERENCE_TIME atpf, CBaseFilter* pFilter, CCritSec* pLock, HRESULT& hr) + GSSourceOutputPin(const GSVector2i& size, REFERENCE_TIME atpf, CBaseFilter* pFilter, CCritSec* pLock, HRESULT& hr, int m_colorspace) : CBaseOutputPin("GSSourceOutputPin", pFilter, pLock, &hr, L"Output") , m_size(size) { @@ -79,8 +79,24 @@ vih.bmiHeader.biWidth = m_size.x; vih.bmiHeader.biHeight = m_size.y; - // YUY2 + // RGB32 (priority) + if ( m_colorspace == 1 ) + { + mt.subtype = MEDIASUBTYPE_RGB32; + mt.lSampleSize = m_size.x * m_size.y * 4; + vih.bmiHeader.biCompression = BI_RGB; + vih.bmiHeader.biPlanes = 1; + vih.bmiHeader.biBitCount = 32; + vih.bmiHeader.biSizeImage = m_size.x * m_size.y * 4; + mt.SetFormat((uint8*)&vih, sizeof(vih)); + + m_mts.push_back(mt); + } + + // YUY2 + else + { mt.subtype = MEDIASUBTYPE_YUY2; mt.lSampleSize = m_size.x * m_size.y * 2; @@ -91,6 +107,7 @@ mt.SetFormat((uint8*)&vih, sizeof(vih)); m_mts.push_back(mt); + } // RGB32 @@ -172,14 +189,14 @@ public: - GSSource(int w, int h, int fps, IUnknown* pUnk, HRESULT& hr) + GSSource(int w, int h, int fps, IUnknown* pUnk, HRESULT& hr, int m_colorspace) : CBaseFilter(NAME("GSSource"), pUnk, this, __uuidof(this), &hr) , m_output(NULL) , m_size(w, h) , m_atpf(10000000i64 / fps) , m_now(0) { - m_output = new GSSourceOutputPin(m_size, m_atpf, this, this, hr); + m_output = new GSSourceOutputPin(m_size, m_atpf, this, this, hr, m_colorspace); // FIXME if(fps == 60) m_atpf = 166834; // = 10000000i64 / 59.94 @@ -403,6 +420,8 @@ m_size.x = (dlg.m_width + 7) & ~7; m_size.y = (dlg.m_height + 7) & ~7; + m_colorspace = dlg.m_colorspace; + wstring fn(dlg.m_filename.begin(), dlg.m_filename.end()); // @@ -420,7 +439,7 @@ return false; } - m_src = new GSSource(m_size.x, m_size.y, fps, NULL, hr); + m_src = new GSSource(m_size.x, m_size.y, fps, NULL, hr, m_colorspace); if (dlg.m_enc==0) { diff -u GSdx-4529/GSCapture.h GSdx/GSCapture.h --- GSdx-4529/GSCapture.h 2011-04-04 17:19:35 -0600 +++ GSdx/GSCapture.h 2011-04-04 18:23:40 -0600 @@ -33,6 +33,8 @@ bool m_capturing; GSVector2i m_size; + int m_colorspace; + #ifdef _WINDOWS CComPtr m_graph; diff -u GSdx-4529/GSCaptureDlg.cpp GSdx/GSCaptureDlg.cpp --- GSdx-4529/GSCaptureDlg.cpp 2011-04-04 17:19:35 -0600 +++ GSdx/GSCaptureDlg.cpp 2011-04-04 18:34:01 -0600 @@ -68,6 +68,9 @@ ComboBoxAppend(IDC_CODECS, "Uncompressed", 0, true); + ComboBoxAppend(IDC_COLORSPACE, "YUY2", 0, true); + ComboBoxAppend(IDC_COLORSPACE, "RGB32", 1, false); + CoInitialize(0); // this is obviously wrong here, each thread should call this on start, and where is CoUninitalize? BeginEnumSysDev(CLSID_VideoCompressorCategory, moniker) @@ -178,6 +181,7 @@ m_width = GetTextAsInt(IDC_WIDTH); m_height = GetTextAsInt(IDC_HEIGHT); m_filename = GetText(IDC_FILENAME); + ComboBoxGetSelData(IDC_COLORSPACE, (INT_PTR)m_colorspace); Codec c; diff -u GSdx-4529/GSCaptureDlg.h GSdx/GSCaptureDlg.h --- GSdx-4529/GSCaptureDlg.h 2011-04-04 17:19:35 -0600 +++ GSdx/GSCaptureDlg.h 2011-04-04 15:34:20 -0600 @@ -49,5 +49,6 @@ int m_width; int m_height; string m_filename; + int m_colorspace; CComPtr m_enc; }; diff -u GSdx-4529/GSdx.rc GSdx/GSdx.rc --- GSdx-4529/GSdx.rc 2011-04-04 17:19:35 -0600 +++ GSdx/GSdx.rc 2011-04-04 18:47:35 -0600 @@ -132,6 +132,7 @@ EDITTEXT IDC_HEIGHT,64,47,31,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER PUSHBUTTON "Cancel",IDCANCEL,169,47,50,14 DEFPUSHBUTTON "OK",IDOK,221,47,50,14 + COMBOBOX IDC_COLORSPACE,102,47,48,32,CBS_DROPDOWNLIST | WS_TABSTOP END IDD_GPUCONFIG DIALOGEX 0, 0, 189, 199 diff -u GSdx-4529/resource.h GSdx/resource.h --- GSdx-4529/resource.h 2011-04-04 17:19:35 -0600 +++ GSdx/resource.h 2011-04-04 18:47:44 -0600 @@ -74,6 +74,7 @@ #define IDC_USERHACKS 2047 #define IDC_SKIPDRAWHACKEDIT 2048 #define IDC_STATIC10 2049 +#define IDC_COLORSPACE 3000 #define IDR_CONVERT_FX 10000 #define IDR_TFX_FX 10001 #define IDR_MERGE_FX 10002