diff options
author | Casimir666 <casimir666@users.sourceforge.net> | 2008-01-01 14:29:38 +0300 |
---|---|---|
committer | Casimir666 <casimir666@users.sourceforge.net> | 2008-01-01 14:29:38 +0300 |
commit | d98e6a7648aa2d32b9c3a22e5173630115a0e397 (patch) | |
tree | 1cb14e2d826b2b8a63e27f92cb351e4d4c717322 /src/filters/transform/mpcvideodec/DXVADecoder.h | |
parent | d1d5e9da1c7c2e53d2de56192f5752c4e96556c5 (diff) |
DXVA : read QMatrix, framerate improve FFMpeg : reorder B-Frames
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@354 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/transform/mpcvideodec/DXVADecoder.h')
-rw-r--r-- | src/filters/transform/mpcvideodec/DXVADecoder.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/filters/transform/mpcvideodec/DXVADecoder.h b/src/filters/transform/mpcvideodec/DXVADecoder.h index 6503bea25..2d92c0363 100644 --- a/src/filters/transform/mpcvideodec/DXVADecoder.h +++ b/src/filters/transform/mpcvideodec/DXVADecoder.h @@ -45,11 +45,11 @@ typedef struct CComPtr<IMediaSample> pSample; // Only for DXVA2 !
REFERENCE_TIME rtStart;
REFERENCE_TIME rtStop;
- BOOL bDiscontinuity;
} PICTURE_STORE;
#define MAX_COM_BUFFER 6 // Max uncompressed buffer for an Execute command (DXVA1)
+#define COMP_BUFFER_COUNT 18
class CMPCVideoDecFilter;
@@ -62,7 +62,7 @@ public : DXVA_ENGINE GetEngine() { return m_nEngine; };
void AllocExecuteParams (int nSize);
- virtual HRESULT DecodeFrame (BYTE* pDataIn, UINT nSize, REFERENCE_TIME rtStart, REFERENCE_TIME rtStop, BOOL bDiscontinuity) = NULL;
+ virtual HRESULT DecodeFrame (BYTE* pDataIn, UINT nSize, REFERENCE_TIME rtStart, REFERENCE_TIME rtStop) = NULL;
virtual void SetExtraData (BYTE* pDataIn, UINT nSize);
virtual void CopyBitstream(BYTE* pDXVABuffer, BYTE* pBuffer, UINT& nSize);
virtual void Flush();
@@ -82,17 +82,18 @@ protected : // === DXVA functions
HRESULT AddExecuteBuffer (DWORD CompressedBufferType, UINT nSize, void* pBuffer, UINT* pRealSize = NULL);
- HRESULT GetDeliveryBuffer(REFERENCE_TIME rtStart, REFERENCE_TIME rtStop, BOOL bDiscontinuity, IMediaSample** ppSampleToDeliver);
+ HRESULT GetDeliveryBuffer(REFERENCE_TIME rtStart, REFERENCE_TIME rtStop, IMediaSample** ppSampleToDeliver);
HRESULT Execute();
DWORD GetDXVA1CompressedType (DWORD dwDXVA2CompressedType);
+ HRESULT FindFreeDXVA1Buffer(DWORD dwTypeIndex, DWORD& dwBufferIndex);
HRESULT BeginFrame(int nSurfaceIndex, IMediaSample* pSampleToDeliver);
- HRESULT EndFrame();
+ HRESULT EndFrame(int nSurfaceIndex);
// === Picture store functions
- void AddToStore (int nSurfaceIndex, IMediaSample* pSample, bool bRefPicture, int nFrameOrder, REFERENCE_TIME rtStart, REFERENCE_TIME rtStop, BOOL bDiscontinuity);
+ void AddToStore (int nSurfaceIndex, IMediaSample* pSample, bool bRefPicture, int nFrameOrder, REFERENCE_TIME rtStart, REFERENCE_TIME rtStop);
void RemoveRefFrame (int nSurfaceIndex);
HRESULT DisplayNextFrame();
- HRESULT GetFreeSurfaceIndex(int& nSurfaceIndex, IMediaSample** ppSampleToDeliver, REFERENCE_TIME rtStart, REFERENCE_TIME rtStop, BOOL bDiscontinuity);
+ HRESULT GetFreeSurfaceIndex(int& nSurfaceIndex, IMediaSample** ppSampleToDeliver, REFERENCE_TIME rtStart, REFERENCE_TIME rtStop);
private :
DXVAMode m_nMode;
@@ -104,16 +105,18 @@ private : DXVA_BufferDescription m_DXVA1BufferDesc[MAX_COM_BUFFER];
DWORD m_dwNumBuffersInfo;
DXVA_ConfigPictureDecode m_DXVA1Config;
- int m_nCurrentnSurfaceIndex;
+ AMVACompBufferInfo m_ComBufferInfo[COMP_BUFFER_COUNT];
+ DWORD m_dwBufferIndex;
// === DXVA2 variables
CComPtr<IDirectXVideoDecoder> m_pDirectXVideoDec;
DXVA2_DecodeExecuteParams m_ExecuteParams;
PICTURE_STORE* m_pPictureStore; // Store reference picture, and delayed B-frames
- int m_nPicEntryNumber;
- int m_nLastFrameOrder;
+ int m_nPicEntryNumber; // Total number of picture in store
+ int m_nWaitingPics; // Number of picture not yet displayed
void Init(CMPCVideoDecFilter* pFilter, DXVAMode nMode, int nPicEntryNumber);
void FreePictureSlot (int nSurfaceIndex);
+ int FindOldestFrame();
};
\ No newline at end of file |