Skip to content

Commit 81e9414

Browse files
committed
Добавлена заготовка для настройки "VPDinterlacing".
1 parent acec05b commit 81e9414

File tree

5 files changed

+18
-1
lines changed

5 files changed

+18
-1
lines changed

Source/DX11VideoProcessor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ CDX11VideoProcessor::CDX11VideoProcessor(CMpcVideoRenderer* pFilter, const Setti
383383
m_iResizeStats = config.iResizeStats;
384384
m_iTexFormat = config.iTexFormat;
385385
m_VPFormats = config.VPFmts;
386+
m_iVPDinterlacing = config.iVPDinterlacing;
386387
m_bDeintDouble = config.bDeintDouble;
387388
m_bVPScaling = config.bVPScaling;
388389
m_iChromaScaling = config.iChromaScaling;

Source/DX9VideoProcessor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ CDX9VideoProcessor::CDX9VideoProcessor(CMpcVideoRenderer* pFilter, const Setting
273273
m_iResizeStats = config.iResizeStats;
274274
m_iTexFormat = config.iTexFormat;
275275
m_VPFormats = config.VPFmts;
276+
m_iVPDinterlacing = config.iVPDinterlacing;
276277
m_bDeintDouble = config.bDeintDouble;
277278
m_bVPScaling = config.bVPScaling;
278279
m_iChromaScaling = config.iChromaScaling;

Source/IVideoRenderer.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) 2018-2024 see Authors.txt
2+
* (C) 2018-2025 see Authors.txt
33
*
44
* This file is part of MPC-BE.
55
*
@@ -29,6 +29,12 @@ enum :int {
2929
TEXFMT_16FLOAT = 16,
3030
};
3131

32+
enum :int {
33+
DEINT_Disable = 0,
34+
DEINT_Enable = 1,
35+
DEINT_HackFutureFrames = 2,
36+
};
37+
3238
enum :int {
3339
SUPERRES_Disable = 0,
3440
SUPERRES_SD,
@@ -97,6 +103,7 @@ struct Settings_t {
97103
int iResizeStats;
98104
int iTexFormat;
99105
VPEnableFormats_t VPFmts;
106+
int iVPDinterlacing;
100107
bool bDeintDouble;
101108
bool bVPScaling;
102109
int iVPSuperRes;
@@ -136,6 +143,7 @@ struct Settings_t {
136143
VPFmts.bP01x = true;
137144
VPFmts.bYUY2 = true;
138145
VPFmts.bOther = true;
146+
iVPDinterlacing = DEINT_Enable;
139147
bDeintDouble = true;
140148
bVPScaling = true;
141149
iVPSuperRes = SUPERRES_Disable;

Source/VideoProcessor.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ class CVideoProcessor
5050
int m_iResizeStats = 0;
5151
int m_iTexFormat = TEXFMT_AUTOINT;
5252
VPEnableFormats_t m_VPFormats = {true, true, true, true};
53+
int m_iVPDinterlacing = DEINT_Enable;
5354
bool m_bDeintDouble = true;
5455
bool m_bVPScaling = true;
5556
int m_iChromaScaling = CHROMA_Bilinear;

Source/VideoRenderer.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#define OPT_VPEnableP01x L"VPEnableP01x"
4242
#define OPT_VPEnableYUY2 L"VPEnableYUY2"
4343
#define OPT_VPEnableOther L"VPEnableOther"
44+
#define OPT_VPDinterlacing L"VPDinterlacing"
4445
#define OPT_DoubleFrateDeint L"DoubleFramerateDeinterlace"
4546
#define OPT_VPScaling L"VPScaling"
4647
#define OPT_VPSuperResolution L"VPSuperResolution"
@@ -190,6 +191,9 @@ CMpcVideoRenderer::CMpcVideoRenderer(LPUNKNOWN pUnk, HRESULT* phr)
190191
if (ERROR_SUCCESS == key.QueryDWORDValue(OPT_VPEnableOther, dw)) {
191192
m_Sets.VPFmts.bOther = !!dw;
192193
}
194+
if (ERROR_SUCCESS == key.QueryDWORDValue(OPT_VPDinterlacing, dw)) {
195+
m_Sets.iVPDinterlacing = discard<int>(dw, DEINT_Enable, DEINT_Disable, DEINT_HackFutureFrames);
196+
}
193197
if (ERROR_SUCCESS == key.QueryDWORDValue(OPT_DoubleFrateDeint, dw)) {
194198
m_Sets.bDeintDouble = !!dw;
195199
}
@@ -1225,6 +1229,8 @@ STDMETHODIMP CMpcVideoRenderer::SaveSettings()
12251229
key.SetDWORDValue(OPT_VPEnableP01x, m_Sets.VPFmts.bP01x);
12261230
key.SetDWORDValue(OPT_VPEnableYUY2, m_Sets.VPFmts.bYUY2);
12271231
key.SetDWORDValue(OPT_VPEnableOther, m_Sets.VPFmts.bOther);
1232+
// TODO
1233+
//key.SetDWORDValue(OPT_VPDinterlacing, m_Sets.iVPDinterlacing);
12281234
key.SetDWORDValue(OPT_DoubleFrateDeint, m_Sets.bDeintDouble);
12291235
key.SetDWORDValue(OPT_VPScaling, m_Sets.bVPScaling);
12301236
key.SetDWORDValue(OPT_VPSuperResolution, m_Sets.iVPSuperRes);

0 commit comments

Comments
 (0)