Skip to content
This repository was archived by the owner on Dec 24, 2024. It is now read-only.

Commit d957910

Browse files
committed
ADD: ffmpeg deinterlace option + call yadif by its name
1 parent 66cfed7 commit d957910

6 files changed

Lines changed: 35 additions & 14 deletions

File tree

addons/resource.language.en_gb/resources/strings.po

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7972,7 +7972,7 @@ msgstr ""
79727972

79737973
#: xbmc/video/dialogs/GUIDialogVideoSettings.cpp
79747974
msgctxt "#16020"
7975-
msgid "Deinterlace"
7975+
msgid "Yadif"
79767976
msgstr ""
79777977

79787978
#: xbmc/video/dialogs/GUIDialogVideoSettings.cpp
@@ -8344,7 +8344,12 @@ msgctxt "#16335"
83448344
msgid "IMX - Fast motion (double)"
83458345
msgstr ""
83468346

8347-
#empty strings from id 16336 to 16399
8347+
#: xbmc/video/dialogs/GUIDialogVideoSettings.cpp
8348+
msgctxt "#16336"
8349+
msgid "Software - FFmpeg"
8350+
msgstr ""
8351+
8352+
#empty strings from id 16337 to 16399
83488353

83498354
#: xbmc/video/dialogs/GUIDialogVideoSettings.cpp
83508355
msgctxt "#16400"

xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3295,12 +3295,16 @@ bool CLinuxRendererGLES::Supports(EINTERLACEMETHOD method)
32953295
return false;
32963296
}
32973297

3298-
#if !defined(TARGET_ANDROID) && (defined(__i386__) || defined(__x86_64__))
3299-
if(method == VS_INTERLACEMETHOD_DEINTERLACE
3300-
|| method == VS_INTERLACEMETHOD_DEINTERLACE_HALF
3301-
|| method == VS_INTERLACEMETHOD_SW_BLEND)
3298+
#if (defined(__i386__) || defined(__x86_64__))
3299+
if(method == VS_INTERLACEMETHOD_YADIF
3300+
|| method == VS_INTERLACEMETHOD_YADIF_HALF
3301+
|| method == VS_INTERLACEMETHOD_RENDER_BOB
3302+
|| method == VS_INTERLACEMETHOD_SW_FFMPEG
3303+
|| method == VS_INTERLACEMETHOD_SW_BLEND
3304+
|| method == VS_INTERLACEMETHOD_RENDER_BOB_INVERTED)
33023305
#else
3303-
if(method == VS_INTERLACEMETHOD_SW_BLEND
3306+
if(method == VS_INTERLACEMETHOD_SW_FFMPEG
3307+
|| method == VS_INTERLACEMETHOD_SW_BLEND
33043308
|| method == VS_INTERLACEMETHOD_RENDER_BOB
33053309
|| method == VS_INTERLACEMETHOD_RENDER_BOB_INVERTED)
33063310
#endif
@@ -3386,7 +3390,7 @@ EINTERLACEMETHOD CLinuxRendererGLES::AutoInterlaceMethod()
33863390
return VS_INTERLACEMETHOD_IMX_FASTMOTION;
33873391

33883392
#if !defined(TARGET_ANDROID) && (defined(__i386__) || defined(__x86_64__))
3389-
return VS_INTERLACEMETHOD_DEINTERLACE_HALF;
3393+
return VS_INTERLACEMETHOD_YADIF_HALF;
33903394
#else
33913395
return VS_INTERLACEMETHOD_RENDER_BOB;
33923396
#endif

xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,7 @@ unsigned int CDVDVideoCodecFFmpeg::SetFilters(unsigned int flags)
412412
}
413413
}
414414

415+
#if (defined(__i386__) || defined(__x86_64__))
415416
if(flags & FILTER_DEINTERLACE_YADIF)
416417
{
417418
if(flags & FILTER_DEINTERLACE_HALFED)
@@ -424,6 +425,7 @@ unsigned int CDVDVideoCodecFFmpeg::SetFilters(unsigned int flags)
424425

425426
flags &= ~FILTER_DEINTERLACE_ANY | FILTER_DEINTERLACE_YADIF;
426427
}
428+
#endif
427429

428430
return flags;
429431
}

xbmc/cores/dvdplayer/DVDPlayerVideo.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,9 +553,9 @@ void CDVDPlayerVideo::Process()
553553

