Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCasimir666 <casimir666@users.sourceforge.net>2010-01-24 21:19:11 +0300
committerCasimir666 <casimir666@users.sourceforge.net>2010-01-24 21:19:11 +0300
commitbbfa2e756c9f5310930a13fb99f7bcc781a06ba4 (patch)
tree55204a5fcdc0727185013299cedeb5187f52bb8f /src/filters/transform/mpcvideodec/DXVADecoderMpeg2.h
parenta6706f0e68dd8d0d25ad4cec219f77ed33cf86d0 (diff)
Added : support for Mpeg2 bitstream in DXVA decoder
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1552 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/transform/mpcvideodec/DXVADecoderMpeg2.h')
-rw-r--r--src/filters/transform/mpcvideodec/DXVADecoderMpeg2.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/src/filters/transform/mpcvideodec/DXVADecoderMpeg2.h b/src/filters/transform/mpcvideodec/DXVADecoderMpeg2.h
new file mode 100644
index 000000000..d87cea541
--- /dev/null
+++ b/src/filters/transform/mpcvideodec/DXVADecoderMpeg2.h
@@ -0,0 +1,59 @@
+/*
+ * $Id$
+ *
+ * (C) 2006-2010 see AUTHORS
+ *
+ * This file is part of mplayerc.
+ *
+ * Mplayerc is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Mplayerc is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+
+#include <dxva.h>
+#include "DXVADecoder.h"
+
+#define MAX_SLICE 175 // Max slice number for Mpeg2 streams
+
+class CDXVADecoderMpeg2 : public CDXVADecoder
+{
+public:
+ CDXVADecoderMpeg2 (CMPCVideoDecFilter* pFilter, IAMVideoAccelerator* pAMVideoAccelerator, DXVAMode nMode, int nPicEntryNumber);
+ CDXVADecoderMpeg2 (CMPCVideoDecFilter* pFilter, IDirectXVideoDecoder* pDirectXVideoDec, DXVAMode nMode, int nPicEntryNumber, DXVA2_ConfigPictureDecode* pDXVA2Config);
+ virtual ~CDXVADecoderMpeg2(void);
+
+ // === Public functions
+ virtual HRESULT DecodeFrame (BYTE* pDataIn, UINT nSize, REFERENCE_TIME rtStart, REFERENCE_TIME rtStop);
+ virtual void SetExtraData (BYTE* pDataIn, UINT nSize);
+ virtual void CopyBitstream (BYTE* pDXVABuffer, BYTE* pBuffer, UINT& nSize);
+ virtual void Flush();
+
+protected :
+
+ virtual int FindOldestFrame();
+private:
+ DXVA_PictureParameters m_PictureParams;
+ DXVA_QmatrixData m_QMatrixData;
+ WORD m_wRefPictureIndex[2];
+ DXVA_SliceInfo m_SliceInfo[MAX_SLICE];
+ int m_nSliceCount;
+
+ int m_nNextCodecIndex;
+
+ // Private functions
+ void Init();
+ void UpdatePictureParams(int nSurfaceIndex);
+};