diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2017-02-13 12:40:30 +0300 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2017-02-13 12:40:30 +0300 |
commit | c9d551c5671bcb080bac2a28fbe58352aa5148bb (patch) | |
tree | 6c9666a2d6171360ad9398fa2937932be577423c /decoder | |
parent | 0ea1c1b9d4438417513312c923f7fd2bd9cfe4c3 (diff) |
Fix shift handling for converted content in y416
Diffstat (limited to 'decoder')
-rw-r--r-- | decoder/LAVVideo/pixconv/convert_generic.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/decoder/LAVVideo/pixconv/convert_generic.cpp b/decoder/LAVVideo/pixconv/convert_generic.cpp index 6f32ef8f..f52d0f0d 100644 --- a/decoder/LAVVideo/pixconv/convert_generic.cpp +++ b/decoder/LAVVideo/pixconv/convert_generic.cpp @@ -500,11 +500,11 @@ HRESULT CLAVPixFmtConverter::ConvertToY416(const uint8_t* const src[4], const pt const int16_t *y = nullptr; const int16_t *u = nullptr; const int16_t *v = nullptr; - const int shift = (16 - m_InBpp); ptrdiff_t sourceStride = 0; BYTE *pTmpBuffer = nullptr; + int shift = (16 - m_InBpp); if (m_InputPixFmt != LAVPixFmt_YUV444bX) { uint8_t *tmp[4] = {nullptr}; ptrdiff_t tmpStride[4] = {0}; @@ -530,6 +530,7 @@ HRESULT CLAVPixFmtConverter::ConvertToY416(const uint8_t* const src[4], const pt u = (int16_t *)tmp[1]; v = (int16_t *)tmp[2]; sourceStride = scaleStride; + shift = 0; } else { y = (int16_t *)src[0]; u = (int16_t *)src[1]; |