diff options
author | Rainer Hochecker <fernetmenta@online.de> | 2016-07-31 21:43:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-31 21:43:25 +0200 |
commit | fc46cf2d4c710b7763992959c46719edf2bd0190 (patch) | |
tree | 9d3b5259ebe53e8b081994f860620b10a39ef899 | |
parent | 22e550cd308812d670087dc1435eb57602968b0d (diff) | |
parent | 25718f4ccebd227eaf63f0f8b53f0552f89f01e5 (diff) |
Merge pull request #10149 from FernetMenta/deintmode17.0a3-Krypton
VideoPlayer: drop deinterlace mode
39 files changed, 61 insertions, 284 deletions
diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po index f77e8e39bd..26915cb15f 100644 --- a/addons/resource.language.en_gb/resources/strings.po +++ b/addons/resource.language.en_gb/resources/strings.po @@ -8501,17 +8501,7 @@ msgctxt "#16039" msgid "Off" msgstr "" -#: xbmc/video/dialogs/GUIDialogVideoSettings.cpp -msgctxt "#16040" -msgid "Auto" -msgstr "" - -#: xbmc/video/dialogs/GUIDialogVideoSettings.cpp -msgctxt "#16041" -msgid "On" -msgstr "" - -#empty strings from id 16042 to 16099 +#empty strings from id 16040 to 16099 #: xbmc/video/windows/GUIWindowVideoNav.cpp msgctxt "#16100" diff --git a/xbmc/ApplicationPlayer.cpp b/xbmc/ApplicationPlayer.cpp index 41ed8a96cb..a657816da6 100644 --- a/xbmc/ApplicationPlayer.cpp +++ b/xbmc/ApplicationPlayer.cpp @@ -710,13 +710,6 @@ void CApplicationPlayer::GetDeinterlaceMethods(std::vector<int> &deinterlaceMeth player->OMXGetDeinterlaceMethods(deinterlaceMethods); } -void CApplicationPlayer::GetDeinterlaceModes(std::vector<int> &deinterlaceModes) -{ - std::shared_ptr<IPlayer> player = GetInternal(); - if (player) - player->OMXGetDeinterlaceModes(deinterlaceModes); -} - void CApplicationPlayer::GetScalingMethods(std::vector<int> &scalingMethods) { std::shared_ptr<IPlayer> player = GetInternal(); @@ -833,15 +826,6 @@ bool CApplicationPlayer::IsRenderingVideoLayer() return false; } -bool CApplicationPlayer::Supports(EDEINTERLACEMODE mode) -{ - std::shared_ptr<IPlayer> player = GetInternal(); - if (player) - return player->Supports(mode); - else - return false; -} - bool CApplicationPlayer::Supports(EINTERLACEMETHOD method) { std::shared_ptr<IPlayer> player = GetInternal(); diff --git a/xbmc/ApplicationPlayer.h b/xbmc/ApplicationPlayer.h index 3d1851a089..870d28619e 100644 --- a/xbmc/ApplicationPlayer.h +++ b/xbmc/ApplicationPlayer.h @@ -92,7 +92,6 @@ public: bool IsRenderingVideo(); bool IsRenderingGuiLayer(); bool IsRenderingVideoLayer(); - bool Supports(EDEINTERLACEMODE mode); bool Supports(EINTERLACEMETHOD method); bool Supports(ESCALINGMETHOD method); bool Supports(ERENDERFEATURE feature); @@ -119,7 +118,6 @@ public: void GetChapterName(std::string& strChapterName, int chapterIdx=-1); int64_t GetChapterPos(int chapterIdx=-1); void GetDeinterlaceMethods(std::vector<int> &deinterlaceMethods); - void GetDeinterlaceModes(std::vector<int> &deinterlaceModes); float GetPercentage() const; std::string GetPlayerState(); std::string GetPlayingTitle(); diff --git a/xbmc/cores/IPlayer.h b/xbmc/cores/IPlayer.h index 8f9fe22066..89c03dcf60 100644 --- a/xbmc/cores/IPlayer.h +++ b/xbmc/cores/IPlayer.h @@ -130,16 +130,9 @@ struct SPlayerVideoStreamInfo } }; -enum EDEINTERLACEMODE -{ - VS_DEINTERLACEMODE_OFF=0, - VS_DEINTERLACEMODE_AUTO=1, - VS_DEINTERLACEMODE_FORCE=2 -}; - enum EINTERLACEMETHOD { - VS_INTERLACEMETHOD_NONE=0, // Legacy + VS_INTERLACEMETHOD_NONE=0, VS_INTERLACEMETHOD_AUTO=1, VS_INTERLACEMETHOD_RENDER_BLEND=2, @@ -407,7 +400,6 @@ public: virtual bool IsRenderingVideoLayer() { return false; }; - virtual bool Supports(EDEINTERLACEMODE mode) { return false; }; virtual bool Supports(EINTERLACEMETHOD method) { return false; }; virtual bool Supports(ESCALINGMETHOD method) { return false; }; virtual bool Supports(ERENDERFEATURE feature) { return false; }; diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp index 0cc8486a13..3ccf4b8cd9 100644 --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp @@ -447,7 +447,6 @@ void CDVDVideoCodecFFmpeg::SetDropState(bool bDrop) void CDVDVideoCodecFFmpeg::SetFilters() { // ask codec to do deinterlacing if possible - EDEINTERLACEMODE mDeintMode = CMediaSettings::GetInstance().GetCurrentVideoSettings().m_DeinterlaceMode; EINTERLACEMETHOD mInt = CMediaSettings::GetInstance().GetCurrentVideoSettings().m_InterlaceMethod; if (mInt != VS_INTERLACEMETHOD_DEINTERLACE && mInt != VS_INTERLACEMETHOD_DEINTERLACE_HALF) @@ -455,14 +454,14 @@ void CDVDVideoCodecFFmpeg::SetFilters() unsigned int filters = 0; - if (mDeintMode != VS_DEINTERLACEMODE_OFF) + if (mInt != VS_INTERLACEMETHOD_NONE) { if (mInt == VS_INTERLACEMETHOD_DEINTERLACE) filters = FILTER_DEINTERLACE_ANY; else if (mInt == VS_INTERLACEMETHOD_DEINTERLACE_HALF) filters = FILTER_DEINTERLACE_ANY | FILTER_DEINTERLACE_HALFED; - if (mDeintMode == VS_DEINTERLACEMODE_AUTO && filters) + if (filters) filters |= FILTER_DEINTERLACE_FLAGGED; } diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp index 1b4c8e8725..08decdde62 100644 --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp @@ -1990,23 +1990,22 @@ void COutput::InitCycle() m_config.stats->SetCanSkipDeint(false); - EDEINTERLACEMODE mode = CMediaSettings::GetInstance().GetCurrentVideoSettings().m_DeinterlaceMode; EINTERLACEMETHOD method = CMediaSettings::GetInstance().GetCurrentVideoSettings().m_InterlaceMethod; bool interlaced = m_currentPicture.DVDPic.iFlags & DVP_FLAG_INTERLACED; if (!(flags & DVD_CODEC_CTRL_NO_POSTPROC) && - (mode == VS_DEINTERLACEMODE_FORCE || - (mode == VS_DEINTERLACEMODE_AUTO && interlaced))) - { - if((method == VS_INTERLACEMETHOD_AUTO && interlaced) - || method == VS_INTERLACEMETHOD_VAAPI_BOB - || method == VS_INTERLACEMETHOD_VAAPI_MADI - || method == VS_INTERLACEMETHOD_VAAPI_MACI - || method == VS_INTERLACEMETHOD_DEINTERLACE - || method == VS_INTERLACEMETHOD_RENDER_BOB) - { - if (method == VS_INTERLACEMETHOD_AUTO) - method = VS_INTERLACEMETHOD_RENDER_BOB; + interlaced && + method != VS_INTERLACEMETHOD_NONE) + { + if (method == VS_INTERLACEMETHOD_AUTO || + method == VS_INTERLACEMETHOD_VAAPI_BOB || + method == VS_INTERLACEMETHOD_VAAPI_MADI || + method == VS_INTERLACEMETHOD_VAAPI_MACI || + method == VS_INTERLACEMETHOD_DEINTERLACE || + method == VS_INTERLACEMETHOD_RENDER_BOB) + { + if (method == VS_INTERLACEMETHOD_AUTO) + method = VS_INTERLACEMETHOD_RENDER_BOB; } else { diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VDPAU.cpp index 377c72b2b3..a754c96cef 100644 --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VDPAU.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VDPAU.cpp @@ -1785,10 +1785,8 @@ void CMixer::CheckFeatures() m_Sharpness = CMediaSettings::GetInstance().GetCurrentVideoSettings().m_Sharpness; SetSharpness(); } - if (m_DeintMode != CMediaSettings::GetInstance().GetCurrentVideoSettings().m_DeinterlaceMode || - m_Deint != CMediaSettings::GetInstance().GetCurrentVideoSettings().m_InterlaceMethod) + if (m_Deint != CMediaSettings::GetInstance().GetCurrentVideoSettings().m_InterlaceMethod) { - m_DeintMode = CMediaSettings::GetInstance().GetCurrentVideoSettings().m_DeinterlaceMode; m_Deint = CMediaSettings::GetInstance().GetCurrentVideoSettings().m_InterlaceMethod; SetDeinterlacing(); } @@ -2053,14 +2051,13 @@ void CMixer::SetDeinterlacing() if (m_videoMixer == VDP_INVALID_HANDLE) return; - EDEINTERLACEMODE mode = CMediaSettings::GetInstance().GetCurrentVideoSettings().m_DeinterlaceMode; EINTERLACEMETHOD method = GetDeinterlacingMethod(true); VdpVideoMixerFeature feature[] = { VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL, VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL_SPATIAL, VDP_VIDEO_MIXER_FEATURE_INVERSE_TELECINE }; - if (mode == VS_DEINTERLACEMODE_OFF) + if (method == VS_INTERLACEMETHOD_NONE) { VdpBool enabled[] = {0,0,0}; vdp_st = m_config.context->GetProcs().vdp_video_mixer_set_feature_enables(m_videoMixer, ARSIZE(feature), feature, enabled); @@ -2285,7 +2282,6 @@ void CMixer::Init() m_Contrast = 0.0; m_NoiseReduction = 0.0; m_Sharpness = 0.0; - m_DeintMode = 0; m_Deint = 0; m_Upscale = 0; m_SeenInterlaceFlag = false; @@ -2354,26 +2350,25 @@ void CMixer::InitCycle() m_config.stats->SetCanSkipDeint(false); - EDEINTERLACEMODE mode = CMediaSettings::GetInstance().GetCurrentVideoSettings().m_DeinterlaceMode; EINTERLACEMETHOD method = GetDeinterlacingMethod(); bool interlaced = m_mixerInput[1].DVDPic.iFlags & DVP_FLAG_INTERLACED; m_SeenInterlaceFlag |= interlaced; if (!(flags & DVD_CODEC_CTRL_NO_POSTPROC) && - (mode == VS_DEINTERLACEMODE_FORCE || - (mode == VS_DEINTERLACEMODE_AUTO && interlaced))) - { - if((method == VS_INTERLACEMETHOD_AUTO && interlaced) - || method == VS_INTERLACEMETHOD_VDPAU_BOB - || method == VS_INTERLACEMETHOD_VDPAU_TEMPORAL - || method == VS_INTERLACEMETHOD_VDPAU_TEMPORAL_HALF - || method == VS_INTERLACEMETHOD_VDPAU_TEMPORAL_SPATIAL - || method == VS_INTERLACEMETHOD_VDPAU_TEMPORAL_SPATIAL_HALF - || method == VS_INTERLACEMETHOD_VDPAU_INVERSE_TELECINE ) - { - if(method == VS_INTERLACEMETHOD_VDPAU_TEMPORAL_HALF - || method == VS_INTERLACEMETHOD_VDPAU_TEMPORAL_SPATIAL_HALF - || !g_graphicsContext.IsFullScreenVideo()) + interlaced && + method != VS_INTERLACEMETHOD_NONE) + { + if (method == VS_INTERLACEMETHOD_AUTO || + method == VS_INTERLACEMETHOD_VDPAU_BOB || + method == VS_INTERLACEMETHOD_VDPAU_TEMPORAL || + method == VS_INTERLACEMETHOD_VDPAU_TEMPORAL_HALF || + method == VS_INTERLACEMETHOD_VDPAU_TEMPORAL_SPATIAL || + method == VS_INTERLACEMETHOD_VDPAU_TEMPORAL_SPATIAL_HALF || + method == VS_INTERLACEMETHOD_VDPAU_INVERSE_TELECINE ) + { + if(method == VS_INTERLACEMETHOD_VDPAU_TEMPORAL_HALF || + method == VS_INTERLACEMETHOD_VDPAU_TEMPORAL_SPATIAL_HALF || + !g_graphicsContext.IsFullScreenVideo()) m_mixersteps = 1; else { diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VDPAU.h b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VDPAU.h index 59432ad70f..1157f23281 100644 --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VDPAU.h +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VDPAU.h @@ -333,7 +333,6 @@ protected: float m_Contrast; float m_NoiseReduction; float m_Sharpness; - int m_DeintMode; int m_Deint; int m_Upscale; bool m_SeenInterlaceFlag; diff --git a/xbmc/cores/VideoPlayer/VideoPlayer.cpp b/xbmc/cores/VideoPlayer/VideoPlayer.cpp index df1539b505..5bf0f9b6ce 100644 --- a/xbmc/cores/VideoPlayer/VideoPlayer.cpp +++ b/xbmc/cores/VideoPlayer/VideoPlayer.cpp @@ -653,7 +653,6 @@ CVideoPlayer::CVideoPlayer(IPlayerCallback& callback) m_OmxPlayerState.bOmxWaitAudio = false; m_OmxPlayerState.bOmxSentEOFs = false; m_OmxPlayerState.threshold = 0.2f; - m_OmxPlayerState.current_deinterlace = CMediaSettings::GetInstance().GetCurrentVideoSettings().m_DeinterlaceMode; m_OmxPlayerState.interlace_method = VS_INTERLACEMETHOD_MAX; #ifdef HAS_OMXPLAYER m_omxplayer_mode = CSettings::GetInstance().GetBool(CSettings::SETTING_VIDEOPLAYER_USEOMXPLAYER); @@ -5048,11 +5047,6 @@ bool CVideoPlayer::IsRenderingVideoLayer() return m_renderManager.IsVideoLayer(); } -bool CVideoPlayer::Supports(EDEINTERLACEMODE mode) -{ - return m_renderManager.Supports(mode); -} - bool CVideoPlayer::Supports(EINTERLACEMETHOD method) { return m_renderManager.Supports(method); diff --git a/xbmc/cores/VideoPlayer/VideoPlayer.h b/xbmc/cores/VideoPlayer/VideoPlayer.h index 9b73181941..51ff1c580a 100644 --- a/xbmc/cores/VideoPlayer/VideoPlayer.h +++ b/xbmc/cores/VideoPlayer/VideoPlayer.h @@ -75,7 +75,6 @@ public: struct SOmxPlayerState { OMXClock av_clock; // openmax clock component - EDEINTERLACEMODE current_deinterlace; // whether deinterlace is currently enabled EINTERLACEMETHOD interlace_method; // current deinterlace method bool bOmxWaitVideo; // whether we need to wait for video to play out on EOS bool bOmxWaitAudio; // whether we need to wait for audio to play out on EOS @@ -325,7 +324,6 @@ public: virtual bool IsRenderingVideo(); virtual bool IsRenderingGuiLayer(); virtual bool IsRenderingVideoLayer(); - virtual bool Supports(EDEINTERLACEMODE mode); virtual bool Supports(EINTERLACEMETHOD method); virtual bool Supports(ESCALINGMETHOD method); virtual bool Supports(ERENDERFEATURE feature); diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/BaseRenderer.h b/xbmc/cores/VideoPlayer/VideoRenderers/BaseRenderer.h index 649a7e7eeb..5a3157c3f6 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/BaseRenderer.h +++ b/xbmc/cores/VideoPlayer/VideoRenderers/BaseRenderer.h @@ -103,7 +103,6 @@ public: // Feature support virtual bool SupportsMultiPassRendering() = 0; virtual bool Supports(ERENDERFEATURE feature) { return false; }; - virtual bool Supports(EDEINTERLACEMODE mode) = 0; virtual bool Supports(EINTERLACEMETHOD method) = 0; virtual bool Supports(ESCALINGMETHOD method) = 0; diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/DXVAHD.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/DXVAHD.cpp index 6f36c17032..bb336c314b 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/DXVAHD.cpp +++ b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/DXVAHD.cpp @@ -245,11 +245,6 @@ bool DXVA::CProcessorHD::IsFormatSupported(DXGI_FORMAT format, D3D11_VIDEO_PROCE bool CProcessorHD::ConfigureProcessor(unsigned int format, unsigned int extended_format) { - if (g_advancedSettings.m_DXVANoDeintProcForProgressive) - { - CLog::Log(LOGNOTICE, "%s - Auto deinterlacing mode workaround activated. Deinterlacing processor will be used only for interlaced frames.", __FUNCTION__); - } - // check default output format DXGI_FORMAT_B8G8R8A8_UNORM (as render target) if (!IsFormatSupported(DXGI_FORMAT_B8G8R8A8_UNORM, D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_OUTPUT)) return false; @@ -538,12 +533,6 @@ bool CProcessorHD::Render(CRect src, CRect dst, ID3D11Resource* target, ID3D11Vi if (!views[2]) return false; - EDEINTERLACEMODE deinterlace_mode = CMediaSettings::GetInstance().GetCurrentVideoSettings().m_DeinterlaceMode; - if (g_advancedSettings.m_DXVANoDeintProcForProgressive) - deinterlace_mode = (flags & RENDER_FLAG_FIELD0 || flags & RENDER_FLAG_FIELD1) ? VS_DEINTERLACEMODE_FORCE : VS_DEINTERLACEMODE_OFF; - - bool progressive = deinterlace_mode == VS_DEINTERLACEMODE_OFF; - RECT sourceRECT = { src.x1, src.y1, src.x2, src.y2 }; RECT dstRECT = { dst.x1, dst.y1, dst.x2, dst.y2 }; @@ -614,17 +603,6 @@ bool CProcessorHD::Render(CRect src, CRect dst, ID3D11Resource* target, ID3D11Vi if (flags & RENDER_FLAG_FIELD1 && flags & RENDER_FLAG_TOP) dxvaFrameFormat = D3D11_VIDEO_FRAME_FORMAT_INTERLACED_BOTTOM_FIELD_FIRST; - // Override the sample format when the processor doesn't need to deinterlace or when deinterlacing is forced and flags are missing. - if (progressive) - { - dxvaFrameFormat = D3D11_VIDEO_FRAME_FORMAT_PROGRESSIVE; - } - else if (deinterlace_mode == VS_DEINTERLACEMODE_FORCE - && dxvaFrameFormat == D3D11_VIDEO_FRAME_FORMAT_PROGRESSIVE) - { - dxvaFrameFormat = D3D11_VIDEO_FRAME_FORMAT_INTERLACED_TOP_FIELD_FIRST; - } - bool frameProgressive = dxvaFrameFormat == D3D11_VIDEO_FRAME_FORMAT_PROGRESSIVE; // Progressive or Interlaced video at normal rate. diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/MMALRenderer.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/MMALRenderer.cpp index b252cb5fac..78042e65f5 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/MMALRenderer.cpp +++ b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/MMALRenderer.cpp @@ -521,7 +521,6 @@ void CMMALRenderer::Run() { if (buffer->length > 0) { - EDEINTERLACEMODE deinterlace_request = CMediaSettings::GetInstance().GetCurrentVideoSettings().m_DeinterlaceMode; EINTERLACEMETHOD interlace_method = CMediaSettings::GetInstance().GetCurrentVideoSettings().m_InterlaceMethod; if (interlace_method == VS_INTERLACEMETHOD_AUTO) interlace_method = AutoInterlaceMethod(); @@ -535,12 +534,12 @@ void CMMALRenderer::Run() interlace_method = VS_INTERLACEMETHOD_MMAL_BOB_HALF; } - if (deinterlace_request == VS_DEINTERLACEMODE_OFF || interlace_method == VS_INTERLACEMETHOD_NONE) + if (interlace_method == VS_INTERLACEMETHOD_NONE) { if (m_deint_input) DestroyDeinterlace(); } - else if (m_deint_input || deinterlace_request == VS_DEINTERLACEMODE_FORCE || (deinterlace_request == VS_DEINTERLACEMODE_AUTO && interlace)) + else if (m_deint_input || interlace) CheckConfigurationDeint(omvb->m_width, omvb->m_height, omvb->m_aligned_width, omvb->m_aligned_height, omvb->m_encoding, interlace_method); if (m_deint_input) @@ -906,16 +905,6 @@ bool CMMALRenderer::RenderCapture(CRenderCapture* capture) // YV12 Texture creation, deletion, copying + clearing //******************************************************************************************************** -bool CMMALRenderer::Supports(EDEINTERLACEMODE mode) -{ - if(mode == VS_DEINTERLACEMODE_OFF - || mode == VS_DEINTERLACEMODE_AUTO - || mode == VS_DEINTERLACEMODE_FORCE) - return true; - - return false; -} - bool CMMALRenderer::Supports(EINTERLACEMETHOD method) { if (method == VS_INTERLACEMETHOD_AUTO) diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/MMALRenderer.h b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/MMALRenderer.h index 0d94efa7d4..a1dd43845e 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/MMALRenderer.h +++ b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/MMALRenderer.h @@ -105,7 +105,6 @@ public: virtual bool SupportsMultiPassRendering() { return false; }; virtual bool Supports(ERENDERFEATURE feature); - virtual bool Supports(EDEINTERLACEMODE mode); virtual bool Supports(EINTERLACEMETHOD method); virtual bool Supports(ESCALINGMETHOD method); diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererMediaCodecSurface.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererMediaCodecSurface.cpp index 5540d55b00..1f53175f8c 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererMediaCodecSurface.cpp +++ b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererMediaCodecSurface.cpp @@ -89,11 +89,6 @@ bool CRendererMediaCodecSurface::Supports(EINTERLACEMETHOD method) return false; } -bool CRendererMediaCodecSurface::Supports(EDEINTERLACEMODE mode) -{ - return false; -} - EINTERLACEMETHOD CRendererMediaCodecSurface::AutoInterlaceMethod() { return VS_INTERLACEMETHOD_NONE; @@ -176,4 +171,3 @@ bool CRendererMediaCodecSurface::UploadTexture(int index) return true; // nothing todo } #endif - diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererMediaCodecSurface.h b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererMediaCodecSurface.h index 9da5e36178..f600ee2bec 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererMediaCodecSurface.h +++ b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererMediaCodecSurface.h @@ -41,7 +41,6 @@ public: // Feature support virtual bool Supports(EINTERLACEMETHOD method); - virtual bool Supports(EDEINTERLACEMODE mode); virtual EINTERLACEMETHOD AutoInterlaceMethod(); virtual CRenderInfo GetRenderInfo(); diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererVTBGL.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererVTBGL.cpp index d3e1e034fe..5e11e00a5e 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererVTBGL.cpp +++ b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererVTBGL.cpp @@ -65,11 +65,6 @@ bool CRendererVTB::Supports(EINTERLACEMETHOD method) return false; } -bool CRendererVTB::Supports(EDEINTERLACEMODE mode) -{ - return false; -} - EINTERLACEMETHOD CRendererVTB::AutoInterlaceMethod() { return VS_INTERLACEMETHOD_NONE; diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererVTBGL.h b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererVTBGL.h index 7e4f693185..5ec94c8cda 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererVTBGL.h +++ b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererVTBGL.h @@ -38,7 +38,6 @@ public: // Feature support virtual bool Supports(EINTERLACEMETHOD method); - virtual bool Supports(EDEINTERLACEMODE mode); virtual EINTERLACEMETHOD AutoInterlaceMethod(); diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererVTBGLES.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererVTBGLES.cpp index ae2a27bdd3..dd131628ba 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererVTBGLES.cpp +++ b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererVTBGLES.cpp @@ -85,11 +85,6 @@ bool CRendererVTB::Supports(EINTERLACEMETHOD method) return false; } -bool CRendererVTB::Supports(EDEINTERLACEMODE mode) -{ - return false; -} - EINTERLACEMETHOD CRendererVTB::AutoInterlaceMethod() { return VS_INTERLACEMETHOD_NONE; diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererVTBGLES.h b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererVTBGLES.h index d314bfa94c..a57458668e 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererVTBGLES.h +++ b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererVTBGLES.h @@ -39,7 +39,6 @@ public: // Feature support virtual bool Supports(EINTERLACEMETHOD method) override; - virtual bool Supports(EDEINTERLACEMODE mode) override; virtual EINTERLACEMETHOD AutoInterlaceMethod() override; virtual CRenderInfo GetRenderInfo() override; diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.cpp index 5b3636e704..1a9b5a322d 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.cpp +++ b/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.cpp @@ -2478,19 +2478,6 @@ bool CLinuxRendererGL::SupportsMultiPassRendering() return g_Windowing.IsExtSupported("GL_EXT_framebuffer_object"); } -bool CLinuxRendererGL::Supports(EDEINTERLACEMODE mode) -{ - if(m_renderMethod & RENDER_CVREF) - return false; - - if(mode == VS_DEINTERLACEMODE_OFF - || mode == VS_DEINTERLACEMODE_AUTO - || mode == VS_DEINTERLACEMODE_FORCE) - return true; - - return false; -} - bool CLinuxRendererGL::Supports(EINTERLACEMETHOD method) { if(m_renderMethod & RENDER_CVREF) diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.h b/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.h index 35080389de..f8670fce74 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.h +++ b/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.h @@ -138,7 +138,6 @@ public: // Feature support virtual bool SupportsMultiPassRendering(); virtual bool Supports(ERENDERFEATURE feature); - virtual bool Supports(EDEINTERLACEMODE mode); virtual bool Supports(EINTERLACEMETHOD method); virtual bool Supports(ESCALINGMETHOD method); diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGLES.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGLES.cpp index 3760970b6d..d1baae6887 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGLES.cpp +++ b/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGLES.cpp @@ -192,12 +192,10 @@ bool CLinuxRendererGLES::Configure(unsigned int width, unsigned int height, unsi { m_renderFeatures.clear(); m_scalingMethods.clear(); - m_deinterlaceModes.clear(); m_deinterlaceMethods.clear(); g_application.m_pPlayer->GetRenderFeatures(m_renderFeatures); g_application.m_pPlayer->GetDeinterlaceMethods(m_deinterlaceMethods); - g_application.m_pPlayer->GetDeinterlaceModes(m_deinterlaceModes); g_application.m_pPlayer->GetScalingMethods(m_scalingMethods); } @@ -1671,25 +1669,6 @@ bool CLinuxRendererGLES::SupportsMultiPassRendering() return false; } -bool CLinuxRendererGLES::Supports(EDEINTERLACEMODE mode) -{ - // Player controls render, let it dictate available deinterlace modes - if((m_renderMethod & RENDER_BYPASS)) - { - Features::iterator itr = std::find(m_deinterlaceModes.begin(),m_deinterlaceModes.end(), mode); - return itr != m_deinterlaceModes.end(); - } - - if (mode == VS_DEINTERLACEMODE_OFF) - return true; - - if(mode == VS_DEINTERLACEMODE_AUTO - || mode == VS_DEINTERLACEMODE_FORCE) - return true; - - return false; -} - bool CLinuxRendererGLES::Supports(EINTERLACEMETHOD method) { // Player controls render, let it dictate available deinterlace methods diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGLES.h b/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGLES.h index afc130e91f..238e62e4d4 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGLES.h +++ b/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGLES.h @@ -146,7 +146,6 @@ public: // Feature support virtual bool SupportsMultiPassRendering() override; virtual bool Supports(ERENDERFEATURE feature) override; - virtual bool Supports(EDEINTERLACEMODE mode) override; virtual bool Supports(EINTERLACEMETHOD method) override; virtual bool Supports(ESCALINGMETHOD method) override; virtual EINTERLACEMETHOD AutoInterlaceMethod() override; @@ -266,7 +265,6 @@ protected: Features m_renderFeatures; Features m_deinterlaceMethods; - Features m_deinterlaceModes; Features m_scalingMethods; // clear colour for "black" bars diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/RenderManager.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/RenderManager.cpp index ddcf5e6ccd..b482fc10cf 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/RenderManager.cpp +++ b/xbmc/cores/VideoPlayer/VideoRenderers/RenderManager.cpp @@ -797,19 +797,15 @@ void CRenderManager::FlipPage(volatile std::atomic_bool& bStop, double pts /* = EPRESENTMETHOD presentmethod; - EDEINTERLACEMODE deinterlacemode = CMediaSettings::GetInstance().GetCurrentVideoSettings().m_DeinterlaceMode; EINTERLACEMETHOD interlacemethod = AutoInterlaceMethodInternal(CMediaSettings::GetInstance().GetCurrentVideoSettings().m_InterlaceMethod); - if (deinterlacemode == VS_DEINTERLACEMODE_OFF) + if (interlacemethod == VS_INTERLACEMETHOD_NONE) { presentmethod = PRESENT_METHOD_SINGLE; sync = FS_NONE; } else { - if (deinterlacemode == VS_DEINTERLACEMODE_AUTO && sync == FS_NONE) - presentmethod = PRESENT_METHOD_SINGLE; - else { bool invert = false; if (interlacemethod == VS_INTERLACEMETHOD_RENDER_BLEND) @@ -835,10 +831,6 @@ void CRenderManager::FlipPage(volatile std::atomic_bool& bStop, double pts /* = if (presentmethod != PRESENT_METHOD_SINGLE) { - /* default to odd field if we want to deinterlace and don't know better */ - if (deinterlacemode == VS_DEINTERLACEMODE_FORCE && sync == FS_NONE) - sync = FS_TOP; - /* invert present field */ if (invert) { @@ -1194,17 +1186,11 @@ bool CRenderManager::Supports(ERENDERFEATURE feature) return false; } -bool CRenderManager::Supports(EDEINTERLACEMODE method) -{ - CSingleLock lock(m_statelock); - if (m_pRenderer) - return m_pRenderer->Supports(method); - else - return false; -} - bool CRenderManager::Supports(EINTERLACEMETHOD method) { + if (method == VS_INTERLACEMETHOD_NONE) + return true; + CSingleLock lock(m_statelock); if (m_pRenderer) return m_pRenderer->Supports(method); diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/RenderManager.h b/xbmc/cores/VideoPlayer/VideoRenderers/RenderManager.h index bce8892f4d..209046dfbe 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/RenderManager.h +++ b/xbmc/cores/VideoPlayer/VideoRenderers/RenderManager.h @@ -91,7 +91,6 @@ public: // Functions called from GUI bool Supports(ERENDERFEATURE feature); - bool Supports(EDEINTERLACEMODE method); bool Supports(EINTERLACEMETHOD method); bool Supports(ESCALINGMETHOD method); EINTERLACEMETHOD AutoInterlaceMethod(EINTERLACEMETHOD mInt); diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/WinRenderer.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/WinRenderer.cpp index 02b34b64e5..e160a099c9 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/WinRenderer.cpp +++ b/xbmc/cores/VideoPlayer/VideoRenderers/WinRenderer.cpp @@ -1006,16 +1006,6 @@ bool CWinRenderer::CreateYV12Texture(int index) return true; } -bool CWinRenderer::Supports(EDEINTERLACEMODE mode) -{ - if(mode == VS_DEINTERLACEMODE_OFF - || mode == VS_DEINTERLACEMODE_AUTO - || mode == VS_DEINTERLACEMODE_FORCE) - return true; - - return false; -} - bool CWinRenderer::Supports(EINTERLACEMETHOD method) { if(method == VS_INTERLACEMETHOD_AUTO) diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/WinRenderer.h b/xbmc/cores/VideoPlayer/VideoRenderers/WinRenderer.h index e7adc1c914..05b090ca3c 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/WinRenderer.h +++ b/xbmc/cores/VideoPlayer/VideoRenderers/WinRenderer.h @@ -182,7 +182,6 @@ public: // Feature support virtual bool SupportsMultiPassRendering() { return false; } virtual bool Supports(ERENDERFEATURE feature); - virtual bool Supports(EDEINTERLACEMODE mode); virtual bool Supports(EINTERLACEMETHOD method); virtual bool Supports(ESCALINGMETHOD method); diff --git a/xbmc/cores/omxplayer/OMXHelper.cpp b/xbmc/cores/omxplayer/OMXHelper.cpp index b5db1c4ec0..f135d423c0 100644 --- a/xbmc/cores/omxplayer/OMXHelper.cpp +++ b/xbmc/cores/omxplayer/OMXHelper.cpp @@ -134,15 +134,11 @@ bool OMXDoProcessing(struct SOmxPlayerState &m_OmxPlayerState, int m_playSpeed, m_OmxPlayerState.interlace_method = CMediaSettings::GetInstance().GetCurrentVideoSettings().m_InterlaceMethod; // if deinterlace setting has changed, we should close and open video - if (m_OmxPlayerState.current_deinterlace != CMediaSettings::GetInstance().GetCurrentVideoSettings().m_DeinterlaceMode || - (m_OmxPlayerState.current_deinterlace != VS_DEINTERLACEMODE_OFF && - m_OmxPlayerState.interlace_method != CMediaSettings::GetInstance().GetCurrentVideoSettings().m_InterlaceMethod)) + if (m_OmxPlayerState.interlace_method != CMediaSettings::GetInstance().GetCurrentVideoSettings().m_InterlaceMethod) { - CLog::Log(LOGNOTICE, "%s - Reopen stream due to interlace change (%d,%d,%d,%d)", __FUNCTION__, - m_OmxPlayerState.current_deinterlace, CMediaSettings::GetInstance().GetCurrentVideoSettings().m_DeinterlaceMode, + CLog::Log(LOGNOTICE, "%s - Reopen stream due to interlace change (%d,%d)", __FUNCTION__, m_OmxPlayerState.interlace_method, CMediaSettings::GetInstance().GetCurrentVideoSettings().m_InterlaceMethod); - m_OmxPlayerState.current_deinterlace = CMediaSettings::GetInstance().GetCurrentVideoSettings().m_DeinterlaceMode; m_OmxPlayerState.interlace_method = CMediaSettings::GetInstance().GetCurrentVideoSettings().m_InterlaceMethod; reopen_stream = true; } diff --git a/xbmc/cores/omxplayer/OMXPlayerVideo.cpp b/xbmc/cores/omxplayer/OMXPlayerVideo.cpp index c8e1c3f732..f9fa18aa9d 100644 --- a/xbmc/cores/omxplayer/OMXPlayerVideo.cpp +++ b/xbmc/cores/omxplayer/OMXPlayerVideo.cpp @@ -534,7 +534,7 @@ bool OMXPlayerVideo::OpenDecoder() else m_fForcedAspectRatio = 0.0; - bool bVideoDecoderOpen = m_omxVideo.Open(m_hints, m_av_clock, CMediaSettings::GetInstance().GetCurrentVideoSettings().m_DeinterlaceMode, m_hdmi_clock_sync); + bool bVideoDecoderOpen = m_omxVideo.Open(m_hints, m_av_clock, m_hdmi_clock_sync); m_omxVideo.RegisterResolutionUpdateCallBack((void *)this, ResolutionUpdateCallBack); if(!bVideoDecoderOpen) diff --git a/xbmc/cores/omxplayer/OMXVideo.cpp b/xbmc/cores/omxplayer/OMXVideo.cpp index 48296a1e18..311dd66892 100644 --- a/xbmc/cores/omxplayer/OMXVideo.cpp +++ b/xbmc/cores/omxplayer/OMXVideo.cpp @@ -73,7 +73,6 @@ COMXVideo::COMXVideo(CRenderManager& renderManager, CProcessInfo &processInfo) : m_extradata = NULL; m_extrasize = 0; m_deinterlace = false; - m_deinterlace_request = VS_DEINTERLACEMODE_OFF; m_hdmi_clock_sync = false; m_drop_state = false; m_decoded_width = 0; @@ -175,14 +174,9 @@ bool COMXVideo::PortSettingsChanged(ResolutionUpdateInfo &resinfo) interlace.nPortIndex = m_omx_decoder.GetOutputPort(); omx_err = m_omx_decoder.GetConfig(OMX_IndexConfigCommonInterlace, &interlace); - if(m_deinterlace_request == VS_DEINTERLACEMODE_FORCE) - m_deinterlace = true; - else if(m_deinterlace_request == VS_DEINTERLACEMODE_OFF) - m_deinterlace = false; - else - m_deinterlace = interlace.eMode != OMX_InterlaceProgressive; + m_deinterlace = interlace.eMode != OMX_InterlaceProgressive; - CLog::Log(LOGDEBUG, "%s::%s - %dx%d@%.2f interlace:%d deinterlace:%d", CLASSNAME, __func__, + CLog::Log(LOGDEBUG, "%s::%s - %dx%d@%.2f interlace:%d deinterlace:%d", CLASSNAME, __func__, port_image.format.video.nFrameWidth, port_image.format.video.nFrameHeight, port_image.format.video.xFramerate / (float)(1<<16), interlace.eMode, m_deinterlace); @@ -240,12 +234,12 @@ bool COMXVideo::PortSettingsChanged(ResolutionUpdateInfo &resinfo) } } - if(m_deinterlace) - { - EINTERLACEMETHOD interlace_method = CMediaSettings::GetInstance().GetCurrentVideoSettings().m_InterlaceMethod; - if (interlace_method == VS_INTERLACEMETHOD_AUTO) - interlace_method = VS_INTERLACEMETHOD_MMAL_ADVANCED; + EINTERLACEMETHOD interlace_method = CMediaSettings::GetInstance().GetCurrentVideoSettings().m_InterlaceMethod; + if (interlace_method == VS_INTERLACEMETHOD_AUTO) + interlace_method = VS_INTERLACEMETHOD_MMAL_ADVANCED; + if (m_deinterlace && interlace_method != VS_INTERLACEMETHOD_NONE) + { bool advanced_deinterlace = interlace_method == VS_INTERLACEMETHOD_MMAL_ADVANCED || interlace_method == VS_INTERLACEMETHOD_MMAL_ADVANCED_HALF; bool half_framerate = interlace_method == VS_INTERLACEMETHOD_MMAL_ADVANCED_HALF || interlace_method == VS_INTERLACEMETHOD_MMAL_BOB_HALF; @@ -371,7 +365,7 @@ bool COMXVideo::PortSettingsChanged(ResolutionUpdateInfo &resinfo) return true; } -bool COMXVideo::Open(CDVDStreamInfo &hints, OMXClock *clock, EDEINTERLACEMODE deinterlace, bool hdmi_clock_sync) +bool COMXVideo::Open(CDVDStreamInfo &hints, OMXClock *clock, bool hdmi_clock_sync) { CSingleLock lock (m_critSection); bool vflip = false; @@ -515,7 +509,6 @@ bool COMXVideo::Open(CDVDStreamInfo &hints, OMXClock *clock, EDEINTERLACEMODE de return false; break; } - m_deinterlace_request = deinterlace; if(!m_omx_decoder.Initialize(decoder_name, OMX_IndexParamVideoInit)) return false; @@ -679,9 +672,9 @@ bool COMXVideo::Open(CDVDStreamInfo &hints, OMXClock *clock, EDEINTERLACEMODE de return false; CLog::Log(LOGDEBUG, - "%s::%s - decoder_component(0x%p), input_port(0x%x), output_port(0x%x) deinterlace %d hdmiclocksync %d\n", + "%s::%s - decoder_component(0x%p), input_port(0x%x), output_port(0x%x) hdmiclocksync %d\n", CLASSNAME, __func__, m_omx_decoder.GetComponent(), m_omx_decoder.GetInputPort(), m_omx_decoder.GetOutputPort(), - m_deinterlace_request, m_hdmi_clock_sync); + m_hdmi_clock_sync); return true; } diff --git a/xbmc/cores/omxplayer/OMXVideo.h b/xbmc/cores/omxplayer/OMXVideo.h index fd101e7c7b..86296b58d1 100644 --- a/xbmc/cores/omxplayer/OMXVideo.h +++ b/xbmc/cores/omxplayer/OMXVideo.h @@ -59,7 +59,7 @@ public: // Required overrides bool SendDecoderConfig(); - bool Open(CDVDStreamInfo &hints, OMXClock *clock, EDEINTERLACEMODE deinterlace = VS_DEINTERLACEMODE_OFF, bool hdmi_clock_sync = false); + bool Open(CDVDStreamInfo &hints, OMXClock *clock, bool hdmi_clock_sync = false); bool PortSettingsChanged(ResolutionUpdateInfo &resinfo); void RegisterResolutionUpdateCallBack(void *ctx, ResolutionUpdateCallBackFn callback) { m_res_ctx = ctx; m_res_callback = callback; } void Close(void); @@ -104,7 +104,6 @@ protected: std::string m_video_codec_name; bool m_deinterlace; - EDEINTERLACEMODE m_deinterlace_request; bool m_hdmi_clock_sync; ResolutionUpdateCallBackFn m_res_callback; void *m_res_ctx; diff --git a/xbmc/settings/AdvancedSettings.cpp b/xbmc/settings/AdvancedSettings.cpp index e7f13a73e5..6beebe0c9c 100644 --- a/xbmc/settings/AdvancedSettings.cpp +++ b/xbmc/settings/AdvancedSettings.cpp @@ -156,7 +156,6 @@ void CAdvancedSettings::Initialize() m_DXVACheckCompatibility = false; m_DXVACheckCompatibilityPresent = false; m_DXVAForceProcessorRenderer = true; - m_DXVANoDeintProcForProgressive = false; m_DXVAAllowHqScaling = true; m_videoFpsDetect = 1; m_videoBusyDialogDelay_ms = 500; @@ -644,7 +643,6 @@ void CAdvancedSettings::ParseSettingsFile(const std::string &file) m_DXVACheckCompatibilityPresent = XMLUtils::GetBoolean(pElement,"checkdxvacompatibility", m_DXVACheckCompatibility); XMLUtils::GetBoolean(pElement,"forcedxvarenderer", m_DXVAForceProcessorRenderer); - XMLUtils::GetBoolean(pElement,"dxvanodeintforprogressive", m_DXVANoDeintProcForProgressive); XMLUtils::GetBoolean(pElement, "dxvaallowhqscaling", m_DXVAAllowHqScaling); XMLUtils::GetBoolean(pElement, "usedisplaycontrolhwstereo", m_useDisplayControlHWStereo); //0 = disable fps detect, 1 = only detect on timestamps with uniform spacing, 2 detect on all timestamps diff --git a/xbmc/settings/AdvancedSettings.h b/xbmc/settings/AdvancedSettings.h index bcbd5d1c68..1727580c0c 100644 --- a/xbmc/settings/AdvancedSettings.h +++ b/xbmc/settings/AdvancedSettings.h @@ -187,7 +187,6 @@ class CAdvancedSettings : public ISettingCallback, public ISettingsHandler bool m_DXVACheckCompatibility; bool m_DXVACheckCompatibilityPresent; bool m_DXVAForceProcessorRenderer; - bool m_DXVANoDeintProcForProgressive; bool m_DXVAAllowHqScaling; int m_videoFpsDetect; int m_videoBusyDialogDelay_ms; diff --git a/xbmc/settings/MediaSettings.cpp b/xbmc/settings/MediaSettings.cpp index 859a3b8617..2d9358f14d 100644 --- a/xbmc/settings/MediaSettings.cpp +++ b/xbmc/settings/MediaSettings.cpp @@ -85,24 +85,9 @@ bool CMediaSettings::Load(const TiXmlNode *settings) const TiXmlElement *pElement = settings->FirstChildElement("defaultvideosettings"); if (pElement != NULL) { - int deinterlaceMode; - bool deinterlaceModePresent = XMLUtils::GetInt(pElement, "deinterlacemode", deinterlaceMode, VS_DEINTERLACEMODE_OFF, VS_DEINTERLACEMODE_FORCE); int interlaceMethod; bool interlaceMethodPresent = XMLUtils::GetInt(pElement, "interlacemethod", interlaceMethod, VS_INTERLACEMETHOD_AUTO, VS_INTERLACEMETHOD_MAX); - // For smooth conversion of settings stored before the deinterlaceMode existed - if (!deinterlaceModePresent && interlaceMethodPresent) - { - if (interlaceMethod == VS_INTERLACEMETHOD_NONE) - { - deinterlaceMode = VS_DEINTERLACEMODE_OFF; - interlaceMethod = VS_INTERLACEMETHOD_AUTO; - } - else if (interlaceMethod == VS_INTERLACEMETHOD_AUTO) - deinterlaceMode = VS_DEINTERLACEMODE_AUTO; - else - deinterlaceMode = VS_DEINTERLACEMODE_FORCE; - } - m_defaultVideoSettings.m_DeinterlaceMode = (EDEINTERLACEMODE)deinterlaceMode; + m_defaultVideoSettings.m_InterlaceMethod = (EINTERLACEMETHOD)interlaceMethod; int scalingMethod; if (!XMLUtils::GetInt(pElement, "scalingmethod", scalingMethod, VS_SCALINGMETHOD_NEAREST, VS_SCALINGMETHOD_MAX)) @@ -226,7 +211,6 @@ bool CMediaSettings::Save(TiXmlNode *settings) const if (pNode == NULL) return false; - XMLUtils::SetInt(pNode, "deinterlacemode", m_defaultVideoSettings.m_DeinterlaceMode); XMLUtils::SetInt(pNode, "interlacemethod", m_defaultVideoSettings.m_InterlaceMethod); XMLUtils::SetInt(pNode, "scalingmethod", m_defaultVideoSettings.m_ScalingMethod); XMLUtils::SetFloat(pNode, "noisereduction", m_defaultVideoSettings.m_NoiseReduction); diff --git a/xbmc/settings/VideoSettings.cpp b/xbmc/settings/VideoSettings.cpp index 812bead9c5..2f91ccae57 100644 --- a/xbmc/settings/VideoSettings.cpp +++ b/xbmc/settings/VideoSettings.cpp @@ -29,7 +29,6 @@ CVideoSettings::CVideoSettings() { - m_DeinterlaceMode = VS_DEINTERLACEMODE_AUTO; m_InterlaceMethod = VS_INTERLACEMETHOD_AUTO; m_ScalingMethod = VS_SCALINGMETHOD_LINEAR; m_ViewMode = ViewModeNormal; @@ -60,7 +59,6 @@ CVideoSettings::CVideoSettings() bool CVideoSettings::operator!=(const CVideoSettings &right) const { - if (m_DeinterlaceMode != right.m_DeinterlaceMode) return true; if (m_InterlaceMethod != right.m_InterlaceMethod) return true; if (m_ScalingMethod != right.m_ScalingMethod) return true; if (m_ViewMode != right.m_ViewMode) return true; diff --git a/xbmc/settings/VideoSettings.h b/xbmc/settings/VideoSettings.h index 8ad208aa3c..0638b5f44c 100644 --- a/xbmc/settings/VideoSettings.h +++ b/xbmc/settings/VideoSettings.h @@ -35,7 +35,6 @@ public: bool operator!=(const CVideoSettings &right) const; - EDEINTERLACEMODE m_DeinterlaceMode; EINTERLACEMETHOD m_InterlaceMethod; ESCALINGMETHOD m_ScalingMethod; int m_ViewMode; // current view mode diff --git a/xbmc/video/VideoDatabase.cpp b/xbmc/video/VideoDatabase.cpp index 7f3e731791..6047073281 100644 --- a/xbmc/video/VideoDatabase.cpp +++ b/xbmc/video/VideoDatabase.cpp @@ -4188,7 +4188,6 @@ bool CVideoDatabase::GetVideoSettings(int idFile, CVideoSettings &settings) settings.m_SubtitleStream = m_pDS->fv("SubtitleStream").get_asInt(); settings.m_ViewMode = m_pDS->fv("ViewMode").get_asInt(); settings.m_ResumeTime = m_pDS->fv("ResumeTime").get_asInt(); - settings.m_DeinterlaceMode = (EDEINTERLACEMODE)m_pDS->fv("DeinterlaceMode").get_asInt(); settings.m_InterlaceMethod = (EINTERLACEMETHOD)m_pDS->fv("Deinterlace").get_asInt(); settings.m_VolumeAmplification = m_pDS->fv("VolumeAmplification").get_asFloat(); settings.m_OutputToAllSpeakers = m_pDS->fv("OutputToAllSpeakers").get_asBool(); @@ -4227,13 +4226,11 @@ void CVideoDatabase::SetVideoSettings(const std::string& strFilenameAndPath, con // update the item strSQL=PrepareSQL("update settings set Deinterlace=%i,ViewMode=%i,ZoomAmount=%f,PixelRatio=%f,VerticalShift=%f," "AudioStream=%i,SubtitleStream=%i,SubtitleDelay=%f,SubtitlesOn=%i,Brightness=%f,Contrast=%f,Gamma=%f," - "VolumeAmplification=%f,AudioDelay=%f,OutputToAllSpeakers=%i,Sharpness=%f,NoiseReduction=%f,NonLinStretch=%i,PostProcess=%i,ScalingMethod=%i," - "DeinterlaceMode=%i,", + "VolumeAmplification=%f,AudioDelay=%f,OutputToAllSpeakers=%i,Sharpness=%f,NoiseReduction=%f,NonLinStretch=%i,PostProcess=%i,ScalingMethod=%i,", setting.m_InterlaceMethod, setting.m_ViewMode, setting.m_CustomZoomAmount, setting.m_CustomPixelRatio, setting.m_CustomVerticalShift, setting.m_AudioStream, setting.m_SubtitleStream, setting.m_SubtitleDelay, setting.m_SubtitleOn, setting.m_Brightness, setting.m_Contrast, setting.m_Gamma, setting.m_VolumeAmplification, setting.m_AudioDelay, - setting.m_OutputToAllSpeakers,setting.m_Sharpness,setting.m_NoiseReduction,setting.m_CustomNonLinStretch,setting.m_PostProcess,setting.m_ScalingMethod, - setting.m_DeinterlaceMode); + setting.m_OutputToAllSpeakers,setting.m_Sharpness,setting.m_NoiseReduction,setting.m_CustomNonLinStretch,setting.m_PostProcess,setting.m_ScalingMethod); std::string strSQL2; strSQL2=PrepareSQL("ResumeTime=%i,StereoMode=%i,StereoInvert=%i, VideoStream=%i where idFile=%i\n", setting.m_ResumeTime, setting.m_StereoMode, setting.m_StereoInvert, setting.m_VideoStream, idFile); @@ -4248,15 +4245,15 @@ void CVideoDatabase::SetVideoSettings(const std::string& strFilenameAndPath, con "AudioStream,SubtitleStream,SubtitleDelay,SubtitlesOn,Brightness," "Contrast,Gamma,VolumeAmplification,AudioDelay,OutputToAllSpeakers," "ResumeTime," - "Sharpness,NoiseReduction,NonLinStretch,PostProcess,ScalingMethod,DeinterlaceMode,StereoMode,StereoInvert,VideoStream) " + "Sharpness,NoiseReduction,NonLinStretch,PostProcess,ScalingMethod,StereoMode,StereoInvert,VideoStream) " "VALUES "; - strSQL += PrepareSQL("(%i,%i,%i,%f,%f,%f,%i,%i,%f,%i,%f,%f,%f,%f,%f,%i,%i,%f,%f,%i,%i,%i,%i,%i,%i,%i)", + strSQL += PrepareSQL("(%i,%i,%i,%f,%f,%f,%i,%i,%f,%i,%f,%f,%f,%f,%f,%i,%i,%f,%f,%i,%i,%i,%i,%i,%i)", idFile, setting.m_InterlaceMethod, setting.m_ViewMode, setting.m_CustomZoomAmount, setting.m_CustomPixelRatio, setting.m_CustomVerticalShift, setting.m_AudioStream, setting.m_SubtitleStream, setting.m_SubtitleDelay, setting.m_SubtitleOn, setting.m_Brightness, setting.m_Contrast, setting.m_Gamma, setting.m_VolumeAmplification, setting.m_AudioDelay, setting.m_OutputToAllSpeakers, setting.m_ResumeTime, setting.m_Sharpness, setting.m_NoiseReduction, setting.m_CustomNonLinStretch, setting.m_PostProcess, setting.m_ScalingMethod, - setting.m_DeinterlaceMode, setting.m_StereoMode, setting.m_StereoInvert, setting.m_VideoStream); + setting.m_StereoMode, setting.m_StereoInvert, setting.m_VideoStream); m_pDS->exec(strSQL); } } diff --git a/xbmc/video/dialogs/GUIDialogVideoSettings.cpp b/xbmc/video/dialogs/GUIDialogVideoSettings.cpp index afbe2032b9..f9bc12da1a 100644 --- a/xbmc/video/dialogs/GUIDialogVideoSettings.cpp +++ b/xbmc/video/dialogs/GUIDialogVideoSettings.cpp @@ -52,7 +52,6 @@ #define SETTING_VIDEO_VDPAU_NOISE "vdpau.noise" #define SETTING_VIDEO_VDPAU_SHARPNESS "vdpau.sharpness" -#define SETTING_VIDEO_DEINTERLACEMODE "video.deinterlacemode" #define SETTING_VIDEO_INTERLACEMETHOD "video.interlacemethod" #define SETTING_VIDEO_SCALINGMETHOD "video.scalingmethod" @@ -81,9 +80,7 @@ void CGUIDialogVideoSettings::OnSettingChanged(const CSetting *setting) CVideoSettings &videoSettings = CMediaSettings::GetInstance().GetCurrentVideoSettings(); const std::string &settingId = setting->GetId(); - if (settingId == SETTING_VIDEO_DEINTERLACEMODE) - videoSettings.m_DeinterlaceMode = static_cast<EDEINTERLACEMODE>(static_cast<const CSettingInt*>(setting)->GetValue()); - else if (settingId == SETTING_VIDEO_INTERLACEMETHOD) + if (settingId == SETTING_VIDEO_INTERLACEMETHOD) videoSettings.m_InterlaceMethod = static_cast<EINTERLACEMETHOD>(static_cast<const CSettingInt*>(setting)->GetValue()); else if (settingId == SETTING_VIDEO_SCALINGMETHOD) videoSettings.m_ScalingMethod = static_cast<ESCALINGMETHOD>(static_cast<const CSettingInt*>(setting)->GetValue()); @@ -255,16 +252,9 @@ void CGUIDialogVideoSettings::InitializeSettings() CVideoSettings &videoSettings = CMediaSettings::GetInstance().GetCurrentVideoSettings(); StaticIntegerSettingOptions entries; - if (g_application.m_pPlayer->Supports(VS_DEINTERLACEMODE_OFF)) - entries.push_back(std::make_pair(16039, VS_DEINTERLACEMODE_OFF)); - if (g_application.m_pPlayer->Supports(VS_DEINTERLACEMODE_AUTO)) - entries.push_back(std::make_pair(16040, VS_DEINTERLACEMODE_AUTO)); - if (g_application.m_pPlayer->Supports(VS_DEINTERLACEMODE_FORCE)) - entries.push_back(std::make_pair(16041, VS_DEINTERLACEMODE_FORCE)); - if (!entries.empty()) - AddSpinner(groupVideo, SETTING_VIDEO_DEINTERLACEMODE, 16037, 0, static_cast<int>(videoSettings.m_DeinterlaceMode), entries); entries.clear(); + entries.push_back(std::make_pair(16039, VS_INTERLACEMETHOD_NONE)); entries.push_back(std::make_pair(16019, VS_INTERLACEMETHOD_AUTO)); entries.push_back(std::make_pair(20131, VS_INTERLACEMETHOD_RENDER_BLEND)); entries.push_back(std::make_pair(20130, VS_INTERLACEMETHOD_RENDER_WEAVE_INVERTED)); @@ -302,14 +292,7 @@ void CGUIDialogVideoSettings::InitializeSettings() if (!entries.empty()) { - CSettingInt *settingInterlaceMethod = AddSpinner(groupVideo, SETTING_VIDEO_INTERLACEMETHOD, 16038, 0, static_cast<int>(videoSettings.m_InterlaceMethod), entries); - - CSettingDependency dependencyDeinterlaceModeOff(SettingDependencyTypeEnable, m_settingsManager); - dependencyDeinterlaceModeOff.And() - ->Add(CSettingDependencyConditionPtr(new CSettingDependencyCondition(SETTING_VIDEO_DEINTERLACEMODE, "0", SettingDependencyOperatorEquals, true, m_settingsManager))); - SettingDependencies depsDeinterlaceModeOff; - depsDeinterlaceModeOff.push_back(dependencyDeinterlaceModeOff); - settingInterlaceMethod->SetDependencies(depsDeinterlaceModeOff); + AddSpinner(groupVideo, SETTING_VIDEO_INTERLACEMETHOD, 16038, 0, static_cast<int>(videoSettings.m_InterlaceMethod), entries); } entries.clear(); |