Skip to content

Commit c4aaf58

Browse files
committed
Корректно рассчитываем ширину строки для v210.
1 parent dc4a776 commit c4aaf58

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Source/DX11VideoProcessor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1636,7 +1636,7 @@ BOOL CDX11VideoProcessor::InitMediaType(const CMediaType* pmt)
16361636
m_srcPitch = ALIGN(m_srcPitch, 4);
16371637
break;
16381638
case CF_V210:
1639-
m_srcPitch = biSizeImage / biHeight; // tested for 640x480
1639+
m_srcPitch = ALIGN((biWidth + 5) / 6 * 16, 128);
16401640
}
16411641
if (pBIH->biCompression == BI_RGB && pBIH->biHeight > 0) {
16421642
m_srcPitch = -m_srcPitch;

Source/DX9VideoProcessor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1145,7 +1145,7 @@ BOOL CDX9VideoProcessor::InitMediaType(const CMediaType* pmt)
11451145
m_srcPitch = ALIGN(m_srcPitch, 4);
11461146
break;
11471147
case CF_V210:
1148-
m_srcPitch = biSizeImage / biHeight; // tested for 640x480
1148+
m_srcPitch = ALIGN((biWidth + 5) / 6 * 16, 128);
11491149
}
11501150
if (pBIH->biCompression == BI_RGB && pBIH->biHeight > 0) {
11511151
m_srcPitch = -m_srcPitch;

0 commit comments

Comments
 (0)