Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUnderground78 <underground78@users.sourceforge.net>2015-06-01 00:15:05 +0300
committerUnderground78 <underground78@users.sourceforge.net>2015-06-01 00:15:05 +0300
commit846eff07c13899dd7d3bf38251886b5263d41213 (patch)
tree9451569d7d9f03251eb2e385040af74d4a508ab2 /src/filters/transform
parent6fcba1bead7608fb480ab943ab9689bc66f4e009 (diff)
parente3f50f602e94794e29a17407e46b64b1ebb32232 (diff)
Merge branch 'release-1.7.9'1.7.9
Diffstat (limited to 'src/filters/transform')
-rw-r--r--src/filters/transform/BaseVideoFilter/BaseVideoFilter.cpp5
-rw-r--r--src/filters/transform/VSFilter/Copy.cpp6
-rw-r--r--src/filters/transform/VSFilter/DirectVobSub.cpp10
-rw-r--r--src/filters/transform/VSFilter/DirectVobSubFilter.cpp45
-rw-r--r--src/filters/transform/VSFilter/StyleEditorDialog.cpp5
-rwxr-xr-xsrc/filters/transform/VSFilter/installer/build_installer.bat45
6 files changed, 44 insertions, 72 deletions
diff --git a/src/filters/transform/BaseVideoFilter/BaseVideoFilter.cpp b/src/filters/transform/BaseVideoFilter/BaseVideoFilter.cpp
index 1cdedbb20..0c20030da 100644
--- a/src/filters/transform/BaseVideoFilter/BaseVideoFilter.cpp
+++ b/src/filters/transform/BaseVideoFilter/BaseVideoFilter.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -27,6 +27,9 @@
#include <InitGuid.h>
#include "moreuuids.h"
+// Even if we don't use this, it is needed for mvrInterfaces.h
+typedef interface IDirect3DDevice9* LPDIRECT3DDEVICE9;
+#include <mvrInterfaces.h>
//
// CBaseVideoFilter
diff --git a/src/filters/transform/VSFilter/Copy.cpp b/src/filters/transform/VSFilter/Copy.cpp
index 3d9293b0e..b6c65e0d8 100644
--- a/src/filters/transform/VSFilter/Copy.cpp
+++ b/src/filters/transform/VSFilter/Copy.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -44,7 +44,7 @@ void BltLineRGB32(DWORD* d, BYTE* sub, int w, const GUID& subtype)
for (; db < dbtend; sub += 4, db++) {
if (sub[3] < 0xff) {
int y = (c2y_yb[sub[0]] + c2y_yg[sub[1]] + c2y_yr[sub[2]] + 0x108000) >> 16;
- *db = y; // w/o colors
+ *db = BYTE(y); // w/o colors
}
}
} else if (subtype == MEDIASUBTYPE_YUY2) {
@@ -54,7 +54,7 @@ void BltLineRGB32(DWORD* d, BYTE* sub, int w, const GUID& subtype)
for (; ds < dstend; sub += 4, ds++) {
if (sub[3] < 0xff) {
int y = (c2y_yb[sub[0]] + c2y_yg[sub[1]] + c2y_yr[sub[2]] + 0x108000) >> 16;
- *ds = 0x8000 | y; // w/o colors
+ *ds = WORD(0x8000 | y); // w/o colors
}
}
} else if (subtype == MEDIASUBTYPE_RGB555) {
diff --git a/src/filters/transform/VSFilter/DirectVobSub.cpp b/src/filters/transform/VSFilter/DirectVobSub.cpp
index e9fb9ead8..f8cdc9b1c 100644
--- a/src/filters/transform/VSFilter/DirectVobSub.cpp
+++ b/src/filters/transform/VSFilter/DirectVobSub.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -300,12 +300,12 @@ STDMETHODIMP CDirectVobSub::get_TextSettings(void* lf, int lflen, COLORREF* colo
return E_INVALIDARG;
}
- ((LOGFONT*)lf)->lfCharSet = m_defStyle.charSet;
- ((LOGFONT*)lf)->lfItalic = m_defStyle.fItalic;
+ ((LOGFONT*)lf)->lfCharSet = (BYTE)m_defStyle.charSet;
+ ((LOGFONT*)lf)->lfItalic = (BYTE)m_defStyle.fItalic;
((LOGFONT*)lf)->lfHeight = (LONG)m_defStyle.fontSize;
((LOGFONT*)lf)->lfWeight = m_defStyle.fontWeight;
- ((LOGFONT*)lf)->lfStrikeOut = m_defStyle.fStrikeOut;
- ((LOGFONT*)lf)->lfUnderline = m_defStyle.fUnderline;
+ ((LOGFONT*)lf)->lfStrikeOut = (BYTE)m_defStyle.fStrikeOut;
+ ((LOGFONT*)lf)->lfUnderline = (BYTE)m_defStyle.fUnderline;
}
if (color) {
diff --git a/src/filters/transform/VSFilter/DirectVobSubFilter.cpp b/src/filters/transform/VSFilter/DirectVobSubFilter.cpp
index db2d287ac..beefbdeac 100644
--- a/src/filters/transform/VSFilter/DirectVobSubFilter.cpp
+++ b/src/filters/transform/VSFilter/DirectVobSubFilter.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -1622,31 +1622,30 @@ void CDirectVobSubFilter::SetSubtitle(ISubStream* pSubStream)
pRTS->SetAlignment(m_fOverridePlacement, m_PlacementXperc, m_PlacementYperc);
pRTS->Deinit();
- } else if (clsid == __uuidof(CRLECodedSubtitle)) {
- CRLECodedSubtitle* pRHS = (CRLECodedSubtitle*)pSubStream;
-
- DXVA2_ExtendedFormat extFormat;
- extFormat.value = m_cf;
- CString yuvMatrix = (extFormat.NominalRange == DXVA2_NominalRange_Normal) ? _T("PC.") : _T("TV.");
+ }
- switch (extFormat.VideoTransferMatrix) {
- case DXVA2_VideoTransferMatrix_BT601:
- yuvMatrix.Append(_T("601"));
- break;
- case DXVA2_VideoTransferMatrix_BT709:
- yuvMatrix.Append(_T("709"));
- break;
- case DXVA2_VideoTransferMatrix_SMPTE240M:
- yuvMatrix.Append(_T("240M"));
- break;
- default:
- yuvMatrix = _T("None");
- break;
- }
+ DXVA2_ExtendedFormat extFormat;
+ extFormat.value = m_cf;
+ CString yuvMatrix = (extFormat.NominalRange == DXVA2_NominalRange_Normal) ? _T("PC.") : _T("TV.");
- // Actually VSFilter expect full range (A)RGB frames to work with.
- pRHS->SetSourceTargetInfo(yuvMatrix, 0, 255);
+ switch (extFormat.VideoTransferMatrix) {
+ case DXVA2_VideoTransferMatrix_BT601:
+ yuvMatrix.Append(_T("601"));
+ break;
+ case DXVA2_VideoTransferMatrix_BT709:
+ yuvMatrix.Append(_T("709"));
+ break;
+ case DXVA2_VideoTransferMatrix_SMPTE240M:
+ yuvMatrix.Append(_T("240M"));
+ break;
+ default:
+ yuvMatrix = _T("None");
+ break;
}
+
+ yuvMatrix.Append(_T(".VSFilter"));
+ // Actually VSFilter expect full range (A)RGB frames to work with.
+ pSubStream->SetSourceTargetInfo(yuvMatrix, 0, 255);
}
int i = 0;
diff --git a/src/filters/transform/VSFilter/StyleEditorDialog.cpp b/src/filters/transform/VSFilter/StyleEditorDialog.cpp
index 806e6cff5..3e4e47734 100644
--- a/src/filters/transform/VSFilter/StyleEditorDialog.cpp
+++ b/src/filters/transform/VSFilter/StyleEditorDialog.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -193,7 +193,8 @@ void CStyleEditorDialog::OnOK()
m_stss.marginRect = m_margin;
for (size_t i = 0; i < m_alpha.size(); i++) {
- m_stss.alpha[i] = BYTE_MAX - m_alpha[i];
+ ASSERT(m_alpha[i] <= BYTE_MAX);
+ m_stss.alpha[i] = BYTE_MAX - BYTE(m_alpha[i]);
}
__super::OnOK();
diff --git a/src/filters/transform/VSFilter/installer/build_installer.bat b/src/filters/transform/VSFilter/installer/build_installer.bat
index 13314751a..c397f3ec8 100755
--- a/src/filters/transform/VSFilter/installer/build_installer.bat
+++ b/src/filters/transform/VSFilter/installer/build_installer.bat
@@ -1,5 +1,5 @@
@ECHO OFF
-REM (C) 2012-2013 see Authors.txt
+REM (C) 2012-2013, 2015 see Authors.txt
REM
REM This file is part of MPC-HC.
REM
@@ -18,17 +18,14 @@ REM along with this program. If not, see <http://www.gnu.org/licenses/>.
SETLOCAL
-PUSHD %~dp0
-
-REM You can set here the Inno Setup path if for example you have Inno Setup Unicode
-REM installed and you want to use the ANSI Inno Setup which is in another location
-IF NOT DEFINED InnoSetupPath SET "InnoSetupPath=H:\progs\thirdparty\isetup"
+SET "FILE_DIR=%~dp0"
+PUSHD "%FILE_DIR%"
SET ROOT_DIR=..\..\..\..\..
SET "BIN_DIR=%ROOT_DIR%\bin"
-CALL :SubDetectInnoSetup
-IF EXIST "%~dp0%ROOT_DIR%\signinfo.txt" (
+CALL "%FILE_DIR%%ROOT_DIR%\common.bat" :SubDetectInnoSetup
+IF EXIST "%FILE_DIR%%ROOT_DIR%\signinfo.txt" (
CALL :SubSign VSFilter.dll x86
CALL :SubSign VSFilter.dll x64
)
@@ -48,7 +45,7 @@ REM %1 is name of the file to sign
REM %2 is the platform
PUSHD "%BIN_DIR%\Filters_%~2\"
-CALL "%~dp0%ROOT_DIR%\contrib\sign.bat" "%1" || (ECHO Problem signing %1 & GOTO Break)
+CALL "%FILE_DIR%%ROOT_DIR%\contrib\sign.bat" "%1" || (ECHO Problem signing %1 & GOTO Break)
ECHO %1 signed successfully.
:Break
@@ -60,7 +57,7 @@ EXIT /B
IF %ERRORLEVEL% NEQ 0 GOTO EndWithError
ECHO.
TITLE Building VSFilter installer...
-"%InnoSetupPath%\ISCC.exe" /SMySignTool="cmd /c "%~dp0%ROOT_DIR%\contrib\sign.bat" $f" /Q^
+"%InnoSetupPath%\ISCC.exe" /SMySignTool="cmd /c "%FILE_DIR%%ROOT_DIR%\contrib\sign.bat" $f" /Q^
"vsfilter_setup.iss" /D%~1
IF %ERRORLEVEL% NEQ 0 GOTO EndWithError
IF /I "%~1%" == "x64Build" (
@@ -71,34 +68,6 @@ IF /I "%~1%" == "x64Build" (
EXIT /B
-:SubDetectInnoSetup
-REM Detect if we are running on 64bit Windows and use Wow6432Node since Inno Setup is
-REM a 32-bit application, and set the registry key of Inno Setup accordingly
-IF DEFINED PROGRAMFILES(x86) (
- SET "U_=HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall"
-) ELSE (
- SET "U_=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
-)
-
-IF DEFINED InnoSetupPath IF NOT EXIST "%InnoSetupPath%" (
- ECHO "%InnoSetupPath%" wasn't found on this machine! I will try to detect Inno Setup's path from the registry...
-)
-
-IF NOT EXIST "%InnoSetupPath%" (
- FOR /F "delims=" %%a IN (
- 'REG QUERY "%U_%\Inno Setup 5_is1" /v "Inno Setup: App Path"2^>Nul^|FIND "REG_SZ"') DO (
- SET "InnoSetupPath=%%a" & CALL :SubInnoSetupPath %%InnoSetupPath:*Z=%%)
-)
-
-IF NOT EXIST "%InnoSetupPath%" ECHO Inno Setup wasn't found! & GOTO EndWithError
-EXIT /B
-
-
-:SubInnoSetupPath
-SET "InnoSetupPath=%*"
-EXIT /B
-
-
:EndWithError
Title Building VSFilter installer [ERROR]
COLOR 0C