mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-19 09:39:15 +00:00
obs-qsv11: Use 2 tile columns in QSV AV1 for 4K+
When resolution is 4K or higher, use 2 tile columns for QSV AV1.
This commit is contained in:
parent
c25f0592ae
commit
2874b8f1cc
|
@ -331,6 +331,17 @@ mfxStatus QSV_Encoder_Internal::InitParams(qsv_param_t *pParams,
|
|||
}
|
||||
}
|
||||
|
||||
constexpr uint32_t pixelcount_4k = 3840 * 2160;
|
||||
/* If size is 4K+, set tile columns per frame to 2. */
|
||||
if (codec == QSV_CODEC_AV1 &&
|
||||
(pParams->nWidth * pParams->nHeight) >= pixelcount_4k) {
|
||||
memset(&m_ExtAv1TileParam, 0, sizeof(m_ExtAv1TileParam));
|
||||
m_ExtAv1TileParam.Header.BufferId = MFX_EXTBUFF_AV1_TILE_PARAM;
|
||||
m_ExtAv1TileParam.Header.BufferSz = sizeof(m_ExtAv1TileParam);
|
||||
m_ExtAv1TileParam.NumTileColumns = 2;
|
||||
extendedBuffers.push_back((mfxExtBuffer *)&m_ExtAv1TileParam);
|
||||
}
|
||||
|
||||
#if defined(_WIN32)
|
||||
// TODO: Ask about this one on VAAPI too.
|
||||
memset(&m_ExtVideoSignalInfo, 0, sizeof(m_ExtVideoSignalInfo));
|
||||
|
|
|
@ -123,6 +123,7 @@ private:
|
|||
mfxExtCodingOption2 m_co2;
|
||||
mfxExtCodingOption m_co;
|
||||
mfxExtHEVCParam m_ExtHEVCParam{};
|
||||
mfxExtAV1TileParam m_ExtAv1TileParam{};
|
||||
mfxExtVideoSignalInfo m_ExtVideoSignalInfo{};
|
||||
mfxExtChromaLocInfo m_ExtChromaLocInfo{};
|
||||
mfxExtMasteringDisplayColourVolume m_ExtMasteringDisplayColourVolume{};
|
||||
|
|
Loading…
Reference in a new issue