diff options
Diffstat (limited to 'decoder')
-rw-r--r-- | decoder/LAVVideo/LAVPixFmtConverter.cpp | 3 | ||||
-rw-r--r-- | decoder/LAVVideo/LAVVideo.cpp | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/decoder/LAVVideo/LAVPixFmtConverter.cpp b/decoder/LAVVideo/LAVPixFmtConverter.cpp index 3cbdec6e..bc6f3661 100644 --- a/decoder/LAVVideo/LAVPixFmtConverter.cpp +++ b/decoder/LAVVideo/LAVPixFmtConverter.cpp @@ -412,7 +412,8 @@ void CLAVPixFmtConverter::SelectConvertFunctionDirect() m_bDirectMode = FALSE; int cpu = av_get_cpu_flags(); - if (m_InputPixFmt == LAVPixFmt_NV12 && m_OutputPixFmt == LAVOutPixFmt_NV12) { + if ((m_InputPixFmt == LAVPixFmt_NV12 && m_OutputPixFmt == LAVOutPixFmt_NV12) + || (m_InputPixFmt == LAVPixFmt_P010 && (m_OutputPixFmt == LAVOutPixFmt_P010 || m_OutputPixFmt == LAVOutPixFmt_P016))) { if (cpu & AV_CPU_FLAG_SSE4) convert_direct = &CLAVPixFmtConverter::plane_copy_direct_sse4; else if (cpu & AV_CPU_FLAG_SSE2) diff --git a/decoder/LAVVideo/LAVVideo.cpp b/decoder/LAVVideo/LAVVideo.cpp index 31434e7c..3fca2e4c 100644 --- a/decoder/LAVVideo/LAVVideo.cpp +++ b/decoder/LAVVideo/LAVVideo.cpp @@ -681,10 +681,12 @@ HRESULT CLAVVideo::CheckDirectMode() int bpp; m_Decoder.GetPixelFormat(&pix, &bpp); - BOOL bDirect = (pix == LAVPixFmt_NV12); + BOOL bDirect = (pix == LAVPixFmt_NV12 || pix == LAVPixFmt_P010); if (m_Decoder.IsInterlaced() && m_settings.SWDeintMode == SWDeintMode_YADIF) bDirect = FALSE; - else if (m_pOutput->CurrentMediaType().subtype != MEDIASUBTYPE_NV12) + else if (pix == LAVPixFmt_NV12 && m_pOutput->CurrentMediaType().subtype != MEDIASUBTYPE_NV12) + bDirect = FALSE; + else if (pix == LAVPixFmt_P010 && m_pOutput->CurrentMediaType().subtype != MEDIASUBTYPE_P010 && m_pOutput->CurrentMediaType().subtype != MEDIASUBTYPE_P016) bDirect = FALSE; else if (m_SubtitleConsumer && m_SubtitleConsumer->HasProvider()) bDirect = FALSE; |