diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-01-29 14:20:43 +0300 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-01-29 14:33:21 +0300 |
commit | f2f72474d685df1c293996550d3ec2bbb7f38e2f (patch) | |
tree | 3fb11daa882a20e22d81b2afcd2809d0cabe10be /decoder | |
parent | 7391388c7e83d927a1fa17f929f67e7f95dfe892 (diff) |
Use size_t/ptrdiff_t where appropriate
Diffstat (limited to 'decoder')
-rw-r--r-- | decoder/LAVVideo/decoders/dxva2dec.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/decoder/LAVVideo/decoders/dxva2dec.cpp b/decoder/LAVVideo/decoders/dxva2dec.cpp index c7e126fd..01982df2 100644 --- a/decoder/LAVVideo/decoders/dxva2dec.cpp +++ b/decoder/LAVVideo/decoders/dxva2dec.cpp @@ -182,18 +182,18 @@ static int IsAMDUVD(DWORD dwDeviceId) // DXVA2 decoder implementation //////////////////////////////////////////////////////////////////////////////// -static void (*CopyFrameNV12)(const BYTE *pSourceData, BYTE *pY, BYTE *pUV, int surfaceHeight, int imageHeight, int pitch) = nullptr; +static void (*CopyFrameNV12)(const BYTE *pSourceData, BYTE *pY, BYTE *pUV, size_t surfaceHeight, size_t imageHeight, size_t pitch) = nullptr; -static void CopyFrameNV12_fallback(const BYTE *pSourceData, BYTE *pY, BYTE *pUV, int surfaceHeight, int imageHeight, int pitch) +static void CopyFrameNV12_fallback(const BYTE *pSourceData, BYTE *pY, BYTE *pUV, size_t surfaceHeight, size_t imageHeight, size_t pitch) { - const int size = imageHeight * pitch; + const size_t size = imageHeight * pitch; memcpy(pY, pSourceData, size); memcpy(pUV, pSourceData + (surfaceHeight * pitch), size >> 1); } -static void CopyFrameNV12_fallback_MT(const BYTE *pSourceData, BYTE *pY, BYTE *pUV, int surfaceHeight, int imageHeight, int pitch) +static void CopyFrameNV12_fallback_MT(const BYTE *pSourceData, BYTE *pY, BYTE *pUV, size_t surfaceHeight, size_t imageHeight, size_t pitch) { - const int halfSize = (imageHeight * pitch) >> 1; + const size_t halfSize = (imageHeight * pitch) >> 1; Concurrency::parallel_for(0, 3, [&](int i) { if (i < 2) memcpy(pY + (halfSize * i), pSourceData + (halfSize * i), halfSize); @@ -202,16 +202,16 @@ static void CopyFrameNV12_fallback_MT(const BYTE *pSourceData, BYTE *pY, BYTE *p }); } -static void CopyFrameNV12_SSE4(const BYTE *pSourceData, BYTE *pY, BYTE *pUV, int surfaceHeight, int imageHeight, int pitch) +static void CopyFrameNV12_SSE4(const BYTE *pSourceData, BYTE *pY, BYTE *pUV, size_t surfaceHeight, size_t imageHeight, size_t pitch) { - const int size = imageHeight * pitch; + const size_t size = imageHeight * pitch; gpu_memcpy(pY, pSourceData, size); gpu_memcpy(pUV, pSourceData + (surfaceHeight * pitch), size >> 1); } -static void CopyFrameNV12_SSE4_MT(const BYTE *pSourceData, BYTE *pY, BYTE *pUV, int surfaceHeight, int imageHeight, int pitch) +static void CopyFrameNV12_SSE4_MT(const BYTE *pSourceData, BYTE *pY, BYTE *pUV, size_t surfaceHeight, size_t imageHeight, size_t pitch) { - const int halfSize = (imageHeight * pitch) >> 1; + const size_t halfSize = (imageHeight * pitch) >> 1; Concurrency::parallel_for(0, 3, [&](int i) { if (i < 2) gpu_memcpy(pY + (halfSize * i), pSourceData + (halfSize * i), halfSize); |