void CDXVADecoderH264::Init() { DbgLog((LOG_TRACE, 3, L"CDXVADecoderH264::Init()")); memset(&m_DXVA_Context, 0, sizeof(m_DXVA_Context)); m_DXVA_Context.longSlice = m_bUseLongSlice; Reserved16Bits = 3; if (m_pFilter->GetPCIVendor() == PCIV_Intel && m_guidDecoder == DXVA_Intel_H264_ClearVideo) { Reserved16Bits = 0x534c; m_DXVA_Context.workaround = FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO; } else if (IsATIUVD(m_pFilter->GetPCIVendor(), m_pFilter->GetPCIDevice())) { Reserved16Bits = 0; m_DXVA_Context.workaround = FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG; } switch (GetMode()) { case H264_VLD : AllocExecuteParams(4); break; default : ASSERT(FALSE); } FFH264SetDxvaParams(m_pFilter->GetAVCtx(), &m_DXVA_Context); Flush(); }
void CDXVADecoderH264_DXVA1::Init() { DbgLog((LOG_TRACE, 3, L"CDXVADecoderH264_DXVA1::Init()")); memset(&m_DXVAPicParams, 0, sizeof(DXVA_PicParams_H264)); memset(&m_pSliceLong, 0, sizeof(DXVA_Slice_H264_Long) * MAX_SLICES); memset(&m_pSliceShort, 0, sizeof(DXVA_Slice_H264_Short) * MAX_SLICES); m_DXVAPicParams.MbsConsecutiveFlag = 1; m_DXVAPicParams.Reserved16Bits = 3; if (m_pFilter->GetPCIVendor() == PCIV_Intel) { m_DXVAPicParams.Reserved16Bits = 0x534c; } else if (IsATIUVD(m_pFilter->GetPCIVendor(), m_pFilter->GetPCIDevice())) { m_DXVAPicParams.Reserved16Bits = 0; m_IsATIUVD = true; } m_DXVAPicParams.ContinuationFlag = 1; m_DXVAPicParams.MinLumaBipredSize8x8Flag = 1; // Improve accelerator performances m_DXVAPicParams.StatusReportFeedbackNumber = 0; // Use to report status for (int i = 0; i < _countof(m_DXVAPicParams.RefFrameList); i++) { m_DXVAPicParams.RefFrameList[i].bPicEntry = 255; } m_nNALLength = 4; m_nSlices = 0; switch (GetMode()) { case H264_VLD : AllocExecuteParams(4); break; default : ASSERT(FALSE); } Flush(); }