diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2017-03-24 18:42:33 +0300 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2017-04-11 01:30:56 +0300 |
commit | 2684f3e29fb072eb474f4ae061b001a36695ba0a (patch) | |
tree | 0c77552a0fd69e848e91e665a590d19df2c9ca70 /decoder/LAVVideo/pixconv | |
parent | 74cf152eecf8b1f856f19a8bcc84873e9c6f2275 (diff) |
Fix Y416 conversion to be in the right format.
Note: this change breaks compatibility with software that expects the
old layout (ie. older madVR versions). madVR 0.91.8 or newer use the
correct layout provided by this change.
Diffstat (limited to 'decoder/LAVVideo/pixconv')
-rw-r--r-- | decoder/LAVVideo/pixconv/convert_generic.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/decoder/LAVVideo/pixconv/convert_generic.cpp b/decoder/LAVVideo/pixconv/convert_generic.cpp index f52d0f0d..c0937296 100644 --- a/decoder/LAVVideo/pixconv/convert_generic.cpp +++ b/decoder/LAVVideo/pixconv/convert_generic.cpp @@ -538,13 +538,15 @@ HRESULT CLAVPixFmtConverter::ConvertToY416(const uint8_t* const src[4], const pt sourceStride = srcStride[0] / 2; } -#define YUV444_Y416_PACK \ - *idst++ = 0xFFFF | (vv << (16 + shift)); \ - *idst++ = (yv << shift) | (uv << (16 + shift)); - BYTE *out = dst[0]; YUV444_PACKED_LOOP_HEAD_LE(width, height, y, u, v, out) - YUV444_Y416_PACK + uint16_t *p = (uint16_t *)idst; + p[0] = (uv << shift); + p[1] = (yv << shift); + p[2] = (vv << shift); + p[3] = 0xFFFF; + + idst += 2; YUV444_PACKED_LOOP_END(y, u, v, out, sourceStride, dstStride[0]) av_freep(&pTmpBuffer); |