diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-03-24 14:02:04 +0300 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-03-24 14:02:04 +0300 |
commit | 08748e6fcdb729096d3a38f6e9a89b7b7dfdc370 (patch) | |
tree | ec09acf09b12fe2a4396cdcbc8a0cad4cfd0e8cb /decoder | |
parent | e59a6a0ecf1a2f40c21ec26d26071d83f8f2570f (diff) |
Preserve chroma resolution when scaling uncommon formats
Diffstat (limited to 'decoder')
-rw-r--r-- | decoder/LAVVideo/decoders/avcodec.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/decoder/LAVVideo/decoders/avcodec.cpp b/decoder/LAVVideo/decoders/avcodec.cpp index 806570a5..e6070aaf 100644 --- a/decoder/LAVVideo/decoders/avcodec.cpp +++ b/decoder/LAVVideo/decoders/avcodec.cpp @@ -1002,7 +1002,7 @@ STDMETHODIMP CDecAvcodec::ConvertPixFmt(AVFrame *pFrame, LAVFrame *pOutFrame) AVPixelFormat dstFormat = getFFPixelFormatFromLAV(pOutFrame->format, pOutFrame->bpp); // Get a context - m_pSwsContext = sws_getCachedContext(m_pSwsContext, pFrame->width, pFrame->height, (AVPixelFormat)pFrame->format, pFrame->width, pFrame->height, dstFormat, SWS_BILINEAR | SWS_PRINT_INFO, nullptr, nullptr, nullptr); + m_pSwsContext = sws_getCachedContext(m_pSwsContext, pFrame->width, pFrame->height, (AVPixelFormat)pFrame->format, pFrame->width, pFrame->height, dstFormat, SWS_BILINEAR | SWS_FULL_CHR_H_INT | SWS_PRINT_INFO, nullptr, nullptr, nullptr); ptrdiff_t linesize[4]; for (int i = 0; i < 4; i++) |