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

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUnderground78 <underground78@users.sourceforge.net>2012-06-02 02:19:18 +0400
committerUnderground78 <underground78@users.sourceforge.net>2012-06-02 02:19:18 +0400
commit25fce59448efcc47424e20bd8c741b8bfded661b (patch)
tree2b6e1a32ce73044b7f818fc5c72f1dedebf88cd8 /src/filters/transform
parent83e8ee9609a095a311b4158604bbfae50d381d60 (diff)
MPC Video Decoder: Use IsWinVistaOrLater from WinAPIUtils and remove the duplicate function IsVistaOrAbove.
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@4971 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/transform')
-rw-r--r--src/filters/transform/MPCVideoDec/FfmpegContext.cpp27
-rw-r--r--src/filters/transform/MPCVideoDec/FfmpegContext.h1
2 files changed, 4 insertions, 24 deletions
diff --git a/src/filters/transform/MPCVideoDec/FfmpegContext.cpp b/src/filters/transform/MPCVideoDec/FfmpegContext.cpp
index 70831d2e8..6ccde3df2 100644
--- a/src/filters/transform/MPCVideoDec/FfmpegContext.cpp
+++ b/src/filters/transform/MPCVideoDec/FfmpegContext.cpp
@@ -28,8 +28,11 @@
#include <vfwmsgs.h>
#include <sys/timeb.h>
#include <time.h> // for the _time64 workaround
+
#include "FfmpegContext.h"
+extern BOOL IsWinVistaOrLater(); // requires linking with DSUtils which is always the case
+
extern "C" {
#include <ffmpeg/libavcodec/dsputil.h>
#include <ffmpeg/libavcodec/avcodec.h>
@@ -77,28 +80,6 @@ const byte ZZ_SCAN8[64] = {
53, 60, 61, 54, 47, 55, 62, 63
};
-BOOL IsVistaOrAbove()
-{
- //only check once then cache the result
- static BOOL checked = FALSE;
- static BOOL result = FALSE;
- OSVERSIONINFO osver;
-
- if (!checked) {
- checked = TRUE;
-
- osver.dwOSVersionInfoSize = sizeof( OSVERSIONINFO );
-
- if (GetVersionEx( &osver ) &&
- osver.dwPlatformId == VER_PLATFORM_WIN32_NT &&
- (osver.dwMajorVersion >= 6 ) ) {
- result = TRUE;
- }
- }
-
- return result;
-}
-
inline MpegEncContext* GetMpegEncContext(struct AVCodecContext* pAVCtx)
{
Mpeg1Context* s1;
@@ -184,7 +165,7 @@ int FFH264CheckCompatibility(int nWidth, int nHeight, struct AVCodecContext* pAV
if (nPCIVendor == PCIV_nVidia) {
// nVidia cards support level 5.1 since drivers v6.14.11.7800 for XP and drivers v7.15.11.7800 for Vista/7
- if (IsVistaOrAbove()) {
+ if (IsWinVistaOrLater()) {
if (DriverVersionCheck(VideoDriverVersion, 7, 15, 11, 7800)) {
no_level51_support = 0;
diff --git a/src/filters/transform/MPCVideoDec/FfmpegContext.h b/src/filters/transform/MPCVideoDec/FfmpegContext.h
index 66a5c827f..a2ffd414e 100644
--- a/src/filters/transform/MPCVideoDec/FfmpegContext.h
+++ b/src/filters/transform/MPCVideoDec/FfmpegContext.h
@@ -69,7 +69,6 @@ HRESULT FFMpeg2DecodeFrame(DXVA_PictureParameters* pPicParams, DXVA_QmatrixData*
BYTE* pBuffer, UINT nSize);
// === Common functions
-BOOL IsVistaOrAbove();
unsigned long FFGetMBNumber(struct AVCodecContext* pAVCtx);
void FFSetThreadNumber(struct AVCodecContext* pAVCtx, enum CodecID nCodecId, int nThreadCount);
BOOL FFSoftwareCheckCompatibility(struct AVCodecContext* pAVCtx);