554554
if (mDeintMode != VS_DEINTERLACEMODE_OFF)
555555
{
556-
if (mInt == VS_INTERLACEMETHOD_DEINTERLACE)
556+
if (mInt == VS_INTERLACEMETHOD_YADIF)
557557
mFilters = CDVDVideoCodec::FILTER_DEINTERLACE_ANY;
558-
else if(mInt == VS_INTERLACEMETHOD_DEINTERLACE_HALF)
558+
else if(mInt == VS_INTERLACEMETHOD_YADIF_HALF)
559559
mFilters = CDVDVideoCodec::FILTER_DEINTERLACE_ANY | CDVDVideoCodec::FILTER_DEINTERLACE_HALFED;
560560

561561
if (mDeintMode == VS_DEINTERLACEMODE_AUTO && mFilters)
@@ -678,6 +678,13 @@ void CDVDPlayerVideo::Process()
678678
sPostProcessType += g_advancedSettings.m_videoPPFFmpegDeint;
679679
bPostProcessDeint = true;
680680
}
681+
else if(mInt == VS_INTERLACEMETHOD_SW_FFMPEG)
682+
{
683+
if (!sPostProcessType.empty())
684+
sPostProcessType += ",";
685+
sPostProcessType += "ffmpegdeint";
686+
bPostProcessDeint = true;
687+
}
681688
}
682689

683690
if (CMediaSettings::GetInstance().GetCurrentVideoSettings().m_PostProcess)

xbmc/settings/VideoSettings.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ enum EINTERLACEMETHOD
4545
VS_INTERLACEMETHOD_RENDER_BOB_INVERTED=5,
4646
VS_INTERLACEMETHOD_RENDER_BOB=6,
4747

48-
VS_INTERLACEMETHOD_DEINTERLACE=7,
48+
VS_INTERLACEMETHOD_YADIF=7,
4949

5050
VS_INTERLACEMETHOD_VDPAU_BOB=8,
5151
VS_INTERLACEMETHOD_INVERSE_TELECINE=9,
@@ -55,7 +55,7 @@ enum EINTERLACEMETHOD
5555
VS_INTERLACEMETHOD_VDPAU_TEMPORAL_HALF=13,
5656
VS_INTERLACEMETHOD_VDPAU_TEMPORAL_SPATIAL=14,
5757
VS_INTERLACEMETHOD_VDPAU_TEMPORAL_SPATIAL_HALF=15,
58-
VS_INTERLACEMETHOD_DEINTERLACE_HALF=16,
58+
VS_INTERLACEMETHOD_YADIF_HALF=16,
5959
VS_INTERLACEMETHOD_DXVA_BOB = 17,
6060
VS_INTERLACEMETHOD_DXVA_BEST = 18,
6161
// VS_INTERLACEMETHOD_DXVA_ANY = 19, Legacy
@@ -75,6 +75,8 @@ enum EINTERLACEMETHOD
7575
VS_INTERLACEMETHOD_IMX_FASTMOTION = 29,
7676
VS_INTERLACEMETHOD_IMX_FASTMOTION_DOUBLE = 30,
7777

78+
VS_INTERLACEMETHOD_SW_FFMPEG = 31,
79+
7880
VS_INTERLACEMETHOD_MAX // do not use and keep as last enum value.
7981
};
8082

xbmc/video/dialogs/GUIDialogVideoSettings.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,10 @@ void CGUIDialogVideoSettings::InitializeSettings()
252252
entries.push_back(std::make_pair(20129, VS_INTERLACEMETHOD_RENDER_WEAVE));
253253
entries.push_back(std::make_pair(16022, VS_INTERLACEMETHOD_RENDER_BOB_INVERTED));
254254
entries.push_back(std::make_pair(16021, VS_INTERLACEMETHOD_RENDER_BOB));
255-
entries.push_back(std::make_pair(16020, VS_INTERLACEMETHOD_DEINTERLACE));
256-
entries.push_back(std::make_pair(16036, VS_INTERLACEMETHOD_DEINTERLACE_HALF));
255+
entries.push_back(std::make_pair(16020, VS_INTERLACEMETHOD_YADIF));
256+
entries.push_back(std::make_pair(16036, VS_INTERLACEMETHOD_YADIF_HALF));
257257
entries.push_back(std::make_pair(16324, VS_INTERLACEMETHOD_SW_BLEND));
258+
entries.push_back(std::make_pair(16336, VS_INTERLACEMETHOD_SW_FFMPEG));
258259
entries.push_back(std::make_pair(16314, VS_INTERLACEMETHOD_INVERSE_TELECINE));
259260
entries.push_back(std::make_pair(16311, VS_INTERLACEMETHOD_VDPAU_TEMPORAL_SPATIAL));
260261
entries.push_back(std::make_pair(16310, VS_INTERLACEMETHOD_VDPAU_TEMPORAL));

0 commit comments

Comments
 (0)