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 CDXVADecoderMpeg2::Init() { TRACE(_T("CDXVADecoderMpeg2::Init()\n")); memset (&m_PictureParams, 0, sizeof(m_PictureParams)); memset (&m_SliceInfo, 0, sizeof(m_SliceInfo)); memset (&m_QMatrixData, 0, sizeof(m_QMatrixData)); m_PictureParams.bMacroblockWidthMinus1 = 15; // This is equal to "15" for MPEG-1, MPEG-2, H.263, and MPEG-4 m_PictureParams.bMacroblockHeightMinus1 = 15; // This is equal to "15" for MPEG-1, MPEG-2, H.261, H.263, and MPEG-4 m_PictureParams.bBlockWidthMinus1 = 7; // This is equal to "7" for MPEG-1, MPEG-2, H.261, H.263, and MPEG-4 m_PictureParams.bBlockHeightMinus1 = 7; // This is equal to "7" for MPEG-1, MPEG-2, H.261, H.263, and MPEG-4 m_PictureParams.bBPPminus1 = 7; // It is equal to "7" for MPEG-1, MPEG-2, H.261, and H.263 m_PictureParams.bChromaFormat = 0x01; // For MPEG-1, MPEG-2 "Main Profile," H.261 and H.263 bitstreams, this value shall always be set to "01", indicating "4:2:0" format m_nMaxWaiting = 5; m_wRefPictureIndex[0] = NO_REF_FRAME; m_wRefPictureIndex[1] = NO_REF_FRAME; m_nSliceCount = 0; switch (GetMode()) { case MPEG2_VLD : AllocExecuteParams (4); break; default : ASSERT(FALSE); } m_pMPEG2Buffer = NULL; m_nMPEG2BufferSize = 0; NewSegment(); }
void CDXVADecoderVC1::Init() { memset (&m_PictureParams, 0, sizeof(m_PictureParams)); memset (&m_SliceInfo, 0, sizeof(m_SliceInfo)); m_nMaxWaiting = 5; m_wRefPictureIndex[0] = NO_REF_FRAME; m_wRefPictureIndex[1] = NO_REF_FRAME; switch (GetMode()) { case VC1_VLD : AllocExecuteParams (3); break; default : ASSERT(FALSE); } }
void CDXVADecoderMpeg2::Init() { DbgLog((LOG_TRACE, 3, L"CDXVADecoderMpeg2::Init()")); memset(&m_DXVA_Context, 0, sizeof(m_DXVA_Context)); switch (GetMode()) { case MPEG2_VLD : AllocExecuteParams(4); break; default : ASSERT(FALSE); } FFMPEG2SetDxvaParams(m_pFilter->GetAVCtx(), &m_DXVA_Context); Flush(); }
void CDXVADecoderMpeg2::Init() { memset(&m_PictureParams, 0, sizeof(m_PictureParams)); memset(&m_SliceInfo, 0, sizeof(m_SliceInfo)); memset(&m_QMatrixData, 0, sizeof(m_QMatrixData)); m_nMaxWaiting = 5; m_wRefPictureIndex[0] = NO_REF_FRAME; m_wRefPictureIndex[1] = NO_REF_FRAME; m_nSliceCount = 0; switch (GetMode()) { case MPEG2_VLD: AllocExecuteParams(4); break; default: ASSERT(FALSE); } }
void CDXVADecoderH264::Init() { memset (&m_DXVAPicParams, 0, sizeof (m_DXVAPicParams)); 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; if(m_pFilter->GetPCIVendor() == PCIV_Intel) m_DXVAPicParams.Reserved16Bits = 0x534c; else m_DXVAPicParams.Reserved16Bits = 0; m_DXVAPicParams.ContinuationFlag = 1; m_DXVAPicParams.Reserved8BitsA = 0; m_DXVAPicParams.Reserved8BitsB = 0; m_DXVAPicParams.MinLumaBipredSize8x8Flag = 1; // Improve accelerator performances m_DXVAPicParams.StatusReportFeedbackNumber = 0; // Use to report status for (int i =0; i<16; i++) { m_DXVAPicParams.RefFrameList[i].AssociatedFlag = 1; m_DXVAPicParams.RefFrameList[i].bPicEntry = 255; m_DXVAPicParams.RefFrameList[i].Index7Bits = 127; } m_nNALLength = 4; m_nMaxSlices = 0; switch (GetMode()) { case H264_VLD : AllocExecuteParams (3); break; default : ASSERT(FALSE); } }
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(); }