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:
authorXhmikosR <xhmikosr@users.sourceforge.net>2011-01-13 17:16:32 +0300
committerXhmikosR <xhmikosr@users.sourceforge.net>2011-01-13 17:16:32 +0300
commit001cf8d4a8999557a10d28ef1ecf3223c6d973a9 (patch)
tree11118cae65d6b8e4f1789a2029632ae00f502d59
parent0eb98dcebf3ff5c8fbdc1235474c0d5640f9a04c (diff)
legacy branch: merge r2827-r2843 from trunk
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/branches/legacy@2844 10f7b99b-c216-0410-bff0-8a66a9350fd8
-rw-r--r--distrib/mpc-hc_setup.iss119
-rw-r--r--include/Version.h22
-rw-r--r--src/DSUtil/HdmvClipInfo.cpp85
-rw-r--r--src/DSUtil/HdmvClipInfo.h17
-rw-r--r--src/SubPic/DX9SubPic.cpp4
-rw-r--r--src/apps/mplayerc/AppSettings.cpp2
-rw-r--r--src/apps/mplayerc/Changelog.txt11
-rw-r--r--src/apps/mplayerc/MainFrm.cpp44
-rw-r--r--src/apps/mplayerc/MainFrm.h2
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.br.rcbin350316 -> 351092 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.by.rcbin344462 -> 345458 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.ca.rcbin348562 -> 349338 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.cz.rcbin345374 -> 346150 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.de.rcbin347066 -> 347852 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.es.rcbin350686 -> 351462 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.fr.rcbin350780 -> 351556 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.hu.rcbin351136 -> 351912 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.hy.rcbin344890 -> 345666 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.it.rcbin347194 -> 347970 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.ja.rcbin320098 -> 320874 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.kr.rcbin317058 -> 317834 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.nl.rcbin345238 -> 346014 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.pl.rcbin354914 -> 355690 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.ru.rcbin346666 -> 347442 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.sc.rcbin310366 -> 311142 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.sk.rcbin348686 -> 349462 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.sv.rcbin342752 -> 343528 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.tc.rcbin312344 -> 313120 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.tr.rcbin343510 -> 344286 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/mplayerc.ua.rcbin345176 -> 345952 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.br.rc.txtbin141794 -> 142106 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.by.rc.txtbin136294 -> 136826 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.ca.rc.txtbin139922 -> 140234 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.cz.rc.txtbin136954 -> 137266 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.de.rc.txtbin138488 -> 138810 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.es.rc.txtbin142396 -> 142708 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.fr.rc.txtbin143368 -> 143680 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.hu.rc.txtbin143242 -> 143554 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.hy.rc.txtbin134656 -> 134968 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.it.rc.txtbin137992 -> 138304 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.ja.rc.txtbin106570 -> 106882 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.kr.rc.txtbin103516 -> 103828 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.nl.rc.txtbin136344 -> 136656 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.pl.rc.txtbin147380 -> 147692 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.ru.rc.txtbin138616 -> 138928 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.sc.rc.txtbin95818 -> 96130 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.sk.rc.txtbin140670 -> 140982 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.sv.rc.txtbin133094 -> 133406 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.tc.rc.txtbin97136 -> 97448 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.tr.rc.txtbin134424 -> 134736 bytes
-rw-r--r--src/apps/mplayerc/mpcresources/text/mplayerc.ua.rc.txtbin136982 -> 137294 bytes
-rw-r--r--src/apps/mplayerc/mplayerc.cpp4
-rw-r--r--src/apps/mplayerc/mplayerc.rcbin338198 -> 338974 bytes
-rw-r--r--src/apps/mplayerc/resource.hbin119762 -> 119864 bytes
-rw-r--r--src/filters/parser/BaseSplitter/BaseSplitter.cpp28
-rw-r--r--src/filters/parser/BaseSplitter/BaseSplitter.h1
-rw-r--r--src/filters/parser/MpegSplitter/MpegSplitter.cpp14
-rw-r--r--src/filters/parser/MpegSplitter/MpegSplitter.h20
-rw-r--r--src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp139
-rw-r--r--src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.h6
-rw-r--r--src/filters/renderer/VideoRenderers/DX9RenderingEngine.cpp109
-rw-r--r--src/filters/renderer/VideoRenderers/DX9RenderingEngine.h5
-rw-r--r--src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.cpp38
-rw-r--r--src/filters/renderer/VideoRenderers/RenderersSettings.cpp2
-rw-r--r--src/filters/renderer/VideoRenderers/RenderersSettings.h1
-rw-r--r--src/filters/renderer/VideoRenderers/SyncRenderer.cpp76
-rw-r--r--src/filters/renderer/VideoRenderers/madVRAllocatorPresenter.h6
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/ffcodecs.h22
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/allcodecs.c1
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/avcodec.h75
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h264.c3
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/utils.c11
-rw-r--r--src/filters/transform/VSFilter/DirectVobSubPropPage.cpp4
73 files changed, 507 insertions, 364 deletions
diff --git a/distrib/mpc-hc_setup.iss b/distrib/mpc-hc_setup.iss
index 054e22836..13af0258b 100644
--- a/distrib/mpc-hc_setup.iss
+++ b/distrib/mpc-hc_setup.iss
@@ -6,14 +6,14 @@
;If you want to compile the 64bit version, define "x64build"
-;#define x64Build
#define include_license
#define localize
+
;If you want to compile the MSVC2010 build installer, define "VS2010build"
+;#define x64Build
;#define VS2010build
-;Don't forget to update the DirectX SDK number (not updated so often)
-#define DIRECTX_SDK_NUMBER = 43
+;Don't forget to update the DirectX SDK number in include\Version.h (not updated so often)
;From now on you won't need to change anything
@@ -23,31 +23,32 @@
#include "Installer\..\..\include\Version.h"
#define app_name "Media Player Classic - Home Cinema"
-#define app_version str(MPC_VERSION_MAJOR) + "." + str(MPC_VERSION_MINOR) + "." + str(MPC_VERSION_REV) + "." + str(MPC_VERSION_PATCH)
+#define app_version str(MPC_VERSION_MAJOR) + "." + str(MPC_VERSION_MINOR) + "." + str(MPC_VERSION_PATCH) + "." + str(MPC_VERSION_REV)
#define app_url "http://mpc-hc.sourceforge.net/"
#ifdef x64Build
- #define mpchc_exe = 'mpc-hc64.exe'
- #define mpchc_ini = 'mpc-hc64.ini'
+ #define mpchc_exe = 'mpc-hc64.exe'
+ #define mpchc_ini = 'mpc-hc64.ini'
#else
- #define mpchc_exe = 'mpc-hc.exe'
- #define mpchc_ini = 'mpc-hc.ini'
+ #define mpchc_exe = 'mpc-hc.exe'
+ #define mpchc_ini = 'mpc-hc.ini'
#endif
#ifdef VS2010build
- #define bindir = '..\bin10'
- #define sse_required = False
+ #define bindir = '..\bin10'
+ #define sse_required = False
#define sse2_required = True
#else
- #define bindir = '..\bin'
- #define sse_required = True
+ #define bindir = '..\bin'
+ #define sse_required = True
#define sse2_required = False
#endif
[Setup]
#ifdef x64Build
+
AppId={{2ACBF1FA-F5C3-4B19-A774-B22A31F231B9}
DefaultGroupName={#app_name} x64
UninstallDisplayName={#app_name} v{#app_version} x64
@@ -58,7 +59,9 @@ OutputBaseFilename=MPC-HomeCinema.{#app_version}.x64
#endif
ArchitecturesAllowed=x64
ArchitecturesInstallIn64BitMode=x64
+
#else
+
AppId={{2624B969-7135-4EB1-B0F6-2D8C397B45F7}
DefaultGroupName={#app_name}
UninstallDisplayName={#app_name} v{#app_version}
@@ -67,6 +70,7 @@ OutputBaseFilename=MPC-HomeCinema.{#app_version}.x86.MSVC2010
#else
OutputBaseFilename=MPC-HomeCinema.{#app_version}.x86
#endif
+
#endif
AppName={#app_name}
@@ -98,7 +102,6 @@ SetupIconFile=..\src\apps\mplayerc\res\icon.ico
WizardImageFile=WizardImageFile.bmp
WizardSmallImageFile=WizardSmallImageFile.bmp
Compression=lzma/ultra
-InternalCompressLevel=ultra
SolidCompression=yes
EnableDirDoesntExistWarning=no
AllowNoIcons=yes
@@ -148,77 +151,77 @@ BeveledLabel={#app_name} v{#app_version}
[Types]
-Name: default; Description: {cm:types_DefaultInstallation}
-Name: custom; Description: {cm:types_CustomInstallation}; Flags: iscustom
+Name: default; Description: {cm:types_DefaultInstallation}
+Name: custom; Description: {cm:types_CustomInstallation}; Flags: iscustom
[Components]
-Name: main; Description: {#app_name} v{#app_version}; Types: default custom; Flags: fixed
-Name: mpciconlib; Description: {cm:comp_mpciconlib}; Types: default custom
+Name: main; Description: {#app_name} v{#app_version}; Types: default custom; Flags: fixed
+Name: mpciconlib; Description: {cm:comp_mpciconlib}; Types: default custom
#ifdef localize
-Name: mpcresources; Description: {cm:comp_mpcresources}; Types: default custom
+Name: mpcresources; Description: {cm:comp_mpcresources}; Types: default custom
#endif
[Tasks]
-Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}
-Name: desktopicon\user; Description: {cm:tsk_CurrentUser}; GroupDescription: {cm:AdditionalIcons}; Flags: exclusive
-Name: desktopicon\common; Description: {cm:tsk_AllUsers}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked exclusive
-Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; OnlyBelowVersion: 0,6.01; Flags: unchecked
-Name: reset_settings; Description: {cm:tsk_ResetSettings}; GroupDescription: {cm:tsk_Other}; Check: SettingsExistCheck(); Flags: checkedonce unchecked
+Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}
+Name: desktopicon\user; Description: {cm:tsk_CurrentUser}; GroupDescription: {cm:AdditionalIcons}; Flags: exclusive
+Name: desktopicon\common; Description: {cm:tsk_AllUsers}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked exclusive
+Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; OnlyBelowVersion: 0,6.01; Flags: unchecked
+Name: reset_settings; Description: {cm:tsk_ResetSettings}; GroupDescription: {cm:tsk_Other}; Check: SettingsExistCheck(); Flags: checkedonce unchecked
[Files]
; For CPU detection
-Source: WinCPUID.dll; Flags: dontcopy noencryption
+Source: WinCPUID.dll; DestDir: {tmp}; Flags: dontcopy noencryption
#ifdef x64Build
-Source: {#bindir}\mpc-hc_x64\mpc-hc64.exe; DestDir: {app}; Components: main; Flags: ignoreversion
-Source: {#bindir}\mpc-hc_x64\mpciconlib.dll; DestDir: {app}; Components: mpciconlib; Flags: ignoreversion
+Source: {#bindir}\mpc-hc_x64\mpc-hc64.exe; DestDir: {app}; Components: main; Flags: ignoreversion
+Source: {#bindir}\mpc-hc_x64\mpciconlib.dll; DestDir: {app}; Components: mpciconlib; Flags: ignoreversion
#ifdef localize
Source: {#bindir}\mpc-hc_x64\mpcresources.??.dll; DestDir: {app}; Components: mpcresources; Flags: ignoreversion
#endif
#else
-Source: {#bindir}\mpc-hc_x86\mpc-hc.exe; DestDir: {app}; Components: main; Flags: ignoreversion
-Source: {#bindir}\mpc-hc_x86\mpciconlib.dll; DestDir: {app}; Components: mpciconlib; Flags: ignoreversion
+Source: {#bindir}\mpc-hc_x86\mpc-hc.exe; DestDir: {app}; Components: main; Flags: ignoreversion
+Source: {#bindir}\mpc-hc_x86\mpciconlib.dll; DestDir: {app}; Components: mpciconlib; Flags: ignoreversion
#ifdef localize
Source: {#bindir}\mpc-hc_x86\mpcresources.??.dll; DestDir: {app}; Components: mpcresources; Flags: ignoreversion
#endif
#endif
-Source: ..\src\apps\mplayerc\Authors.txt; DestDir: {app}; Components: main; Flags: ignoreversion
-Source: ..\src\apps\mplayerc\Changelog.txt; DestDir: {app}; Components: main; Flags: ignoreversion
-Source: ..\COPYING.txt; DestDir: {app}; Components: main; Flags: ignoreversion
-
-
-[Run]
-Filename: {app}\{#mpchc_exe}; Description: {cm:LaunchProgram,{#app_name}}; WorkingDir: {app}; Flags: nowait postinstall skipifsilent unchecked
-Filename: {app}\Changelog.txt; Description: {cm:ViewChangelog}; WorkingDir: {app}; Flags: shellexec nowait postinstall skipifsilent unchecked
+Source: ..\src\apps\mplayerc\Authors.txt; DestDir: {app}; Components: main; Flags: ignoreversion
+Source: ..\src\apps\mplayerc\Changelog.txt; DestDir: {app}; Components: main; Flags: ignoreversion
+Source: ..\COPYING.txt; DestDir: {app}; Components: main; Flags: ignoreversion
[Icons]
#ifdef x64Build
-Name: {group}\{#app_name} x64; Filename: {app}\{#mpchc_exe}; Comment: {#app_name} v{#app_version} x64; WorkingDir: {app}; IconFilename: {app}\{#mpchc_exe}; IconIndex: 0
-Name: {commondesktop}\{#app_name} x64; Filename: {app}\{#mpchc_exe}; Tasks: desktopicon\common; Comment: {#app_name} v{#app_version} x64; WorkingDir: {app}; IconFilename: {app}\{#mpchc_exe}; IconIndex: 0
-Name: {userdesktop}\{#app_name} x64; Filename: {app}\{#mpchc_exe}; Tasks: desktopicon\user; Comment: {#app_name} v{#app_version} x64; WorkingDir: {app}; IconFilename: {app}\{#mpchc_exe}; IconIndex: 0
-Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\{#app_name} x64; Filename: {app}\{#mpchc_exe}; Tasks: quicklaunchicon; Comment: {#app_name} v{#app_version} x64; WorkingDir: {app}; IconFilename: {app}\{#mpchc_exe}; IconIndex: 0
+Name: {group}\{#app_name} x64; Filename: {app}\{#mpchc_exe}; Comment: {#app_name} v{#app_version} x64; WorkingDir: {app}; IconFilename: {app}\{#mpchc_exe}; IconIndex: 0
+Name: {commondesktop}\{#app_name} x64; Filename: {app}\{#mpchc_exe}; Comment: {#app_name} v{#app_version} x64; WorkingDir: {app}; IconFilename: {app}\{#mpchc_exe}; IconIndex: 0; Tasks: desktopicon\common
+Name: {userdesktop}\{#app_name} x64; Filename: {app}\{#mpchc_exe}; Comment: {#app_name} v{#app_version} x64; WorkingDir: {app}; IconFilename: {app}\{#mpchc_exe}; IconIndex: 0; Tasks: desktopicon\user
+Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\{#app_name} x64; Filename: {app}\{#mpchc_exe}; Comment: {#app_name} v{#app_version} x64; WorkingDir: {app}; IconFilename: {app}\{#mpchc_exe}; IconIndex: 0; Tasks: quicklaunchicon
#else
-Name: {group}\{#app_name}; Filename: {app}\{#mpchc_exe}; Comment: {#app_name} v{#app_version}; WorkingDir: {app}; IconFilename: {app}\{#mpchc_exe}; IconIndex: 0
-Name: {commondesktop}\{#app_name}; Filename: {app}\{#mpchc_exe}; Tasks: desktopicon\common; Comment: {#app_name} v{#app_version}; WorkingDir: {app}; IconFilename: {app}\{#mpchc_exe}; IconIndex: 0
-Name: {userdesktop}\{#app_name}; Filename: {app}\{#mpchc_exe}; Tasks: desktopicon\user; Comment: {#app_name} v{#app_version}; WorkingDir: {app}; IconFilename: {app}\{#mpchc_exe}; IconIndex: 0
-Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\{#app_name}; Filename: {app}\{#mpchc_exe}; Tasks: quicklaunchicon; Comment: {#app_name} v{#app_version}; WorkingDir: {app}; IconFilename: {app}\{#mpchc_exe}; IconIndex: 0
+Name: {group}\{#app_name}; Filename: {app}\{#mpchc_exe}; Comment: {#app_name} v{#app_version}; WorkingDir: {app}; IconFilename: {app}\{#mpchc_exe}; IconIndex: 0
+Name: {commondesktop}\{#app_name}; Filename: {app}\{#mpchc_exe}; Comment: {#app_name} v{#app_version}; WorkingDir: {app}; IconFilename: {app}\{#mpchc_exe}; IconIndex: 0; Tasks: desktopicon\common
+Name: {userdesktop}\{#app_name}; Filename: {app}\{#mpchc_exe}; Comment: {#app_name} v{#app_version}; WorkingDir: {app}; IconFilename: {app}\{#mpchc_exe}; IconIndex: 0; Tasks: desktopicon\user
+Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\{#app_name}; Filename: {app}\{#mpchc_exe}; Comment: {#app_name} v{#app_version}; WorkingDir: {app}; IconFilename: {app}\{#mpchc_exe}; IconIndex: 0; Tasks: quicklaunchicon
#endif
-Name: {group}\Changelog; Filename: {app}\Changelog.txt; Comment: {cm:ViewChangelog}; WorkingDir: {app}
-Name: {group}\{cm:ProgramOnTheWeb,{#app_name}}; Filename: {#app_url}
-Name: {group}\{cm:UninstallProgram,{#app_name}}; Filename: {uninstallexe}; Comment: {cm:UninstallProgram,{#app_name}}; WorkingDir: {app}
+Name: {group}\Changelog; Filename: {app}\Changelog.txt; Comment: {cm:ViewChangelog}; WorkingDir: {app}
+Name: {group}\{cm:ProgramOnTheWeb,{#app_name}}; Filename: {#app_url}
+Name: {group}\{cm:UninstallProgram,{#app_name}}; Filename: {uninstallexe}; Comment: {cm:UninstallProgram,{#app_name}}; WorkingDir: {app}
+
+
+[Run]
+Filename: {app}\{#mpchc_exe}; Description: {cm:LaunchProgram,{#app_name}}; WorkingDir: {app}; Flags: nowait postinstall skipifsilent unchecked
+Filename: {app}\Changelog.txt; Description: {cm:ViewChangelog}; WorkingDir: {app}; Flags: shellexec nowait postinstall skipifsilent unchecked
[InstallDelete]
-Type: files; Name: {userdesktop}\{#app_name}.lnk; Check: NOT IsTaskSelected('desktopicon\user') AND IsUpdate()
+Type: files; Name: {userdesktop}\{#app_name}.lnk; Check: NOT IsTaskSelected('desktopicon\user') AND IsUpdate()
Type: files; Name: {commondesktop}\{#app_name}.lnk; Check: NOT IsTaskSelected('desktopicon\common') AND IsUpdate()
-Type: files; Name: {app}\AUTHORS; Check: IsUpdate()
-Type: files; Name: {app}\ChangeLog; Check: IsUpdate()
-Type: files; Name: {app}\COPYING; Check: IsUpdate()
+Type: files; Name: {app}\AUTHORS; Check: IsUpdate()
+Type: files; Name: {app}\ChangeLog; Check: IsUpdate()
+Type: files; Name: {app}\COPYING; Check: IsUpdate()
[Code]
@@ -249,9 +252,10 @@ end;
function D3DX9DLLExists(): Boolean;
begin
- Result := False;
- if FileExists(ExpandConstant('{sys}\D3DX9_{#DIRECTX_SDK_NUMBER}.dll')) then
- Result := True;
+ if FileExists(ExpandConstant('{sys}\D3DX9_{#DIRECTX_SDK_NUMBER}.dll')) then begin
+ Result := True;
+ end else
+ Result := False;
end;
@@ -264,9 +268,10 @@ end;
// Check if MPC-HC's settings exist
function SettingsExistCheck(): Boolean;
begin
- Result := False;
- if RegKeyExists(HKEY_CURRENT_USER, 'Software\Gabest\Media Player Classic') OR FileExists(ExpandConstant('{app}\{#mpchc_ini}')) then
- Result := True;
+ if RegKeyExists(HKEY_CURRENT_USER, 'Software\Gabest\Media Player Classic') OR FileExists(ExpandConstant('{app}\{#mpchc_ini}')) then begin
+ Result := True;
+ end else
+ Result := False;
end;
diff --git a/include/Version.h b/include/Version.h
index f09cb11a6..bfe3c0707 100644
--- a/include/Version.h
+++ b/include/Version.h
@@ -1,12 +1,17 @@
// Notes:
-// * Do not use /* */ since ISPP is buggy and it will throw an error.
+// * Do not use /* comments */ since ISPP is buggy and it will throw an error.
+//
// * NO_VERSION_REV_NEEDED is defined in those cases where we don't need the revision
-// number, but only the major/minor version so the compiler does not rebuild everything.
-// It's used in mpcresources and mpciconlib projects.
+// number, but only the major/minor/patch version so the compiler does not rebuild
+// everything. It's used in the mpcresources and the mpciconlib projects.
+//
// * ISPP_IS_BUGGY is defined in the installer script only and it's just a workaround
// for ISPP being buggy and throwing an error.
+//
// * DIRECTX_SDK_DATE is the date of the DirectX SDK used for compilation and it's used
// in the error message in mpc-hc and in the installer when the DX runtime is out of date.
+//
+// * DIRECTX_SDK_NUMBER is used in the installer when the DX runtime is out of date.
#pragma once
@@ -19,16 +24,17 @@
#define MPC_VERSION_MAJOR 1
#define MPC_VERSION_MINOR 4
-#define MPC_VERSION_PATCH 0
+#define MPC_VERSION_PATCH 1
#define MPC_COMP_NAME "MPC-HC Team"
#define MPC_COPYRIGHT "Copyright (C) 2002-2011 see AUTHORS file"
#ifndef ISPP_IS_BUGGY
-#define MPC_VERSION MPC_VERSION_MAJOR,MPC_VERSION_MINOR,MPC_VERSION_REV,MPC_VERSION_PATCH
-#define MPC_VERSION_STR MAKE_STR(MPC_VERSION_MAJOR) ", " MAKE_STR(MPC_VERSION_MINOR) ", " MAKE_STR(MPC_VERSION_REV) ", " MAKE_STR(MPC_VERSION_PATCH)
-#define MPC_VERSION_SHORT MPC_VERSION_MAJOR,MPC_VERSION_MINOR,0,0
-#define MPC_VERSION_SHORT_STR MAKE_STR(MPC_VERSION_MAJOR) ", " MAKE_STR(MPC_VERSION_MINOR) ", 0, 0"
+#define MPC_VERSION MPC_VERSION_MAJOR,MPC_VERSION_MINOR,MPC_VERSION_PATCH,MPC_VERSION_REV
+#define MPC_VERSION_STR MAKE_STR(MPC_VERSION_MAJOR) ", " MAKE_STR(MPC_VERSION_MINOR) ", " MAKE_STR(MPC_VERSION_PATCH) ", " MAKE_STR(MPC_VERSION_REV)
+#define MPC_VERSION_SHORT MPC_VERSION_MAJOR,MPC_VERSION_MINOR,MPC_VERSION_PATCH,0
+#define MPC_VERSION_SHORT_STR MAKE_STR(MPC_VERSION_MAJOR) ", " MAKE_STR(MPC_VERSION_MINOR) ", " MAKE_STR(MPC_VERSION_PATCH) ", 0"
#endif
#define DIRECTX_SDK_DATE "June 2010"
+#define DIRECTX_SDK_NUMBER "43"
diff --git a/src/DSUtil/HdmvClipInfo.cpp b/src/DSUtil/HdmvClipInfo.cpp
index b10b3a2ba..9d3a0e112 100644
--- a/src/DSUtil/HdmvClipInfo.cpp
+++ b/src/DSUtil/HdmvClipInfo.cpp
@@ -279,13 +279,15 @@ HRESULT CHdmvClipInfo::ReadPlaylist(CString strPlaylistFile, REFERENCE_TIME& rtD
DWORD dwTemp;
SHORT nPlaylistItems;
- dwPos = ReadDword();
- SetFilePointer(m_hFile, dwPos, NULL, FILE_BEGIN);
+ dwPos = ReadDword(); // PlayList_start_address
+ ReadDword(); // PlayListMark_start_address
- ReadDword();
- ReadShort();
- nPlaylistItems = ReadShort();
- ReadShort();
+ // PlayList()
+ SetFilePointer(m_hFile, dwPos, NULL, FILE_BEGIN);
+ ReadDword(); // length
+ ReadShort(); // reserved_for_future_use
+ nPlaylistItems = ReadShort(); // number_of_PlayItems
+ ReadShort(); // number_of_SubPaths
dwPos += 10;
for (size_t i=0; i<nPlaylistItems; i++) {
@@ -324,6 +326,77 @@ HRESULT CHdmvClipInfo::ReadPlaylist(CString strPlaylistFile, REFERENCE_TIME& rtD
return AmHresultFromWin32(GetLastError());
}
+HRESULT CHdmvClipInfo::ReadChapters(CString strPlaylistFile, CAtlList<CHdmvClipInfo::PlaylistItem>& PlaylistItems, CAtlList<PlaylistChapter>& Chapters)
+{
+ BYTE Buff[100];
+ CPath Path (strPlaylistFile);
+ bool bDuplicate = false;
+
+ // Get BDMV folder
+ Path.RemoveFileSpec();
+ Path.RemoveFileSpec();
+
+ m_hFile = CreateFile(strPlaylistFile, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL,
+ OPEN_EXISTING, FILE_ATTRIBUTE_READONLY|FILE_FLAG_SEQUENTIAL_SCAN, NULL);
+
+ if(m_hFile != INVALID_HANDLE_VALUE)
+ {
+ REFERENCE_TIME* rtOffset = new REFERENCE_TIME[PlaylistItems.GetCount()];
+ REFERENCE_TIME rtSum = 0;
+ int nIndex = 0;
+
+ POSITION pos = PlaylistItems.GetHeadPosition();
+ while(pos)
+ {
+ CHdmvClipInfo::PlaylistItem& PI = PlaylistItems.GetNext(pos);
+
+ rtOffset[nIndex] = rtSum - PI.m_rtIn;
+ rtSum = rtSum + PI.Duration();
+ nIndex++;
+ }
+
+ ReadBuffer(Buff, 4);
+ if (memcmp (Buff, "MPLS", 4)) return CloseFile(VFW_E_INVALID_FILE_FORMAT);
+
+ ReadBuffer(Buff, 4);
+ if ((memcmp (Buff, "0200", 4)!=0) && (memcmp (Buff, "0100", 4)!=0)) return CloseFile(VFW_E_INVALID_FILE_FORMAT);
+
+ DWORD dwPos;
+ DWORD dwTemp;
+ SHORT nMarkCount;
+
+ ReadDword(); // PlayList_start_address
+ dwPos = ReadDword(); // PlayListMark_start_address
+
+ // PlayListMark()
+ SetFilePointer(m_hFile, dwPos, NULL, FILE_BEGIN);
+ ReadDword(); // length
+ nMarkCount = ReadShort(); // number_of_PlayList_marks
+ for (size_t i=0; i<nMarkCount; i++)
+ {
+ PlaylistChapter Chapter;
+
+ ReadByte(); // reserved_for_future_use
+ Chapter.m_nMarkType = (PlaylistMarkType)ReadByte(); // mark_type
+ Chapter.m_nPlayItemId = ReadShort(); // ref_to_PlayItem_id
+ Chapter.m_rtTimestamp = 20000i64*ReadDword()/90 + rtOffset[Chapter.m_nPlayItemId]; // mark_time_stamp
+ Chapter.m_nEntryPID = ReadShort(); // entry_ES_PID
+ Chapter.m_rtDuration = 20000i64*ReadDword()/90; // duration
+
+ Chapters.AddTail (Chapter);
+
+ // TRACE ("Chapter %d : %S\n", i, ReftimeToString (Chapter.m_rtTimestamp));
+ }
+
+ CloseFile (S_OK);
+ SAFE_DELETE_ARRAY(rtOffset);
+ return bDuplicate ? S_FALSE : S_OK;
+ }
+
+ return AmHresultFromWin32(GetLastError());
+}
+
+
HRESULT CHdmvClipInfo::FindMainMovie(LPCTSTR strFolder, CString& strPlaylistFile, CAtlList<PlaylistItem>& MainPlaylist)
{
HRESULT hr = E_FAIL;
diff --git a/src/DSUtil/HdmvClipInfo.h b/src/DSUtil/HdmvClipInfo.h
index 269a382df..5a0d732f9 100644
--- a/src/DSUtil/HdmvClipInfo.h
+++ b/src/DSUtil/HdmvClipInfo.h
@@ -118,6 +118,22 @@ public:
}
};
+ enum PlaylistMarkType
+ {
+ Reserved = 0x00,
+ EntryMark = 0x01,
+ LinkPoint = 0x02
+ };
+
+ struct PlaylistChapter
+ {
+ SHORT m_nPlayItemId;
+ PlaylistMarkType m_nMarkType;
+ REFERENCE_TIME m_rtTimestamp;
+ SHORT m_nEntryPID;
+ REFERENCE_TIME m_rtDuration;
+ };
+
CHdmvClipInfo(void);
~CHdmvClipInfo();
@@ -135,6 +151,7 @@ public:
HRESULT FindMainMovie(LPCTSTR strFolder, CString& strPlaylistFile, CAtlList<PlaylistItem>& MainPlaylist);
HRESULT ReadPlaylist(CString strPlaylistFile, REFERENCE_TIME& rtDuration, CAtlList<PlaylistItem>& Playlist);
+ HRESULT ReadChapters(CString strPlaylistFile, CAtlList<CHdmvClipInfo::PlaylistItem>& PlaylistItems, CAtlList<PlaylistChapter>& Chapters);
private :
DWORD SequenceInfo_start_address;
diff --git a/src/SubPic/DX9SubPic.cpp b/src/SubPic/DX9SubPic.cpp
index fa769b33d..5044c425a 100644
--- a/src/SubPic/DX9SubPic.cpp
+++ b/src/SubPic/DX9SubPic.cpp
@@ -2,7 +2,7 @@
* $Id$
*
* (C) 2003-2006 Gabest
- * (C) 2006-2010 see AUTHORS
+ * (C) 2006-2011 see AUTHORS
*
* This Program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -293,7 +293,7 @@ STDMETHODIMP CDX9SubPic::AlphaBlt(RECT* pSrc, RECT* pDst, SubPicDesc* pTarget)
hr = pD3DDev->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
hr = pD3DDev->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
- hr = pD3DDev->SetSamplerState(0, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR);
+ hr = pD3DDev->SetSamplerState(0, D3DSAMP_MIPFILTER, D3DTEXF_NONE);
hr = pD3DDev->SetSamplerState(0, D3DSAMP_ADDRESSU, D3DTADDRESS_BORDER);
hr = pD3DDev->SetSamplerState(0, D3DSAMP_ADDRESSV, D3DTADDRESS_BORDER);
diff --git a/src/apps/mplayerc/AppSettings.cpp b/src/apps/mplayerc/AppSettings.cpp
index 407131fdf..0f55c92c8 100644
--- a/src/apps/mplayerc/AppSettings.cpp
+++ b/src/apps/mplayerc/AppSettings.cpp
@@ -1418,6 +1418,7 @@ void CAppSettings::UpdateRenderersData(bool fSave)
pApp->WriteProfileInt(IDS_R_SETTINGS, _T("VMRVSync"), rendererSettings.iVMR9VSync);
pApp->WriteProfileInt(IDS_R_SETTINGS, _T("VMRDisableDesktopComposition"), rendererSettings.iVMRDisableDesktopComposition);
pApp->WriteProfileInt(IDS_R_SETTINGS, _T("VMRFullFloatingPointProcessing"), rendererSettings.iVMR9FullFloatingPointProcessing);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, _T("VMRHalfFloatingPointProcessing"), rendererSettings.iVMR9HalfFloatingPointProcessing);
pApp->WriteProfileInt(IDS_R_SETTINGS, _T("VMRColorManagementEnable"), rendererSettings.iVMR9ColorManagementEnable);
pApp->WriteProfileInt(IDS_R_SETTINGS, _T("VMRColorManagementInput"), rendererSettings.iVMR9ColorManagementInput);
@@ -1472,6 +1473,7 @@ void CAppSettings::UpdateRenderersData(bool fSave)
renderSettings.iVMR9VSync = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("VMRVSync"), DefaultSettings.iVMR9VSync);
renderSettings.iVMRDisableDesktopComposition = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("VMRDisableDesktopComposition"), DefaultSettings.iVMRDisableDesktopComposition);
renderSettings.iVMR9FullFloatingPointProcessing = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("VMRFullFloatingPointProcessing"), DefaultSettings.iVMR9FullFloatingPointProcessing);
+ renderSettings.iVMR9HalfFloatingPointProcessing = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("VMRHalfFloatingPointProcessing"), DefaultSettings.iVMR9HalfFloatingPointProcessing);
renderSettings.iVMR9ColorManagementEnable = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("VMRColorManagementEnable"), DefaultSettings.iVMR9ColorManagementEnable);
renderSettings.iVMR9ColorManagementInput = pApp->GetProfileInt(IDS_R_SETTINGS, _T("VMRColorManagementInput"), DefaultSettings.iVMR9ColorManagementInput);
diff --git a/src/apps/mplayerc/Changelog.txt b/src/apps/mplayerc/Changelog.txt
index abedbb105..8b7394df0 100644
--- a/src/apps/mplayerc/Changelog.txt
+++ b/src/apps/mplayerc/Changelog.txt
@@ -1,6 +1,6 @@
$Id$
-v1.5.xxxx.0 - unreleased
+v1.X.X.X - not released yet
========================
NEW : Added new options to always default to external subtitles, ignore
embedded subtitles and to set the autoload subtitle paths
@@ -13,6 +13,8 @@ v1.5.xxxx.0 - unreleased
scanning channels, added channel encryption detection for DVB-t during scan
NEW : Added ignore encrypted channels checkbox during DVB scan
NEW : Armenian translation
+ NEW : Added optional fp32 (full float point) processing, fp16 is now half float point
+ NEW : Support for BluRay chapters
CHANGED: Updated FFmpeg
CHANGED: Updated MediaInfoLib to v0.7.39
CHANGED: Updated ZenLib to v0.4.17
@@ -43,6 +45,7 @@ v1.5.xxxx.0 - unreleased
FIXED : Ticket #712, Audio renderer menu problem with Haali splitter after r2339
FIXED : Ticket #724, Frequency range and bandwidth value are currently
not taken into account when doing a scan
+ FIXED : Ticket #740, Make EVR Sync stats better looking
FIXED : Ticket #753, DVB-T, internal MPEG-2 filter & wrong aspect ratio
FIXED : Ticket #775, Default options of DVD/OGM Preferred language should be
"Default" not "English"
@@ -63,6 +66,12 @@ v1.5.xxxx.0 - unreleased
The value entered in scan is now saved in the configuration
+v1.4.2824.0 - 9 January 2011
+==============================
+ FIXED : Crash on Sandy Bridge processor
+ FIXED : Freeze on fast forward with H264 decoder
+
+
v1.4.2499.0 - 7 September 2010
==============================
NEW : Seamless playback support for multi files BRD
diff --git a/src/apps/mplayerc/MainFrm.cpp b/src/apps/mplayerc/MainFrm.cpp
index add210dd3..d73e4ac6e 100644
--- a/src/apps/mplayerc/MainFrm.cpp
+++ b/src/apps/mplayerc/MainFrm.cpp
@@ -2,7 +2,7 @@
* $Id$
*
* (C) 2003-2006 Gabest
- * (C) 2006-2010 see AUTHORS
+ * (C) 2006-2011 see AUTHORS
*
* This file is part of mplayerc.
*
@@ -338,6 +338,7 @@ BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
ON_UPDATE_COMMAND_UI(ID_VIEW_HIGHCOLORRESOLUTION, OnUpdateViewHighColorResolution)
ON_UPDATE_COMMAND_UI(ID_VIEW_FORCEINPUTHIGHCOLORRESOLUTION, OnUpdateViewForceInputHighColorResolution)
ON_UPDATE_COMMAND_UI(ID_VIEW_FULLFLOATINGPOINTPROCESSING, OnUpdateViewFullFloatingPointProcessing)
+ ON_UPDATE_COMMAND_UI(ID_VIEW_HALFFLOATINGPOINTPROCESSING, OnUpdateViewHalfFloatingPointProcessing)
ON_UPDATE_COMMAND_UI(ID_VIEW_ENABLEFRAMETIMECORRECTION, OnUpdateViewEnableFrameTimeCorrection)
ON_UPDATE_COMMAND_UI(ID_VIEW_VSYNC, OnUpdateViewVSync)
ON_UPDATE_COMMAND_UI(ID_VIEW_VSYNCOFFSET, OnUpdateViewVSyncOffset)
@@ -378,6 +379,7 @@ BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
ON_COMMAND(ID_VIEW_HIGHCOLORRESOLUTION, OnViewHighColorResolution)
ON_COMMAND(ID_VIEW_FORCEINPUTHIGHCOLORRESOLUTION, OnViewForceInputHighColorResolution)
ON_COMMAND(ID_VIEW_FULLFLOATINGPOINTPROCESSING, OnViewFullFloatingPointProcessing)
+ ON_COMMAND(ID_VIEW_HALFFLOATINGPOINTPROCESSING, OnViewHalfFloatingPointProcessing)
ON_COMMAND(ID_VIEW_ENABLEFRAMETIMECORRECTION, OnViewEnableFrameTimeCorrection)
ON_COMMAND(ID_VIEW_VSYNC, OnViewVSync)
ON_COMMAND(ID_VIEW_VSYNCACCURATE, OnViewVSyncAccurate)
@@ -4505,13 +4507,7 @@ bool CMainFrame::GetDIB(BYTE** ppData, long& size, bool fSilent)
*ppData = NULL;
size = 0;
- bool fNeedsToPause = !m_pCAP;
- if(fNeedsToPause) {
- fNeedsToPause = !IsVMR7InGraph(pGB);
- }
- if(fNeedsToPause) {
- fNeedsToPause = !IsVMR9InGraph(pGB);
- }
+ bool fNeedsToPause = !(m_pCAP || IsVMR7InGraph(pGB) || IsVMR9InGraph(pGB));
OAFilterState fs = GetMediaState();
@@ -5819,6 +5815,20 @@ void CMainFrame::OnUpdateViewFullFloatingPointProcessing(CCmdUI* pCmdUI)
pCmdUI->SetCheck(r.m_RenderSettings.iVMR9FullFloatingPointProcessing);
}
+void CMainFrame::OnUpdateViewHalfFloatingPointProcessing(CCmdUI* pCmdUI)
+{
+ AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& r = s.m_RenderersSettings;
+ CRenderersData& rd = AfxGetMyApp()->m_Renderers;
+ bool supported = ((s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM ||
+ s.iDSVideoRendererType == VIDRNDT_DS_VMR9RENDERLESS) &&
+ r.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D) &&
+ rd.m_bFP16Support;
+
+ pCmdUI->Enable (supported);
+ pCmdUI->SetCheck(r.m_RenderSettings.iVMR9HalfFloatingPointProcessing);
+}
+
void CMainFrame::OnUpdateViewEnableFrameTimeCorrection(CCmdUI* pCmdUI)
{
AppSettings& s = AfxGetAppSettings();
@@ -6184,12 +6194,24 @@ void CMainFrame::OnViewFullFloatingPointProcessing()
{
CRenderersSettings& s = AfxGetAppSettings().m_RenderersSettings;
s.m_RenderSettings.iVMR9FullFloatingPointProcessing = !s.m_RenderSettings.iVMR9FullFloatingPointProcessing;
+ if(s.m_RenderSettings.iVMR9FullFloatingPointProcessing) s.m_RenderSettings.iVMR9HalfFloatingPointProcessing = false;
s.UpdateData(true);
CString Format;
Format.Format(L"Full Floating Point Processing: %s", s.m_RenderSettings.iVMR9FullFloatingPointProcessing? L"On":L"Off");
m_OSD.DisplayMessage (OSD_TOPRIGHT, Format);
}
+void CMainFrame::OnViewHalfFloatingPointProcessing()
+{
+ CRenderersSettings& s = AfxGetAppSettings().m_RenderersSettings;
+ s.m_RenderSettings.iVMR9HalfFloatingPointProcessing = !s.m_RenderSettings.iVMR9HalfFloatingPointProcessing;
+ if(s.m_RenderSettings.iVMR9HalfFloatingPointProcessing) s.m_RenderSettings.iVMR9FullFloatingPointProcessing = false;
+ s.UpdateData(true);
+ CString Format;
+ Format.Format(L"Half Floating Point Processing: %s", s.m_RenderSettings.iVMR9HalfFloatingPointProcessing? L"On":L"Off");
+ m_OSD.DisplayMessage (OSD_TOPRIGHT, Format);
+}
+
void CMainFrame::OnViewEnableFrameTimeCorrection()
{
CRenderersSettings& s = AfxGetAppSettings().m_RenderersSettings;
@@ -12510,6 +12532,12 @@ IBaseFilter* CMainFrame::FindSourceSelectableFilter()
pSF = FindFilter(L"{55DA30FC-F16B-49fc-BAA5-AE59FC65F82D}", pGB);
}
if(!pSF) {
+ pSF = FindFilter(L"{529A00DB-0C43-4f5b-8EF2-05004CBE0C6F}", pGB); // AV Splitter
+ }
+ if(!pSF) {
+ pSF = FindFilter(L"{D8980E15-E1F6-4916-A10F-D7EB4E9E10B8}", pGB); // AV Source
+ }
+ if(!pSF) {
pSF = FindFilter(__uuidof(CMpegSplitterFilter), pGB);
}
if(!pSF) {
diff --git a/src/apps/mplayerc/MainFrm.h b/src/apps/mplayerc/MainFrm.h
index c58619677..eb3fd46e5 100644
--- a/src/apps/mplayerc/MainFrm.h
+++ b/src/apps/mplayerc/MainFrm.h
@@ -745,6 +745,7 @@ public:
afx_msg void OnUpdateViewHighColorResolution(CCmdUI* pCmdUI);
afx_msg void OnUpdateViewForceInputHighColorResolution(CCmdUI* pCmdUI);
afx_msg void OnUpdateViewFullFloatingPointProcessing(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateViewHalfFloatingPointProcessing(CCmdUI* pCmdUI);
afx_msg void OnUpdateViewEnableFrameTimeCorrection(CCmdUI* pCmdUI);
afx_msg void OnUpdateViewVSyncOffsetIncrease(CCmdUI* pCmdUI);
afx_msg void OnUpdateViewVSyncOffsetDecrease(CCmdUI* pCmdUI);
@@ -785,6 +786,7 @@ public:
afx_msg void OnViewHighColorResolution();
afx_msg void OnViewForceInputHighColorResolution();
afx_msg void OnViewFullFloatingPointProcessing();
+ afx_msg void OnViewHalfFloatingPointProcessing();
afx_msg void OnViewEnableFrameTimeCorrection();
afx_msg void OnViewVSyncOffsetIncrease();
afx_msg void OnViewVSyncOffsetDecrease();
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.br.rc b/src/apps/mplayerc/mpcresources/mplayerc.br.rc
index 6dcd8b53c..83c85a995 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.br.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.br.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.by.rc b/src/apps/mplayerc/mpcresources/mplayerc.by.rc
index 4ef9ea2ef..9a2a8eaf3 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.by.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.by.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.ca.rc b/src/apps/mplayerc/mpcresources/mplayerc.ca.rc
index fba9e9a25..016aa77c5 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.ca.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.ca.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.cz.rc b/src/apps/mplayerc/mpcresources/mplayerc.cz.rc
index b44010b2f..b5ae1ca64 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.cz.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.cz.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.de.rc b/src/apps/mplayerc/mpcresources/mplayerc.de.rc
index 2a4d88ec0..3ed97489d 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.de.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.de.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.es.rc b/src/apps/mplayerc/mpcresources/mplayerc.es.rc
index 3c25ff74a..76f3cf45e 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.es.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.es.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.fr.rc b/src/apps/mplayerc/mpcresources/mplayerc.fr.rc
index 7bcc1961d..31236cc14 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.fr.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.fr.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.hu.rc b/src/apps/mplayerc/mpcresources/mplayerc.hu.rc
index 28c093616..d5b239727 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.hu.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.hu.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.hy.rc b/src/apps/mplayerc/mpcresources/mplayerc.hy.rc
index d41499ee5..fa8613162 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.hy.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.hy.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.it.rc b/src/apps/mplayerc/mpcresources/mplayerc.it.rc
index f5a7f525a..9e57a58e1 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.it.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.it.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.ja.rc b/src/apps/mplayerc/mpcresources/mplayerc.ja.rc
index 2a13bea3b..ba22e4245 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.ja.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.ja.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.kr.rc b/src/apps/mplayerc/mpcresources/mplayerc.kr.rc
index d5699d22f..d7a756553 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.kr.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.kr.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.nl.rc b/src/apps/mplayerc/mpcresources/mplayerc.nl.rc
index faa94ff7a..02a68d608 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.nl.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.nl.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.pl.rc b/src/apps/mplayerc/mpcresources/mplayerc.pl.rc
index 4194e3468..ad7b6a8ee 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.pl.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.pl.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.ru.rc b/src/apps/mplayerc/mpcresources/mplayerc.ru.rc
index 3fab85890..48b1e9da1 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.ru.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.ru.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.sc.rc b/src/apps/mplayerc/mpcresources/mplayerc.sc.rc
index 8cfeb466c..a1747db91 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.sc.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.sc.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.sk.rc b/src/apps/mplayerc/mpcresources/mplayerc.sk.rc
index 528ab501e..342d29fdb 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.sk.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.sk.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.sv.rc b/src/apps/mplayerc/mpcresources/mplayerc.sv.rc
index 13b9d7df4..c6bbc2b5e 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.sv.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.sv.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.tc.rc b/src/apps/mplayerc/mpcresources/mplayerc.tc.rc
index 5e97d8f31..6999c0c30 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.tc.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.tc.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.tr.rc b/src/apps/mplayerc/mpcresources/mplayerc.tr.rc
index 6abb17419..6b8ebf828 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.tr.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.tr.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/mplayerc.ua.rc b/src/apps/mplayerc/mpcresources/mplayerc.ua.rc
index 87f1d014a..78b560121 100644
--- a/src/apps/mplayerc/mpcresources/mplayerc.ua.rc
+++ b/src/apps/mplayerc/mpcresources/mplayerc.ua.rc
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.br.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.br.rc.txt
index b405835b0..2685368b9 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.br.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.br.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.by.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.by.rc.txt
index 56cf6a987..970cfd2e1 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.by.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.by.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.ca.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.ca.rc.txt
index 9867fe469..f44fa47a2 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.ca.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.ca.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.cz.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.cz.rc.txt
index 88862b620..f71b2fa0e 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.cz.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.cz.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.de.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.de.rc.txt
index c5668eeb8..3deb871ca 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.de.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.de.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.es.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.es.rc.txt
index 1269478dd..1b5708e89 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.es.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.es.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.fr.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.fr.rc.txt
index 141323f14..86b818652 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.fr.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.fr.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.hu.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.hu.rc.txt
index baa452da0..c1dcd2bb2 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.hu.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.hu.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.hy.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.hy.rc.txt
index 13d0e59f9..7776cf8fe 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.hy.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.hy.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.it.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.it.rc.txt
index 44fb76f8d..967935761 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.it.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.it.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.ja.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.ja.rc.txt
index 101047d85..d59a97fb4 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.ja.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.ja.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.kr.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.kr.rc.txt
index f9be8f232..c3b336ae8 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.kr.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.kr.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.nl.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.nl.rc.txt
index d1016e041..26970c865 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.nl.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.nl.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.pl.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.pl.rc.txt
index d020f1526..6e17292ea 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.pl.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.pl.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.ru.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.ru.rc.txt
index c9b4a0b6c..479cd236c 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.ru.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.ru.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.sc.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.sc.rc.txt
index a19da1bad..108623ea2 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.sc.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.sc.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.sk.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.sk.rc.txt
index accd43310..ca76d6163 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.sk.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.sk.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.sv.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.sv.rc.txt
index 7176cfedf..a4d69a522 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.sv.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.sv.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.tc.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.tc.rc.txt
index c51e00b42..753e96be0 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.tc.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.tc.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.tr.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.tr.rc.txt
index 8a8a35c60..f2d7d6ea7 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.tr.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.tr.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mpcresources/text/mplayerc.ua.rc.txt b/src/apps/mplayerc/mpcresources/text/mplayerc.ua.rc.txt
index 4a7792afa..de0133a2a 100644
--- a/src/apps/mplayerc/mpcresources/text/mplayerc.ua.rc.txt
+++ b/src/apps/mplayerc/mpcresources/text/mplayerc.ua.rc.txt
Binary files differ
diff --git a/src/apps/mplayerc/mplayerc.cpp b/src/apps/mplayerc/mplayerc.cpp
index dbdab48c1..168a5f463 100644
--- a/src/apps/mplayerc/mplayerc.cpp
+++ b/src/apps/mplayerc/mplayerc.cpp
@@ -2029,7 +2029,9 @@ void CMPlayerCApp::SetLanguage (int nLanguage)
needVersion += MAKE_STR(MPC_VERSION_MAJOR);
needVersion += L".";
needVersion += MAKE_STR(MPC_VERSION_MINOR);
- needVersion += L".0.0";
+ needVersion += L".";
+ needVersion += MAKE_STR(MPC_VERSION_PATCH);
+ needVersion += L".0";
if ( strSatVersion == needVersion ) {
hMod = LoadLibrary( strSatellite );
diff --git a/src/apps/mplayerc/mplayerc.rc b/src/apps/mplayerc/mplayerc.rc
index d3cd20ade..17ec187d0 100644
--- a/src/apps/mplayerc/mplayerc.rc
+++ b/src/apps/mplayerc/mplayerc.rc
Binary files differ
diff --git a/src/apps/mplayerc/resource.h b/src/apps/mplayerc/resource.h
index 2e7d8c12e..0b6cdb098 100644
--- a/src/apps/mplayerc/resource.h
+++ b/src/apps/mplayerc/resource.h
Binary files differ
diff --git a/src/filters/parser/BaseSplitter/BaseSplitter.cpp b/src/filters/parser/BaseSplitter/BaseSplitter.cpp
index c23a2cd8a..9749ac27a 100644
--- a/src/filters/parser/BaseSplitter/BaseSplitter.cpp
+++ b/src/filters/parser/BaseSplitter/BaseSplitter.cpp
@@ -1206,18 +1206,38 @@ STDMETHODIMP CBaseSplitterFilter::Load(LPCOLESTR pszFileName, const AM_MEDIA_TYP
HRESULT hr = E_FAIL;
CComPtr<IAsyncReader> pAsyncReader;
CAtlList<CHdmvClipInfo::PlaylistItem> Items;
- if (BuildPlaylist (pszFileName, Items)) {
+ CAtlList<CHdmvClipInfo::PlaylistChapter> Chapters;
+
+ if (BuildPlaylist (pszFileName, Items))
pAsyncReader = (IAsyncReader*)DNew CAsyncFileReader(Items, hr);
- } else {
+ else
pAsyncReader = (IAsyncReader*)DNew CAsyncFileReader(CString(pszFileName), hr);
- }
+
if(FAILED(hr)
|| FAILED(hr = DeleteOutputs())
- || FAILED(hr = CreateOutputs(pAsyncReader))) {
+ || FAILED(hr = CreateOutputs(pAsyncReader)))
+ {
m_fn = "";
return hr;
}
+ if (BuildChapters (pszFileName, Items, Chapters))
+ {
+ POSITION pos = Chapters.GetHeadPosition();
+ int i = 1;
+ while(pos)
+ {
+ CString str;
+ CHdmvClipInfo::PlaylistChapter& chap = Chapters.GetNext(pos);
+ if (chap.m_nMarkType == CHdmvClipInfo::PlaylistMarkType::EntryMark)
+ {
+ str.Format (_T("Chapter %d"), i);
+ ChapAppend (chap.m_rtTimestamp, str);
+ i++;
+ }
+ }
+ }
+
ChapSort();
m_pSyncReader = pAsyncReader;
diff --git a/src/filters/parser/BaseSplitter/BaseSplitter.h b/src/filters/parser/BaseSplitter/BaseSplitter.h
index e030187c1..255f7af72 100644
--- a/src/filters/parser/BaseSplitter/BaseSplitter.h
+++ b/src/filters/parser/BaseSplitter/BaseSplitter.h
@@ -295,6 +295,7 @@ protected:
virtual bool BuildPlaylist(LPCTSTR pszFileName, CAtlList<CHdmvClipInfo::PlaylistItem>& Items) {
return false;
};
+ virtual bool BuildChapters(LPCTSTR pszFileName, CAtlList<CHdmvClipInfo::PlaylistItem>& PlaylistItems, CAtlList<CHdmvClipInfo::PlaylistChapter>& Items) { return false; };
public:
CBaseSplitterFilter(LPCTSTR pName, LPUNKNOWN pUnk, HRESULT* phr, const CLSID& clsid);
diff --git a/src/filters/parser/MpegSplitter/MpegSplitter.cpp b/src/filters/parser/MpegSplitter/MpegSplitter.cpp
index 9a29a446e..8d28a7256 100644
--- a/src/filters/parser/MpegSplitter/MpegSplitter.cpp
+++ b/src/filters/parser/MpegSplitter/MpegSplitter.cpp
@@ -794,6 +794,7 @@ void CMpegSplitterFilter::DemuxSeek(REFERENCE_TIME rt)
if(pPin && pPin->IsConnected()) {
m_pFile->Seek(seekpos);
+ __int64 curpos = seekpos;
REFERENCE_TIME pdt = _I64_MIN;
for(int j = 0; j < 10; j++) {
@@ -810,11 +811,12 @@ void CMpegSplitterFilter::DemuxSeek(REFERENCE_TIME rt)
if(rtmin <= rt && rt <= rtmax || pdt > 0 && dt < 0) {
- minseekpos = min(minseekpos, m_pFile->GetPos());
+ minseekpos = min(minseekpos, curpos);
break;
}
- m_pFile->Seek(m_pFile->GetPos() - (__int64)(1.0*dt/m_rtDuration*len));
+ curpos -= (__int64)(1.0*dt/m_rtDuration*len);
+ m_pFile->Seek(curpos);
//pdt = dt;
}
@@ -858,6 +860,11 @@ bool CMpegSplitterFilter::BuildPlaylist(LPCTSTR pszFileName, CAtlList<CHdmvClipI
return SUCCEEDED (m_ClipInfo.ReadPlaylist (pszFileName, m_rtPlaylistDuration, Items)) ? true : false;
}
+bool CMpegSplitterFilter::BuildChapters(LPCTSTR pszFileName, CAtlList<CHdmvClipInfo::PlaylistItem>& PlaylistItems, CAtlList<CHdmvClipInfo::PlaylistChapter>& Items)
+{
+ return SUCCEEDED (m_ClipInfo.ReadChapters (pszFileName, PlaylistItems, Items)) ? true : false;
+}
+
// IAMStreamSelect
STDMETHODIMP CMpegSplitterFilter::Count(DWORD* pcStreams)
@@ -899,6 +906,9 @@ STDMETHODIMP CMpegSplitterFilter::Enable(long lIndex, DWORD dwFlags)
continue;
}
+ PauseGraph;
+ ResumeGraph;
+
HRESULT hr;
if(FAILED(hr = RenameOutputPin(from, to, &to.mt))) {
return hr;
diff --git a/src/filters/parser/MpegSplitter/MpegSplitter.h b/src/filters/parser/MpegSplitter/MpegSplitter.h
index abceb4cd9..73118a690 100644
--- a/src/filters/parser/MpegSplitter/MpegSplitter.h
+++ b/src/filters/parser/MpegSplitter/MpegSplitter.h
@@ -24,6 +24,25 @@
#include "../BaseSplitter/BaseSplitter.h"
#include "MpegSplitterFile.h"
+#define PauseGraph \
+ CComQIPtr<IMediaControl> _pMC(m_pGraph); \
+ OAFilterState _fs = -1; \
+ if(_pMC) _pMC->GetState(1000, &_fs); \
+ if(_fs == State_Running) \
+ _pMC->Pause(); \
+ \
+ HRESULT _hr = E_FAIL; \
+ CComQIPtr<IMediaSeeking> _pMS((IUnknown*)(INonDelegatingUnknown*)m_pGraph); \
+ LONGLONG _rtNow = 0; \
+ if(_pMS) _hr = _pMS->GetCurrentPosition(&_rtNow); \
+
+#define ResumeGraph \
+ if(SUCCEEDED(_hr) && _pMS && _fs != State_Stopped) \
+ _hr = _pMS->SetPositions(&_rtNow, AM_SEEKING_AbsolutePositioning, NULL, AM_SEEKING_NoPositioning); \
+ \
+ if(_fs == State_Running && _pMS) \
+ _pMC->Run(); \
+
class __declspec(uuid("DC257063-045F-4BE2-BD5B-E12279C464F0"))
CMpegSplitterFilter : public CBaseSplitterFilter, public IAMStreamSelect
{
@@ -40,6 +59,7 @@ protected:
void DemuxSeek(REFERENCE_TIME rt);
bool DemuxLoop();
bool BuildPlaylist(LPCTSTR pszFileName, CAtlList<CHdmvClipInfo::PlaylistItem>& files);
+ bool BuildChapters(LPCTSTR pszFileName, CAtlList<CHdmvClipInfo::PlaylistItem>& PlaylistItems, CAtlList<CHdmvClipInfo::PlaylistChapter>& Items);
HRESULT DemuxNextPacket(REFERENCE_TIME rtStartOffset);
diff --git a/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp b/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp
index 8844f2bb5..4855bf443 100644
--- a/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp
+++ b/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp
@@ -2,7 +2,7 @@
* $Id$
*
* (C) 2003-2006 Gabest
- * (C) 2006-2010 see AUTHORS
+ * (C) 2006-2011 see AUTHORS
*
* This file is part of mplayerc.
*
@@ -756,11 +756,6 @@ HRESULT CDX9AllocatorPresenter::CreateDevice(CString &_Error)
}
#endif
- if (!SetCurrentDisplayMode()) {
- _Error += L"GetAdapterDisplayMode failed\n";
- return E_UNEXPECTED;
- }
-
D3DPRESENT_PARAMETERS pp;
ZeroMemory(&pp, sizeof(pp));
@@ -770,45 +765,65 @@ HRESULT CDX9AllocatorPresenter::CreateDevice(CString &_Error)
}
m_bCompositionEnabled = bCompositionEnabled != 0;
-
m_bAlternativeVSync = s.m_RenderSettings.fVMR9AlterativeVSync;
- m_bHighColorResolution = s.m_RenderSettings.iEVRHighColorResolution && m_bIsEVR;
+
+ // detect FP textures support
+ renderersData->m_bFP16Support = SUCCEEDED(m_pD3D->CheckDeviceFormat(m_CurrentAdapter, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, D3DUSAGE_QUERY_FILTER, D3DRTYPE_VOLUMETEXTURE, D3DFMT_A32B32G32R32F));
+
+ // detect 10-bit textures support
+ renderersData->m_b10bitSupport = SUCCEEDED(m_pD3D->CheckDeviceFormat(m_CurrentAdapter, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, D3DUSAGE_QUERY_FILTER, D3DRTYPE_TEXTURE, D3DFMT_A2R10G10B10));
+
+ // set settings that depend on hardware feature support
+ m_bForceInputHighColorResolution = s.m_RenderSettings.iEVRForceInputHighColorResolution && m_bIsEVR && renderersData->m_b10bitSupport;
+ m_bHighColorResolution = s.m_RenderSettings.iEVRHighColorResolution && m_bIsEVR && renderersData->m_b10bitSupport;
+ m_bFullFloatingPointProcessing = s.m_RenderSettings.iVMR9FullFloatingPointProcessing && renderersData->m_bFP16Support;
+ m_bHalfFloatingPointProcessing = s.m_RenderSettings.iVMR9HalfFloatingPointProcessing && renderersData->m_bFP16Support && !m_bFullFloatingPointProcessing;
+
+ // set color formats
+ if (m_bFullFloatingPointProcessing) {
+ m_SurfaceType = D3DFMT_A32B32G32R32F;
+ } else if (m_bHalfFloatingPointProcessing) {
+ m_SurfaceType = D3DFMT_A16B16G16R16F;
+ } else if (m_bForceInputHighColorResolution || m_bHighColorResolution) {
+ m_SurfaceType = D3DFMT_A2R10G10B10;
+ } else {
+ m_SurfaceType = D3DFMT_A8R8G8B8;
+ }
+
+ if (m_bHighColorResolution) {
+ pp.BackBufferFormat = D3DFMT_A2R10G10B10;
+ } else {
+ pp.BackBufferFormat = D3DFMT_X8R8G8B8;
+ }
+
+ D3DDISPLAYMODEEX DisplayMode;
+ ZeroMemory(&DisplayMode, sizeof(DisplayMode));
+ DisplayMode.Size = sizeof(DisplayMode);
+ D3DDISPLAYMODE d3ddm;
+ ZeroMemory(&d3ddm, sizeof(d3ddm));
if (m_bIsFullscreen) {
pp.Windowed = false;
- pp.BackBufferWidth = m_ScreenSize.cx;
- pp.BackBufferHeight = m_ScreenSize.cy;
+ pp.BackBufferCount = 3;
+ pp.SwapEffect = D3DSWAPEFFECT_FLIP;
pp.hDeviceWindow = m_hWnd;
if(m_bAlternativeVSync) {
- pp.BackBufferCount = 3;
- pp.SwapEffect = D3DSWAPEFFECT_DISCARD; // Ne pas mettre D3DSWAPEFFECT_COPY car cela entraine une desynchro audio sur les MKV ! // Copy needed for sync now? FLIP only stutters.
pp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
- } else {
- pp.BackBufferCount = 3;
- pp.SwapEffect = D3DSWAPEFFECT_DISCARD; // Ne pas mettre D3DSWAPEFFECT_COPY car cela entraine une desynchro audio sur les MKV ! // Copy needed for sync now? FLIP only stutters.
- pp.PresentationInterval = D3DPRESENT_INTERVAL_ONE;
}
pp.Flags = D3DPRESENTFLAG_VIDEO;
if (s.m_RenderSettings.iVMR9FullscreenGUISupport && !m_bHighColorResolution) {
pp.Flags |= D3DPRESENTFLAG_LOCKABLE_BACKBUFFER;
}
- if (m_bHighColorResolution) {
- pp.BackBufferFormat = D3DFMT_A2R10G10B10;
- } else {
- pp.BackBufferFormat = m_DisplayType;
- }
-
m_D3DDevExError = L"No m_pD3DEx";
if (m_pD3DEx) {
- D3DDISPLAYMODEEX DisplayMode;
- ZeroMemory(&DisplayMode, sizeof(DisplayMode));
- DisplayMode.Size = sizeof(DisplayMode);
m_pD3DEx->GetAdapterDisplayModeEx(m_CurrentAdapter, &DisplayMode, NULL);
DisplayMode.Format = pp.BackBufferFormat;
- pp.FullScreen_RefreshRateInHz = DisplayMode.RefreshRate;
+ m_ScreenSize.SetSize(DisplayMode.Width, DisplayMode.Height);
+ pp.FullScreen_RefreshRateInHz = m_RefreshRate = DisplayMode.RefreshRate;
+ pp.BackBufferWidth = m_ScreenSize.cx;
+ pp.BackBufferHeight = m_ScreenSize.cy;
- m_CurrentAdapter = GetAdapter(m_pD3D, true);
hr = m_pD3DEx->CreateDeviceEx(
m_CurrentAdapter, D3DDEVTYPE_HAL, m_hWnd,
GetVertexProcessing() | D3DCREATE_FPU_PRESERVE | D3DCREATE_MULTITHREADED | D3DCREATE_ENABLE_PRESENTSTATS, //D3DCREATE_MANAGED
@@ -821,16 +836,20 @@ HRESULT CDX9AllocatorPresenter::CreateDevice(CString &_Error)
m_DisplayType = DisplayMode.Format;
}
}
-
if (!m_pD3DDev) {
- m_CurrentAdapter = GetAdapter(m_pD3D, true);
+ m_pD3D->GetAdapterDisplayMode(m_CurrentAdapter, &d3ddm);
+ d3ddm.Format = pp.BackBufferFormat;
+ m_ScreenSize.SetSize(d3ddm.Width, d3ddm.Height);
+ pp.FullScreen_RefreshRateInHz = m_RefreshRate = d3ddm.RefreshRate;
+ pp.BackBufferWidth = m_ScreenSize.cx;
+ pp.BackBufferHeight = m_ScreenSize.cy;
+
hr = m_pD3D->CreateDevice(
m_CurrentAdapter, D3DDEVTYPE_HAL, m_hWnd,
GetVertexProcessing() | D3DCREATE_FPU_PRESERVE | D3DCREATE_MULTITHREADED, //D3DCREATE_MANAGED
&pp, &m_pD3DDev);
- if (m_pD3DDev) {
- m_BackbufferType = pp.BackBufferFormat;
- }
+ m_DisplayType = d3ddm.Format;
+ m_BackbufferType = pp.BackBufferFormat;
}
if (m_pD3DDev && s.m_RenderSettings.iVMR9FullscreenGUISupport && !m_bHighColorResolution) {
m_pD3DDev->SetDialogBoxMode(true);
@@ -843,38 +862,44 @@ HRESULT CDX9AllocatorPresenter::CreateDevice(CString &_Error)
pp.SwapEffect = D3DSWAPEFFECT_COPY;
pp.Flags = D3DPRESENTFLAG_VIDEO;
pp.BackBufferCount = 1;
- pp.BackBufferWidth = m_ScreenSize.cx;
- pp.BackBufferHeight = m_ScreenSize.cy;
- m_BackbufferType = m_DisplayType;
- if (m_bHighColorResolution) {
- m_BackbufferType = D3DFMT_A2R10G10B10;
- pp.BackBufferFormat = D3DFMT_A2R10G10B10;
- }
if (bCompositionEnabled || m_bAlternativeVSync) {
// Desktop composition takes care of the VSYNC
pp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
- } else {
- pp.PresentationInterval = D3DPRESENT_INTERVAL_ONE;
}
// if(m_fVMRSyncFix = GetRenderersData()->m_s.fVMRSyncFix)
// pp.Flags |= D3DPRESENTFLAG_LOCKABLE_BACKBUFFER;
- m_CurrentAdapter = GetAdapter(m_pD3D, true);
if (m_pD3DEx) {
+ m_pD3DEx->GetAdapterDisplayModeEx(m_CurrentAdapter, &DisplayMode, NULL);
+ m_ScreenSize.SetSize(DisplayMode.Width, DisplayMode.Height);
+ m_RefreshRate = DisplayMode.RefreshRate;
+ pp.BackBufferWidth = m_ScreenSize.cx;
+ pp.BackBufferHeight = m_ScreenSize.cy;
+
hr = m_pD3DEx->CreateDeviceEx(
m_CurrentAdapter, D3DDEVTYPE_HAL, m_hWnd,
GetVertexProcessing() | D3DCREATE_FPU_PRESERVE | D3DCREATE_MULTITHREADED | D3DCREATE_ENABLE_PRESENTSTATS, //D3DCREATE_MANAGED
&pp, NULL, &m_pD3DDevEx);
if (m_pD3DDevEx) {
m_pD3DDev = m_pD3DDevEx;
+ m_DisplayType = DisplayMode.Format;
}
- } else {
+ }
+ if (!m_pD3DDev) {
+ m_pD3D->GetAdapterDisplayMode(m_CurrentAdapter, &d3ddm);
+ m_ScreenSize.SetSize(d3ddm.Width, d3ddm.Height);
+ m_RefreshRate = d3ddm.RefreshRate;
+ pp.BackBufferWidth = m_ScreenSize.cx;
+ pp.BackBufferHeight = m_ScreenSize.cy;
+
hr = m_pD3D->CreateDevice(
m_CurrentAdapter, D3DDEVTYPE_HAL, m_hWnd,
GetVertexProcessing() | D3DCREATE_FPU_PRESERVE | D3DCREATE_MULTITHREADED, //D3DCREATE_MANAGED
&pp, &m_pD3DDev);
+ m_DisplayType = d3ddm.Format;
}
+ m_BackbufferType = pp.BackBufferFormat;
}
while(hr == D3DERR_DEVICELOST) {
@@ -905,12 +930,9 @@ HRESULT CDX9AllocatorPresenter::CreateDevice(CString &_Error)
ZeroMemory(&m_Caps, sizeof(m_Caps));
m_pD3DDev->GetDeviceCaps(&m_Caps);
- // Initialize the rendering engine and detect supported hardware features
+ // Initialize the rendering engine
InitRenderingEngine();
- // Get settings that depend on hardware feature support
- m_bForceInputHighColorResolution = s.m_RenderSettings.iEVRForceInputHighColorResolution && m_bIsEVR && renderersData->m_b10bitSupport;
-
CComPtr<ISubPicProvider> pSubPicProvider;
if(m_pSubPicQueue) {
m_pSubPicQueue->GetSubPicProvider(&pSubPicProvider);
@@ -1016,12 +1038,12 @@ HRESULT CDX9AllocatorPresenter::CreateDevice(CString &_Error)
return S_OK;
}
-HRESULT CDX9AllocatorPresenter::AllocSurfaces(D3DFORMAT Format)
+HRESULT CDX9AllocatorPresenter::AllocSurfaces()
{
CAutoLock cAutoLock(this);
CAutoLock cRenderLock(&m_RenderLock);
- return CreateVideoSurfaces(Format);
+ return CreateVideoSurfaces();
}
void CDX9AllocatorPresenter::DeleteSurfaces()
@@ -1032,19 +1054,6 @@ void CDX9AllocatorPresenter::DeleteSurfaces()
FreeVideoSurfaces();
}
-bool CDX9AllocatorPresenter::SetCurrentDisplayMode()
-{
- D3DDISPLAYMODE d3ddm;
- ZeroMemory(&d3ddm, sizeof(d3ddm));
- if(FAILED(m_pD3D->GetAdapterDisplayMode(m_CurrentAdapter, &d3ddm))) {
- return false;
- }
- m_RefreshRate = d3ddm.RefreshRate;
- m_ScreenSize.SetSize(d3ddm.Width, d3ddm.Height);
- m_DisplayType = d3ddm.Format;
- return true;
-}
-
UINT CDX9AllocatorPresenter::GetAdapter(IDirect3D9* pD3D, bool bCreateDevice)
{
if(m_hWnd == NULL || pD3D == NULL) {
@@ -1506,8 +1515,6 @@ STDMETHODIMP_(bool) CDX9AllocatorPresenter::Paint(bool fAll)
HRESULT hr;
- SetCurrentDisplayMode();
-
m_pD3DDev->BeginScene();
CComPtr<IDirect3DSurface9> pBackBuffer;
@@ -2016,6 +2023,10 @@ void CDX9AllocatorPresenter::DrawStats()
strText += "FullFP ";
}
+ if (m_bHalfFloatingPointProcessing) {
+ strText += "HalfFP ";
+ }
+
if (m_bIsEVR) {
if (m_bHighColorResolution) {
strText += "10bitOut ";
diff --git a/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.h b/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.h
index 6d8bd84a3..d58d28567 100644
--- a/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.h
+++ b/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.h
@@ -2,7 +2,7 @@
* $Id$
*
* (C) 2003-2006 Gabest
- * (C) 2006-2010 see AUTHORS
+ * (C) 2006-2011 see AUTHORS
*
* This file is part of mplayerc.
*
@@ -104,7 +104,7 @@ namespace DSObjects
bool SettingsNeedResetDevice();
virtual HRESULT CreateDevice(CString &_Error);
- virtual HRESULT AllocSurfaces(D3DFORMAT Format = D3DFMT_A8R8G8B8);
+ virtual HRESULT AllocSurfaces();
virtual void DeleteSurfaces();
// Thread stuff
@@ -196,8 +196,6 @@ namespace DSObjects
double m_DetectedScanlineTimePrim;
double m_DetectedScanlinesPerFrame;
- bool SetCurrentDisplayMode();
-
double GetRefreshRate() {
if (m_DetectedRefreshRate) {
return m_DetectedRefreshRate;
diff --git a/src/filters/renderer/VideoRenderers/DX9RenderingEngine.cpp b/src/filters/renderer/VideoRenderers/DX9RenderingEngine.cpp
index 7c34f1703..7450e7e09 100644
--- a/src/filters/renderer/VideoRenderers/DX9RenderingEngine.cpp
+++ b/src/filters/renderer/VideoRenderers/DX9RenderingEngine.cpp
@@ -1,7 +1,7 @@
/*
* $Id$
*
- * (C) 2006-2010 see AUTHORS
+ * (C) 2006-2011 see AUTHORS
*
* This file is part of mplayerc.
*
@@ -64,7 +64,7 @@ static void AdjustQuad(MYD3DVERTEX<texcoords>* v, double dx, double dy)
}
template<int texcoords>
-static HRESULT TextureBlt(IDirect3DDevice9* pD3DDev, MYD3DVERTEX<texcoords> v[4], D3DTEXTUREFILTERTYPE filter = D3DTEXF_LINEAR)
+static HRESULT TextureBlt(IDirect3DDevice9* pD3DDev, MYD3DVERTEX<texcoords> v[4], D3DTEXTUREFILTERTYPE filter)
{
if(!pD3DDev) {
return E_POINTER;
@@ -115,7 +115,7 @@ static HRESULT TextureBlt(IDirect3DDevice9* pD3DDev, MYD3DVERTEX<texcoords> v[4]
for(int i = 0; i < texcoords; i++) {
hr = pD3DDev->SetSamplerState(i, D3DSAMP_MAGFILTER, filter);
hr = pD3DDev->SetSamplerState(i, D3DSAMP_MINFILTER, filter);
- hr = pD3DDev->SetSamplerState(i, D3DSAMP_MIPFILTER, filter);
+ hr = pD3DDev->SetSamplerState(i, D3DSAMP_MIPFILTER, D3DTEXF_NONE);
hr = pD3DDev->SetSamplerState(i, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP);
hr = pD3DDev->SetSamplerState(i, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP);
@@ -161,39 +161,7 @@ CDX9RenderingEngine::CDX9RenderingEngine(HWND hWnd, HRESULT& hr, CString *_pErro
void CDX9RenderingEngine::InitRenderingEngine()
{
- HRESULT hr;
- CRenderersData* renderersData = GetRenderersData();
-
- // Detect supported StrechRect filter
- m_StretchRectFilter = D3DTEXF_NONE;
- if((m_Caps.StretchRectFilterCaps&D3DPTFILTERCAPS_MINFLINEAR)
- && (m_Caps.StretchRectFilterCaps&D3DPTFILTERCAPS_MAGFLINEAR)) {
- m_StretchRectFilter = D3DTEXF_LINEAR;
- }
-
- // Detect FP16 support
- renderersData->m_bFP16Support = true;
-
- hr = m_pD3D->CheckDeviceFormat(m_CurrentAdapter, D3DDEVTYPE_HAL, m_DisplayType, D3DUSAGE_DYNAMIC, D3DRTYPE_TEXTURE, D3DFMT_A16B16G16R16F);
- renderersData->m_bFP16Support &= SUCCEEDED(hr);
- hr = m_pD3D->CheckDeviceFormat(m_CurrentAdapter, D3DDEVTYPE_HAL, m_DisplayType, D3DUSAGE_RENDERTARGET, D3DRTYPE_TEXTURE, D3DFMT_A16B16G16R16F);
- renderersData->m_bFP16Support &= SUCCEEDED(hr);
- hr = m_pD3D->CheckDeviceFormat(m_CurrentAdapter, D3DDEVTYPE_HAL, m_DisplayType, D3DUSAGE_QUERY_FILTER, D3DRTYPE_TEXTURE, D3DFMT_A16B16G16R16F);
- renderersData->m_bFP16Support &= SUCCEEDED(hr);
- hr = m_pD3D->CheckDeviceFormat(m_CurrentAdapter, D3DDEVTYPE_HAL, m_DisplayType, D3DUSAGE_DYNAMIC, D3DRTYPE_VOLUMETEXTURE, D3DFMT_A16B16G16R16F);
- renderersData->m_bFP16Support &= SUCCEEDED(hr);
- hr = m_pD3D->CheckDeviceFormat(m_CurrentAdapter, D3DDEVTYPE_HAL, m_DisplayType, D3DUSAGE_QUERY_FILTER, D3DRTYPE_VOLUMETEXTURE, D3DFMT_A16B16G16R16F);
- renderersData->m_bFP16Support &= SUCCEEDED(hr);
-
- // Detect 10-bit support
- renderersData->m_b10bitSupport = true;
-
- hr = m_pD3D->CheckDeviceFormat(m_CurrentAdapter, D3DDEVTYPE_HAL, m_DisplayType, D3DUSAGE_DYNAMIC, D3DRTYPE_TEXTURE, D3DFMT_A2R10G10B10);
- renderersData->m_b10bitSupport &= SUCCEEDED(hr);
- hr = m_pD3D->CheckDeviceFormat(m_CurrentAdapter, D3DDEVTYPE_HAL, m_DisplayType, D3DUSAGE_RENDERTARGET, D3DRTYPE_TEXTURE, D3DFMT_A2R10G10B10);
- renderersData->m_b10bitSupport &= SUCCEEDED(hr);
- hr = m_pD3D->CheckDeviceFormat(m_CurrentAdapter, D3DDEVTYPE_HAL, m_DisplayType, D3DUSAGE_QUERY_FILTER, D3DRTYPE_TEXTURE, D3DFMT_A2R10G10B10);
- renderersData->m_b10bitSupport &= SUCCEEDED(hr);
+ m_StretchRectFilter = D3DTEXF_LINEAR;// eliminate this chain ASAP
// Initialize the pixel shader compiler
m_pPSC.Attach(DNew CPixelShaderCompiler(m_pD3DDev, true));
@@ -202,7 +170,6 @@ void CDX9RenderingEngine::InitRenderingEngine()
m_BicubicA = 0;
m_bFinalPass = false;
- m_bFullFloatingPointProcessing = false;
m_bColorManagement = false;
}
@@ -233,7 +200,7 @@ void CDX9RenderingEngine::CleanupRenderingEngine()
}
}
-HRESULT CDX9RenderingEngine::CreateVideoSurfaces(D3DFORMAT format)
+HRESULT CDX9RenderingEngine::CreateVideoSurfaces()
{
HRESULT hr;
CRenderersSettings& settings = GetRenderersSettings();
@@ -246,15 +213,13 @@ HRESULT CDX9RenderingEngine::CreateVideoSurfaces(D3DFORMAT format)
m_pTemporaryVideoTextures[i] = NULL;
}
- m_SurfaceType = format;
-
if (settings.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE2D || settings.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D) {
int nTexturesNeeded = settings.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D ? m_nNbDXSurface : 1;
for (int i = 0; i < nTexturesNeeded; i++) {
if(FAILED(hr = m_pD3DDev->CreateTexture(
m_NativeVideoSize.cx, m_NativeVideoSize.cy, 1,
- D3DUSAGE_RENDERTARGET, format,
+ D3DUSAGE_RENDERTARGET, m_SurfaceType,
D3DPOOL_DEFAULT, &m_pVideoTexture[i], NULL))) {
return hr;
}
@@ -278,7 +243,7 @@ HRESULT CDX9RenderingEngine::CreateVideoSurfaces(D3DFORMAT format)
if (FAILED(hr = m_pD3DDev->CreateOffscreenPlainSurface(
m_NativeVideoSize.cx, m_NativeVideoSize.cy,
- format,
+ m_SurfaceType,
D3DPOOL_DEFAULT, &m_pVideoSurface[m_nCurSurface], NULL))) {
return hr;
}
@@ -545,19 +510,8 @@ HRESULT CDX9RenderingEngine::InitTemporaryVideoTextures(int count)
for (int i = 0; i < count; i++) {
if (m_pTemporaryVideoTextures[i] == NULL) {
- D3DFORMAT format;
- if (m_bFullFloatingPointProcessing) {
- format = D3DFMT_A16B16G16R16F;
- } else {
- if (m_bHighColorResolution || m_bForceInputHighColorResolution) {
- format = D3DFMT_A2R10G10B10;
- } else {
- format = D3DFMT_A8R8G8B8;
- }
- }
-
hr = m_pD3DDev->CreateTexture(
- m_NativeVideoSize.cx, m_NativeVideoSize.cy, 1, D3DUSAGE_RENDERTARGET, format,
+ m_NativeVideoSize.cx, m_NativeVideoSize.cy, 1, D3DUSAGE_RENDERTARGET, m_SurfaceType,
D3DPOOL_DEFAULT, &m_pTemporaryVideoTextures[i], NULL);
if (FAILED(hr)) {
@@ -604,20 +558,8 @@ HRESULT CDX9RenderingEngine::InitTemporaryScreenSpaceTextures(int count)
if (m_pTemporaryScreenSpaceTextures[i] == NULL) {
m_TemporaryScreenSpaceTextureSize = CSize(min(m_ScreenSize.cx, (int)m_Caps.MaxTextureWidth),
min(max(m_ScreenSize.cy, m_NativeVideoSize.cy), (int)m_Caps.MaxTextureHeight));
-
- D3DFORMAT format;
- if (m_bFullFloatingPointProcessing) {
- format = D3DFMT_A16B16G16R16F;
- } else {
- if (m_bHighColorResolution || m_bForceInputHighColorResolution) {
- format = D3DFMT_A2R10G10B10;
- } else {
- format = D3DFMT_A8R8G8B8;
- }
- }
-
hr = m_pD3DDev->CreateTexture(
- m_TemporaryScreenSpaceTextureSize.cx, m_TemporaryScreenSpaceTextureSize.cy, 1, D3DUSAGE_RENDERTARGET, format,
+ m_TemporaryScreenSpaceTextureSize.cx, m_TemporaryScreenSpaceTextureSize.cy, 1, D3DUSAGE_RENDERTARGET, m_SurfaceType,
D3DPOOL_DEFAULT, &m_pTemporaryScreenSpaceTextures[i], NULL);
if (FAILED(hr)) {
@@ -981,7 +923,6 @@ HRESULT CDX9RenderingEngine::InitFinalPass()
CRenderersData* data = GetRenderersData();
// Check whether the final pass must be initialized
- bool bFullFloatingPointProcessing = settings.m_RenderSettings.iVMR9FullFloatingPointProcessing;
bool bColorManagement = settings.m_RenderSettings.iVMR9ColorManagementEnable;
VideoSystem inputVideoSystem = static_cast<VideoSystem>(settings.m_RenderSettings.iVMR9ColorManagementInput);
AmbientLight ambientLight = static_cast<AmbientLight>(settings.m_RenderSettings.iVMR9ColorManagementAmbientLight);
@@ -989,8 +930,7 @@ HRESULT CDX9RenderingEngine::InitFinalPass()
bool bInitRequired = false;
- if ((m_bFullFloatingPointProcessing != bFullFloatingPointProcessing) ||
- (m_bColorManagement != bColorManagement)) {
+ if (m_bColorManagement != bColorManagement) {
bInitRequired = true;
}
@@ -1016,15 +956,13 @@ HRESULT CDX9RenderingEngine::InitFinalPass()
}
// Update the settings
- m_bFullFloatingPointProcessing = bFullFloatingPointProcessing;
m_bColorManagement = bColorManagement;
m_InputVideoSystem = inputVideoSystem;
m_AmbientLight = ambientLight;
m_RenderingIntent = renderingIntent;
// Check whether the final pass is required
- m_bFinalPass = bFullFloatingPointProcessing || bColorManagement ||
- (m_bForceInputHighColorResolution && !m_bHighColorResolution);
+ m_bFinalPass = bColorManagement || (m_bForceInputHighColorResolution && !m_bHighColorResolution);
if (!m_bFinalPass) {
return S_OK;
@@ -1177,7 +1115,7 @@ HRESULT CDX9RenderingEngine::InitFinalPass()
}
int quantization;
- if (m_bHighColorResolution && (m_DisplayType == D3DFMT_A2R10G10B10 || m_DisplayType == D3DFMT_A2B10G10R10)) {
+ if (m_DisplayType == D3DFMT_A2R10G10B10) {
quantization = 1023; // 10-bit
} else {
quantization = 255; // 8-bit
@@ -1291,8 +1229,8 @@ HRESULT CDX9RenderingEngine::CreateIccProfileLut(TCHAR* profilePath, float* lut3
// Set the input white point. It's D65 in all cases.
cmsCIExyY whitePoint;
- whitePoint.x = 0.3127;
- whitePoint.y = 0.3290;
+ whitePoint.x = 0.31271;
+ whitePoint.y = 0.32902;
whitePoint.Y = 1.0;
// Set the input primaries
@@ -1452,12 +1390,19 @@ HRESULT CDX9RenderingEngine::FinalPass(IDirect3DTexture9* pTexture)
hr = m_pD3DDev->SetPixelShader(m_pFinalPixelShader);
// Set sampler: image
+ hr = m_pD3DDev->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_POINT);
+ hr = m_pD3DDev->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_POINT);
+ hr = m_pD3DDev->SetSamplerState(0, D3DSAMP_MIPFILTER, D3DTEXF_NONE);
+
+ hr = m_pD3DDev->SetSamplerState(0, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP);
+ hr = m_pD3DDev->SetSamplerState(0, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP);
+
hr = m_pD3DDev->SetTexture(0, pTexture);
// Set sampler: ditherMap
hr = m_pD3DDev->SetSamplerState(1, D3DSAMP_MAGFILTER, D3DTEXF_POINT);
hr = m_pD3DDev->SetSamplerState(1, D3DSAMP_MINFILTER, D3DTEXF_POINT);
- hr = m_pD3DDev->SetSamplerState(1, D3DSAMP_MIPFILTER, D3DTEXF_POINT);
+ hr = m_pD3DDev->SetSamplerState(1, D3DSAMP_MIPFILTER, D3DTEXF_NONE);
hr = m_pD3DDev->SetSamplerState(1, D3DSAMP_ADDRESSU, D3DTADDRESS_WRAP);
hr = m_pD3DDev->SetSamplerState(1, D3DSAMP_ADDRESSV, D3DTADDRESS_WRAP);
@@ -1467,7 +1412,7 @@ HRESULT CDX9RenderingEngine::FinalPass(IDirect3DTexture9* pTexture)
if (m_bColorManagement) {
hr = m_pD3DDev->SetSamplerState(2, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
hr = m_pD3DDev->SetSamplerState(2, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
- hr = m_pD3DDev->SetSamplerState(2, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR);
+ hr = m_pD3DDev->SetSamplerState(2, D3DSAMP_MIPFILTER, D3DTEXF_NONE);
hr = m_pD3DDev->SetSamplerState(2, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP);
hr = m_pD3DDev->SetSamplerState(2, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP);
@@ -1517,7 +1462,7 @@ HRESULT CDX9RenderingEngine::TextureCopy(IDirect3DTexture9* pTexture)
hr = m_pD3DDev->SetTexture(0, pTexture);
- return TextureBlt(m_pD3DDev, v, D3DTEXF_LINEAR);
+ return TextureBlt(m_pD3DDev, v, D3DTEXF_POINT);
}
bool CDX9RenderingEngine::ClipToSurface(IDirect3DSurface9* pSurface, CRect& s, CRect& d)
@@ -1658,9 +1603,9 @@ HRESULT CDX9RenderingEngine::AlphaBlt(RECT* pSrc, RECT* pDst, IDirect3DTexture9*
hr = m_pD3DDev->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
hr = m_pD3DDev->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
- hr = m_pD3DDev->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
- hr = m_pD3DDev->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
- hr = m_pD3DDev->SetSamplerState(0, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR);
+ hr = m_pD3DDev->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_POINT);
+ hr = m_pD3DDev->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_POINT);
+ hr = m_pD3DDev->SetSamplerState(0, D3DSAMP_MIPFILTER, D3DTEXF_NONE);
hr = m_pD3DDev->SetSamplerState(0, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP);
hr = m_pD3DDev->SetSamplerState(0, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP);
diff --git a/src/filters/renderer/VideoRenderers/DX9RenderingEngine.h b/src/filters/renderer/VideoRenderers/DX9RenderingEngine.h
index f90a03a81..38ffe2a27 100644
--- a/src/filters/renderer/VideoRenderers/DX9RenderingEngine.h
+++ b/src/filters/renderer/VideoRenderers/DX9RenderingEngine.h
@@ -1,7 +1,7 @@
/*
* $Id$
*
- * (C) 2006-2010 see AUTHORS
+ * (C) 2006-2011 see AUTHORS
*
* This file is part of mplayerc.
*
@@ -67,6 +67,7 @@ namespace DSObjects
CComPtr<IDirect3DSurface9> m_pVideoSurface[MAX_VIDEO_SURFACES];
bool m_bFullFloatingPointProcessing;
+ bool m_bHalfFloatingPointProcessing;
bool m_bColorManagement;
CDX9RenderingEngine(HWND hWnd, HRESULT& hr, CString *_pError);
@@ -74,7 +75,7 @@ namespace DSObjects
void InitRenderingEngine();
void CleanupRenderingEngine();
- HRESULT CreateVideoSurfaces(D3DFORMAT format);
+ HRESULT CreateVideoSurfaces();
void FreeVideoSurfaces();
HRESULT RenderVideo(IDirect3DSurface9* pRenderTarget, const CRect& srcRect, const CRect& destRect);
diff --git a/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.cpp b/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.cpp
index 58f143ca3..10cb71e1c 100644
--- a/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.cpp
+++ b/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.cpp
@@ -1,7 +1,7 @@
/*
* $Id$
*
- * (C) 2006-2010 see AUTHORS
+ * (C) 2006-2011 see AUTHORS
*
* This file is part of mplayerc.
*
@@ -1082,7 +1082,7 @@ HRESULT CEVRAllocatorPresenter::GetMediaTypeMerit(IMFMediaType* pType, int* pMer
// We only support RGB mixer output surface formats
switch (Format) {
case D3DFMT_A2R10G10B10:
- if (m_bHighColorResolution || m_bForceInputHighColorResolution || m_bFullFloatingPointProcessing) {
+ if (m_bHighColorResolution || m_bForceInputHighColorResolution || m_bHalfFloatingPointProcessing || m_bFullFloatingPointProcessing) {
*pMerit = 950;
} else {
*pMerit = 650;
@@ -1090,15 +1090,6 @@ HRESULT CEVRAllocatorPresenter::GetMediaTypeMerit(IMFMediaType* pType, int* pMer
break;
- case D3DFMT_A2B10G10R10:
- if (m_bHighColorResolution || m_bForceInputHighColorResolution || m_bFullFloatingPointProcessing) {
- *pMerit = 900;
- } else {
- *pMerit = 600;
- }
-
- break;
-
case D3DFMT_X8R8G8B8:
if (m_bForceInputHighColorResolution) {
*pMerit = 800;
@@ -1117,23 +1108,6 @@ HRESULT CEVRAllocatorPresenter::GetMediaTypeMerit(IMFMediaType* pType, int* pMer
break;
- case D3DFMT_X8B8G8R8:
- if (m_bForceInputHighColorResolution) {
- *pMerit = 700;
- } else {
- *pMerit = 750;
- }
-
- break;
-
- case D3DFMT_A8B8G8R8:
- if (m_bForceInputHighColorResolution) {
- *pMerit = 750;
- } else {
- *pMerit = 700;
- }
- break;
-
default:
// Unsupported format
*pMerit = 0;
@@ -1651,13 +1625,7 @@ STDMETHODIMP CEVRAllocatorPresenter::InitializeDevice(IMFMediaType* pMediaType)
}
if (SUCCEEDED(hr)) {
- if (m_bForceInputHighColorResolution)
- // May crash or not work correctly!
- {
- hr = AllocSurfaces(D3DFMT_A2R10G10B10);
- } else {
- hr = AllocSurfaces(Format);
- }
+ hr = AllocSurfaces();
}
if (SUCCEEDED(hr)) {
diff --git a/src/filters/renderer/VideoRenderers/RenderersSettings.cpp b/src/filters/renderer/VideoRenderers/RenderersSettings.cpp
index b7267e574..a5c3c7833 100644
--- a/src/filters/renderer/VideoRenderers/RenderersSettings.cpp
+++ b/src/filters/renderer/VideoRenderers/RenderersSettings.cpp
@@ -39,6 +39,7 @@ void CRenderersSettings::CRendererSettingsShared::SetDefault()
iVMR9FullscreenGUISupport = 0;
iVMR9VSync = 1;
iVMR9FullFloatingPointProcessing = 0;
+ iVMR9HalfFloatingPointProcessing = 0;
iVMR9ColorManagementEnable = 0;
iVMR9ColorManagementInput = VIDEO_SYSTEM_UNKNOWN;
iVMR9ColorManagementAmbientLight = AMBIENT_LIGHT_BRIGHT;
@@ -63,6 +64,7 @@ void CRenderersSettings::CRendererSettingsShared::SetOptimal()
iVMR9VSyncAccurate = 1;
iVMR9VSync = 1;
iVMR9FullFloatingPointProcessing = 1;
+ iVMR9HalfFloatingPointProcessing = 0;
iVMR9ColorManagementEnable = 0;
iVMR9ColorManagementInput = VIDEO_SYSTEM_UNKNOWN;
iVMR9ColorManagementAmbientLight = AMBIENT_LIGHT_BRIGHT;
diff --git a/src/filters/renderer/VideoRenderers/RenderersSettings.h b/src/filters/renderer/VideoRenderers/RenderersSettings.h
index e5b19f015..3b94bd685 100644
--- a/src/filters/renderer/VideoRenderers/RenderersSettings.h
+++ b/src/filters/renderer/VideoRenderers/RenderersSettings.h
@@ -86,6 +86,7 @@ public:
bool iVMR9FullscreenGUISupport;
bool iVMR9VSync;
bool iVMR9FullFloatingPointProcessing;
+ bool iVMR9HalfFloatingPointProcessing;
bool iVMR9ColorManagementEnable;
int iVMR9ColorManagementInput;
int iVMR9ColorManagementAmbientLight;
diff --git a/src/filters/renderer/VideoRenderers/SyncRenderer.cpp b/src/filters/renderer/VideoRenderers/SyncRenderer.cpp
index 9a1a35eab..6a84b881a 100644
--- a/src/filters/renderer/VideoRenderers/SyncRenderer.cpp
+++ b/src/filters/renderer/VideoRenderers/SyncRenderer.cpp
@@ -2,7 +2,7 @@
* $Id$
*
* (C) 2003-2006 Gabest
-* (C) 2006-2010 see AUTHORS
+* (C) 2006-2011 see AUTHORS
*
* This file is part of mplayerc.
*
@@ -271,7 +271,7 @@ HRESULT CBaseAP::TextureBlt(IDirect3DDevice9* pD3DDev, MYD3DVERTEX<texcoords> v[
for(int i = 0; i < texcoords; i++) {
hr = pD3DDev->SetSamplerState(i, D3DSAMP_MAGFILTER, filter);
hr = pD3DDev->SetSamplerState(i, D3DSAMP_MINFILTER, filter);
- hr = pD3DDev->SetSamplerState(i, D3DSAMP_MIPFILTER, filter);
+ hr = pD3DDev->SetSamplerState(i, D3DSAMP_MIPFILTER, D3DTEXF_NONE);
hr = pD3DDev->SetSamplerState(i, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP);
hr = pD3DDev->SetSamplerState(i, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP);
@@ -1162,7 +1162,7 @@ HRESULT CBaseAP::TextureCopy(IDirect3DTexture9* pTexture)
v[i].y -= 0.5;
}
hr = m_pD3DDev->SetTexture(0, pTexture);
- return TextureBlt(m_pD3DDev, v, D3DTEXF_LINEAR);
+ return TextureBlt(m_pD3DDev, v, D3DTEXF_POINT);
}
HRESULT CBaseAP::DrawRect(DWORD _Color, DWORD _Alpha, const CRect &_Rect)
@@ -1409,9 +1409,9 @@ HRESULT CBaseAP::AlphaBlt(RECT* pSrc, RECT* pDst, IDirect3DTexture9* pTexture)
hr = m_pD3DDev->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
hr = m_pD3DDev->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
- hr = m_pD3DDev->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
- hr = m_pD3DDev->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
- hr = m_pD3DDev->SetSamplerState(0, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR);
+ hr = m_pD3DDev->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_POINT);
+ hr = m_pD3DDev->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_POINT);
+ hr = m_pD3DDev->SetSamplerState(0, D3DSAMP_MIPFILTER, D3DTEXF_NONE);
hr = m_pD3DDev->SetSamplerState(0, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP);
hr = m_pD3DDev->SetSamplerState(0, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP);
@@ -1968,34 +1968,30 @@ void CBaseAP::DrawStats()
OffsetRect(&rc, 0, TextHeight);
if (pApp->m_fDisplayStats == 1) {
- strText.Format(L"Frame cycle: %.3f ms [%.3f ms, %.3f ms] | Frame rate: %.3f fps", m_dFrameCycle, m_pGenlock->minFrameCycle, m_pGenlock->maxFrameCycle, m_fps);
+ strText.Format(L"Frame cycle : %.3f ms [%.3f ms, %.3f ms] Actual %+5.3f ms [%+.3f ms, %+.3f ms]", m_dFrameCycle, m_pGenlock->minFrameCycle, m_pGenlock->maxFrameCycle, m_fJitterMean / 10000.0, (double(llMinJitter)/10000.0), (double(llMaxJitter)/10000.0));
DrawText(rc, strText, 1);
OffsetRect(&rc, 0, TextHeight);
- strText.Format(L"Measured closest match display cycle: %.3f ms | Measured base display cycle: %.3f ms", m_dOptimumDisplayCycle, m_dEstRefreshCycle);
+ strText.Format(L"Display cycle: Measured closest match %.3f ms Measured base %.3f ms", m_dOptimumDisplayCycle, m_dEstRefreshCycle);
DrawText(rc, strText, 1);
OffsetRect(&rc, 0, TextHeight);
- strText.Format(L"Display cycle - frame cycle mismatch: %.3f %%", 100 * m_dCycleDifference);
+ strText.Format(L"Frame rate : %.3f fps Actual frame rate: %.3f fps", m_fps, 10000000.0 / m_fJitterMean);
DrawText(rc, strText, 1);
OffsetRect(&rc, 0, TextHeight);
- strText.Format(L"Actual frame cycle: %+5.3f ms [%+.3f ms, %+.3f ms] | Actual frame rate: %.3f fps", m_fJitterMean / 10000.0, (double(llMinJitter)/10000.0), (double(llMaxJitter)/10000.0), 10000000.0 / m_fJitterMean);
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
-
- strText.Format(L"Display cycle from Windows: %.3f ms | Display refresh rate from Windows: %d Hz", m_dD3DRefreshCycle, m_uD3DRefreshRate);
+ strText.Format(L"Windows : Display cycle %.3f ms Display refresh rate %d Hz", m_dD3DRefreshCycle, m_uD3DRefreshRate);
DrawText(rc, strText, 1);
OffsetRect(&rc, 0, TextHeight);
if (m_pGenlock->powerstripTimingExists) {
- strText.Format(L"Display cycle from Powerstrip: %.3f ms | Display refresh rate from Powerstrip: %.3f Hz", 1000.0 / m_pGenlock->curDisplayFreq, m_pGenlock->curDisplayFreq);
+ strText.Format(L"Powerstrip : Display cycle %.3f ms Display refresh rate %.3f Hz", 1000.0 / m_pGenlock->curDisplayFreq, m_pGenlock->curDisplayFreq);
DrawText(rc, strText, 1);
OffsetRect(&rc, 0, TextHeight);
}
if ((m_caps.Caps & D3DCAPS_READ_SCANLINE) == 0) {
- strText.Format(L"Graphics device does not support scan line access. No sync is possible");
+ strText.Format(L"Scan line err: Graphics device does not support scan line access. No sync is possible");
DrawText(rc, strText, 1);
OffsetRect(&rc, 0, TextHeight);
}
@@ -2034,62 +2030,52 @@ void CBaseAP::DrawStats()
}
#endif
- strText.Format(L"Video resolution: %d x %d | Aspect ratio: %d : %d", m_NativeVideoSize.cx, m_NativeVideoSize.cy, m_AspectRatio.cx, m_AspectRatio.cy);
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
-
- strText.Format(L"Display resolution: %d x %d", m_ScreenSize.cx, m_ScreenSize.cy);
+ strText.Format(L"Video size : %d x %d (AR = %d : %d) Display resolution %d x %d ", m_NativeVideoSize.cx, m_NativeVideoSize.cy, m_AspectRatio.cx, m_AspectRatio.cy, m_ScreenSize.cx, m_ScreenSize.cy);
DrawText(rc, strText, 1);
OffsetRect(&rc, 0, TextHeight);
if (s.m_RenderSettings.bSynchronizeDisplay || s.m_RenderSettings.bSynchronizeVideo) {
if (s.m_RenderSettings.bSynchronizeDisplay && !m_pGenlock->PowerstripRunning()) {
- strText.Format(L"PowerStrip is not running. No display sync is possible.");
+ strText.Format(L"Sync error : PowerStrip is not running. No display sync is possible.");
DrawText(rc, strText, 1);
OffsetRect(&rc, 0, TextHeight);
} else {
- strText.Format(L"Sync adjustment: %d | # of adjustments: %d", m_pGenlock->adjDelta, (m_pGenlock->clockAdjustmentsMade + m_pGenlock->displayAdjustmentsMade) / 2);
+ strText.Format(L"Sync adjust : %d | # of adjustments: %d", m_pGenlock->adjDelta, (m_pGenlock->clockAdjustmentsMade + m_pGenlock->displayAdjustmentsMade) / 2);
DrawText(rc, strText, 1);
OffsetRect(&rc, 0, TextHeight);
}
}
}
- strText.Format(L"Average sync offset: %3.1f ms [%.1f ms, %.1f ms] | Target sync offset: %3.1f ms", m_pGenlock->syncOffsetAvg, m_pGenlock->minSyncOffset, m_pGenlock->maxSyncOffset, s.m_RenderSettings.fTargetSyncOffset);
+ strText.Format(L"Sync offset : Average %3.1f ms [%.1f ms, %.1f ms] Target %3.1f ms", m_pGenlock->syncOffsetAvg, m_pGenlock->minSyncOffset, m_pGenlock->maxSyncOffset, s.m_RenderSettings.fTargetSyncOffset);
DrawText(rc, strText, 1);
OffsetRect(&rc, 0, TextHeight);
- if (pApp->m_fDisplayStats < 3) {
- strText.Format(L"# of sync glitches: %d", m_uSyncGlitches);
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
-
- strText.Format(L"# of frames dropped: %d", m_pcFramesDropped);
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
- }
+ strText.Format(L"Sync status : glitches %d, display-frame cycle mismatch: %7.3f %%, dropped frames %d", m_uSyncGlitches, 100 * m_dCycleDifference, m_pcFramesDropped);
+ DrawText(rc, strText, 1);
+ OffsetRect(&rc, 0, TextHeight);
if (pApp->m_fDisplayStats == 1) {
if (m_pAudioStats && s.m_RenderSettings.bSynchronizeVideo) {
- strText.Format(L"Audio lag: %3d ms [%d ms, %d ms] | %s", m_lAudioLag, m_lAudioLagMin, m_lAudioLagMax, (m_lAudioSlaveMode == 4) ? _T("Audio renderer is matching rate (for analog sound output)") : _T("Audio renderer is not matching rate"));
+ strText.Format(L"Audio lag : %3d ms [%d ms, %d ms] | %s", m_lAudioLag, m_lAudioLagMin, m_lAudioLagMax, (m_lAudioSlaveMode == 4) ? _T("Audio renderer is matching rate (for analog sound output)") : _T("Audio renderer is not matching rate"));
DrawText(rc, strText, 1);
OffsetRect(&rc, 0, TextHeight);
}
- strText.Format(L"Sample waiting time: %d ms", m_lNextSampleWait);
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ strText.Format(L"Sample time : waiting %3d ms", m_lNextSampleWait);
if (s.m_RenderSettings.bSynchronizeNearest) {
- strText.Format(L"Sample paint time correction: %2d ms | Hysteresis: %d", m_lShiftToNearest, m_llHysteresis /10000);
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ CString temp;
+ temp.Format(L" paint time correction: %3d ms Hysteresis: %d", m_lShiftToNearest, m_llHysteresis /10000);
+ strText += temp;
}
+ DrawText(rc, strText, 1);
+ OffsetRect(&rc, 0, TextHeight);
- strText.Format(L"Buffered: %3d | Free: %3d | Current surface: %3d", m_nUsedBuffer, m_nDXSurface - m_nUsedBuffer, m_nCurSurface, m_nVMR9Surfaces, m_iVMR9Surface);
+ strText.Format(L"Buffering : Buffered %3d Free %3d Current Surface %3d", m_nUsedBuffer, m_nDXSurface - m_nUsedBuffer, m_nCurSurface, m_nVMR9Surfaces, m_iVMR9Surface);
DrawText(rc, strText, 1);
OffsetRect(&rc, 0, TextHeight);
- strText.Format(L"Settings: ");
+ strText.Format(L"Settings : ");
if (m_bIsFullscreen) {
strText += "D3DFS ";
@@ -2118,11 +2104,11 @@ void CBaseAP::DrawStats()
DrawText(rc, strText, 1);
OffsetRect(&rc, 0, TextHeight);
- strText.Format(L"%s: %s", GetDXVAVersion(), GetDXVADecoderDescription());
+ strText.Format(L"%-13s: %s", GetDXVAVersion(), GetDXVADecoderDescription());
DrawText(rc, strText, 1);
OffsetRect(&rc, 0, TextHeight);
- strText.Format(L"DirectX SDK: %d", GetRenderersData()->GetDXSdkRelease());
+ strText.Format(L"DirectX SDK : %d", GetRenderersData()->GetDXSdkRelease());
DrawText(rc, strText, 1);
OffsetRect(&rc, 0, TextHeight);
@@ -2984,7 +2970,7 @@ HRESULT CSyncAP::SetMediaType(IMFMediaType* pType)
if (SUCCEEDED(hr)) {
strTemp = GetMediaTypeName(pAMMedia->subtype);
strTemp.Replace(L"MEDIASUBTYPE_", L"");
- m_strStatsMsg[MSG_MIXEROUT].Format (L"Mixer output: %s", strTemp);
+ m_strStatsMsg[MSG_MIXEROUT].Format (L"Mixer output : %s", strTemp);
}
pType->FreeRepresentation(FORMAT_VideoInfo2, (void*)pAMMedia);
diff --git a/src/filters/renderer/VideoRenderers/madVRAllocatorPresenter.h b/src/filters/renderer/VideoRenderers/madVRAllocatorPresenter.h
index a8c763324..8b9542f96 100644
--- a/src/filters/renderer/VideoRenderers/madVRAllocatorPresenter.h
+++ b/src/filters/renderer/VideoRenderers/madVRAllocatorPresenter.h
@@ -1,7 +1,7 @@
/*
* $Id$
*
- * (C) 2006-2010 see AUTHORS
+ * (C) 2006-2011 see AUTHORS
*
* This file is part of mplayerc.
*
@@ -23,8 +23,8 @@
#pragma once
#include "AllocatorCommon.h"
-#include "../SubPic/SubPicAllocatorPresenterImpl.h"
-#include "../SubPic/ISubRender.h"
+#include "../../../SubPic/SubPicAllocatorPresenterImpl.h"
+#include "../../../SubPic/ISubRender.h"
namespace DSObjects
{
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/ffcodecs.h b/src/filters/transform/MPCVideoDec/ffmpeg/ffcodecs.h
index 22b6a4130..e64f71913 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/ffcodecs.h
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/ffcodecs.h
@@ -302,11 +302,11 @@ static __inline bool sup_VBR_QUAL(int x)
}
static __inline bool sup_VBR_QUANT(int x)
{
- return (lavc_codec(x) || xvid_codec(x)) && !lossless_codec(x) && x!=CODEC_ID_SNOW;
+ return (lavc_codec(x) || xvid_codec(x)) && !lossless_codec(x);
}
static __inline bool sup_XVID2PASS(int x)
{
- return sup_VBR_QUANT(x) && x!=CODEC_ID_SNOW;
+ return sup_VBR_QUANT(x);
}
static __inline bool sup_LAVC2PASS(int x)
{
@@ -319,7 +319,7 @@ static __inline bool sup_interlace(int x)
}
static __inline bool sup_gray(int x)
{
- return x!=CODEC_ID_LJPEG && x!=CODEC_ID_FFV1 && x!=CODEC_ID_SNOW && !wmv9_codec(x) && !raw_codec(x) && x!=CODEC_ID_DVVIDEO;
+ return x!=CODEC_ID_LJPEG && x!=CODEC_ID_FFV1 && !wmv9_codec(x) && !raw_codec(x) && x!=CODEC_ID_DVVIDEO;
}
static __inline bool sup_globalheader(int x)
{
@@ -335,7 +335,7 @@ static __inline bool sup_packedBitstream(int x)
}
static __inline bool sup_minKeySet(int x)
{
- return x!=CODEC_ID_MJPEG && x!=CODEC_ID_SNOW && !lossless_codec(x) && !wmv9_codec(x) && !raw_codec(x);
+ return x!=CODEC_ID_MJPEG && !lossless_codec(x) && !wmv9_codec(x) && !raw_codec(x);
}
static __inline bool sup_maxKeySet(int x)
{
@@ -359,7 +359,7 @@ static __inline bool sup_lavcme(int x)
}
static __inline bool sup_quantProps(int x)
{
- return !lossless_codec(x) && !wmv9_codec(x) && !raw_codec(x) && x!=CODEC_ID_SNOW;
+ return !lossless_codec(x) && !wmv9_codec(x) && !raw_codec(x);
}
static __inline bool sup_trellisQuant(int x)
{
@@ -375,15 +375,15 @@ static __inline bool sup_lavcOnePass(int x)
}
static __inline bool sup_perFrameQuant(int x)
{
- return !lossless_codec(x) && !wmv9_codec(x) && !raw_codec(x) && x!=CODEC_ID_SNOW;
+ return !lossless_codec(x) && !wmv9_codec(x) && !raw_codec(x);
}
static __inline bool sup_4mv(int x)
{
- return x==CODEC_ID_MPEG4 || x==CODEC_ID_H263 || x==CODEC_ID_H263P || x==CODEC_ID_SNOW;
+ return x==CODEC_ID_MPEG4 || x==CODEC_ID_H263 || x==CODEC_ID_H263P;
}
static __inline bool sup_aspect(int x)
{
- return x==CODEC_ID_MPEG4 || x==CODEC_ID_MPEG1VIDEO || x==CODEC_ID_MPEG2VIDEO || x==CODEC_ID_XVID4;
+ return x==CODEC_ID_MPEG4 || x==CODEC_ID_MPEG1VIDEO || x==CODEC_ID_MPEG2VIDEO;
}
static __inline bool sup_PSNR(int x)
{
@@ -407,7 +407,7 @@ static __inline bool sup_customQuantTables(int x)
}
static __inline bool sup_qpel(int x)
{
- return x==CODEC_ID_MPEG4 || x==CODEC_ID_SNOW || xvid_codec(x);
+ return x==CODEC_ID_MPEG4 || xvid_codec(x);
}
static __inline bool sup_gmc(int x)
{
@@ -415,7 +415,7 @@ static __inline bool sup_gmc(int x)
}
static __inline bool sup_me_mv0(int x)
{
- return sup_lavcme(x) && x!=CODEC_ID_SNOW;
+ return sup_lavcme(x);
}
static __inline bool sup_cbp_rd(int x)
{
@@ -423,7 +423,7 @@ static __inline bool sup_cbp_rd(int x)
}
static __inline bool sup_qns(int x)
{
- return lavc_codec(x) && sup_quantProps(x) && x!=CODEC_ID_MSMPEG4V3 && x!=CODEC_ID_MSMPEG4V2 && x!=CODEC_ID_MSMPEG4V1 && x!=CODEC_ID_WMV1 && x!=CODEC_ID_WMV2 && x!=CODEC_ID_MJPEG && x!=CODEC_ID_SNOW;
+ return lavc_codec(x) && sup_quantProps(x) && x!=CODEC_ID_MSMPEG4V3 && x!=CODEC_ID_MSMPEG4V2 && x!=CODEC_ID_MSMPEG4V1 && x!=CODEC_ID_WMV1 && x!=CODEC_ID_WMV2 && x!=CODEC_ID_MJPEG;
}
static __inline bool sup_threads(int x)
{
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/allcodecs.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/allcodecs.c
index c760fdcb5..a8053a9ae 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/allcodecs.c
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/allcodecs.c
@@ -149,6 +149,7 @@ void avcodec_register_all(void)
//REGISTER_DECODER (WMAV1, wmav1);
//REGISTER_DECODER (WMAV2, wmav2);
//REGISTER_DECODER (WAVPACK, wavpack);
+
//REGISTER_ENCODER (AC3, ac3);
//REGISTER_ENCODER (AC3_FIXED, ac3_fixed);
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/avcodec.h b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/avcodec.h
index 43f308393..03374cfe8 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/avcodec.h
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/avcodec.h
@@ -46,8 +46,8 @@
#include "libavutil/cpu.h"
#define LIBAVCODEC_VERSION_MAJOR 52
-#define LIBAVCODEC_VERSION_MINOR 103
-#define LIBAVCODEC_VERSION_MICRO 1
+#define LIBAVCODEC_VERSION_MINOR 108
+#define LIBAVCODEC_VERSION_MICRO 0
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
@@ -718,6 +718,7 @@ typedef struct AVPanScan{
* that time,\
* the decoder reorders values as needed and sets AVFrame.reordered_opaque\
* to exactly one of the values provided by the user through AVCodecContext.reordered_opaque \
+ * @deprecated in favor of pkt_pts\
* - encoding: unused\
* - decoding: Read by user.\
*/\
@@ -732,13 +733,25 @@ typedef struct AVPanScan{
*/\
void *hwaccel_picture_private;\
\
- /* ffdshow custom code */\
+ /**\
+ * reordered pts from the last AVPacket that has been input into the decoder\
+ * - encoding: unused\
+ * - decoding: Read by user.\
+ */\
+ int64_t pkt_pts;\
+\
+ /**\
+ * dts from the last AVPacket that has been input into the decoder\
+ * - encoding: unused\
+ * - decoding: Read by user.\
+ */\
+ int64_t pkt_dts;\
+\
+ /* ffdshow custom code (begin) */\
int mb_width,mb_height,mb_stride,b8_stride;\
int num_sprite_warping_points,real_sprite_warping_points;\
int play_flags;\
\
- /* ffdshow custom stuff (begin) */\
-\
/**\
* the AVCodecContext which ff_thread_get_buffer() was last called on\
* - encoding: Set by libavcodec.\
@@ -772,7 +785,7 @@ typedef struct AVPanScan{
* - decoding: Set by libavcodec.\
*/\
YCbCr_RGB_MatrixCoefficientsType YCbCr_RGB_matrix_coefficients;
- /* ffdshow custom stuff (end) */
+ /* ffdshow custom code (end) */
#define FF_QSCALE_TYPE_MPEG1 0
@@ -2328,6 +2341,7 @@ typedef struct AVCodecContext {
/**
* opaque 64bit number (generally a PTS) that will be reordered and
* output in AVFrame.reordered_opaque
+ * @deprecated in favor of pkt_pts
* - encoding: unused
* - decoding: Set by user.
*/
@@ -2521,6 +2535,15 @@ typedef struct AVCodecContext {
*/
int slices;
+ /**
+ * Current packet as passed into the decoder, to avoid having
+ * to pass the packet into every function. Currently only valid
+ * inside lavc and get/release_buffer callbacks.
+ * - decoding: set by avcodec_decode_*, read by get_buffer() for setting pkt_pts
+ * - encoding: unused
+ */
+ AVPacket *pkt;
+
/* ffdshow custom stuff (begin) */
/**
* Whether this is a copy of the context which had init() called on it.
@@ -2549,7 +2572,7 @@ typedef struct AVCodecContext {
* - decoding: Set by libavcodec.
*/
int active_thread_type;
-
+
/**
* minimum and maxminum quantizer for I frames. If 0, derived from qmin, i_quant_factor, i_quant_offset
* - encoding: set by user.
@@ -2584,6 +2607,14 @@ typedef struct AVCodecContext {
} AVCodecContext;
/**
+ * AVProfile.
+ */
+typedef struct AVProfile {
+ int profile;
+ const char *name; ///< short name for the profile
+} AVProfile;
+
+/**
* AVHWAccel.
*/
typedef struct AVHWAccel {
@@ -2715,28 +2746,11 @@ typedef struct AVCodec {
uint8_t max_lowres; ///< maximum value for lowres supported by the decoder
/* ffmpeg-mt */
- /**
- * @defgroup framethreading Frame-level threading support functions.
- * @{
- */
- /**
- * If defined, called on thread contexts when they are created.
- * If the codec allocates writable tables in init(), re-allocate them here.
- * priv_data will be set to a copy of the original.
- */
int (*init_thread_copy)(AVCodecContext *);
- /**
- * Copy necessary context variables from a previous thread context to the current one.
- * If not defined, the next thread will start automatically; otherwise, the codec
- * must call ff_thread_finish_setup().
- *
- * dst and src will (rarely) point to the same context, in which case memcpy should be skipped.
- */
int (*update_thread_context)(AVCodecContext *dst, AVCodecContext *src);
- /** @} */
-
- /* this must be at the end of the struct */
+
AVClass *priv_class; ///< AVClass for the private context
+ const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN}
} AVCodec;
/**
@@ -2825,6 +2839,15 @@ AVCodec *avcodec_find_decoder_by_name(const char *name);
void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode);
/**
+ * Return a name for the specified profile, if available.
+ *
+ * @param codec the codec that is searched for the given profile
+ * @param profile the profile value for which a name is requested
+ * @return A name for the profile if found, NULL otherwise.
+ */
+const char *av_get_profile_name(const AVCodec *codec, int profile);
+
+/**
* Set the fields of the given AVCodecContext to default values.
*
* @param s The AVCodecContext of which the fields should be set to default values.
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h264.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h264.c
index d6f9a63f4..f63cd5b1d 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h264.c
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h264.c
@@ -1308,7 +1308,8 @@ static int pred_weight_table(H264Context *h){
h->use_weight= 0;
h->use_weight_chroma= 0;
h->luma_log2_weight_denom= get_ue_golomb(&s->gb);
- h->chroma_log2_weight_denom= get_ue_golomb(&s->gb);
+ if(CHROMA)
+ h->chroma_log2_weight_denom= get_ue_golomb(&s->gb);
luma_def = 1<<h->luma_log2_weight_denom;
chroma_def = 1<<h->chroma_log2_weight_denom;
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/utils.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/utils.c
index 06ffd6b8c..d1dcc426d 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/utils.c
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/utils.c
@@ -328,6 +328,8 @@ int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic){
}
s->internal_buffer_count++;
+ if(s->pkt) pic->pkt_pts= s->pkt->pts;
+ else pic->pkt_pts= AV_NOPTS_VALUE;
pic->reordered_opaque= s->reordered_opaque;
pic->reordered_opaque2= s->reordered_opaque2; /* ffdshow custom code */
pic->reordered_opaque3= s->reordered_opaque3; /* ffdshow custom code */
@@ -467,11 +469,13 @@ int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec)
goto end;
if (codec->priv_data_size > 0) {
+ if(!avctx->priv_data){
avctx->priv_data = av_mallocz(codec->priv_data_size);
if (!avctx->priv_data) {
ret = AVERROR(ENOMEM);
goto end;
}
+ }
} else {
avctx->priv_data = NULL;
}
@@ -583,12 +587,17 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi
*got_picture_ptr= 0;
if((avctx->coded_width||avctx->coded_height) && av_image_check_size(avctx->coded_width, avctx->coded_height, 0, avctx))
return -1;
+
+ avctx->pkt = avpkt;
+
if((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size){
ret = avctx->codec->decode(avctx, picture, got_picture_ptr,
avpkt);
emms_c(); //needed to avoid an emms_c() call before every return;
+ picture->pkt_dts= avpkt->dts;
+
if (*got_picture_ptr)
avctx->frame_number++;
}else
@@ -617,6 +626,8 @@ int attribute_align_arg avcodec_decode_audio3(AVCodecContext *avctx, int16_t *sa
{
int ret;
+ avctx->pkt = avpkt;
+
if((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size){
//FIXME remove the check below _after_ ensuring that all audio check that the available space is enough
if(*frame_size_ptr < AVCODEC_MAX_AUDIO_FRAME_SIZE){
diff --git a/src/filters/transform/VSFilter/DirectVobSubPropPage.cpp b/src/filters/transform/VSFilter/DirectVobSubPropPage.cpp
index 79196273c..cf15ff9a5 100644
--- a/src/filters/transform/VSFilter/DirectVobSubPropPage.cpp
+++ b/src/filters/transform/VSFilter/DirectVobSubPropPage.cpp
@@ -780,9 +780,9 @@ bool CDVSAboutPPage::OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
switch(uMsg) {
case WM_INITDIALOG: {
#ifdef _VSMOD
- SetDlgItemTextA( m_Dlg, IDC_VERSION, "DirectVobSub 2.40."MAKE_STR(MPC_VERSION_REV)"."MAKE_STR(MPC_VERSION_PATCH)" "MAKE_STR(VERSION_ARCH)", MOD\nCopyright 2001-2010 MPC-HC & VSFilterMod Teams" );
+ SetDlgItemTextA( m_Dlg, IDC_VERSION, "DirectVobSub 2.40."MAKE_STR(MPC_VERSION_PATCH)"."MAKE_STR(MPC_VERSION_REV)" "MAKE_STR(VERSION_ARCH)", MOD\nCopyright 2001-2010 MPC-HC & VSFilterMod Teams" );
#else
- SetDlgItemTextA( m_Dlg, IDC_VERSION, "DirectVobSub 2.40."MAKE_STR(MPC_VERSION_REV)"."MAKE_STR(MPC_VERSION_PATCH)" "MAKE_STR(VERSION_ARCH)"\nCopyright 2001-2010 MPC-HC Team" );
+ SetDlgItemTextA( m_Dlg, IDC_VERSION, "DirectVobSub 2.40."MAKE_STR(MPC_VERSION_PATCH)"."MAKE_STR(MPC_VERSION_REV)" "MAKE_STR(VERSION_ARCH)"\nCopyright 2001-2010 MPC-HC Team" );
#endif
}
break;