Move the "Force BT.601" option out of the FFmpegSource category as it's no longer FFMS2-specific, and make it on by default

Originally committed to SVN as r6708.
This commit is contained in:
Thomas Goyne 2012-04-16 23:55:21 +00:00
parent eceac482d0
commit 3253ccdb90
4 changed files with 5 additions and 6 deletions

View file

@ -341,7 +341,6 @@
},
"FFmpegSource" : {
"Decoding Threads" : -1,
"Force BT.601" : false,
"Unsafe Seeking" : false
}
}
@ -562,6 +561,7 @@
},
"Pattern" : false
},
"Force BT.601" : true,
"Open Audio" : false,
"Overscan Mask" : false,
"Provider" : "ffmpegsource",

View file

@ -576,6 +576,8 @@ Advanced_Video::Advanced_Video(wxTreebook *book, Preferences *parent): OptionPag
wxArrayString sp_choice = vec_to_arrstr(SubtitlesProviderFactory::GetClasses());
OptionChoice(expert, _("Subtitles provider"), sp_choice, "Subtitle/Provider");
CellSkip(expert);
OptionAdd(expert, _("Force BT.601"), "Video/Force BT.601");
#ifdef WITH_AVISYNTH
wxFlexGridSizer *avisynth = PageSizer("Avisynth");
@ -593,9 +595,6 @@ Advanced_Video::Advanced_Video(wxTreebook *book, Preferences *parent): OptionPag
OptionAdd(ffms, _("Decoding threads"), "Provider/Video/FFmpegSource/Decoding Threads", -1);
OptionAdd(ffms, _("Enable unsafe seeking"), "Provider/Video/FFmpegSource/Unsafe Seeking");
#if FFMS_VERSION >= ((2 << 24) | (17 << 16) | (1 << 8) | 0)
OptionAdd(ffms, _("Force BT.601"), "Provider/Video/FFmpegSource/Force BT.601");
#endif
#endif
SetSizerAndFit(sizer);

View file

@ -160,7 +160,7 @@ file_exit:
/// @todo maybe read ColorMatrix hints for d2v files?
AVSValue args[2] = { script, "Rec601" };
if (!OPT_GET("Provider/Video/FFmpegSource/Force BT.601")->GetBool() && (vi.width > 1024 || vi.height >= 600)) {
if (!OPT_GET("Video/Force BT.601")->GetBool() && (vi.width > 1024 || vi.height >= 600)) {
args[1] = "Rec709";
colorspace = "BT.709";
}

View file

@ -179,7 +179,7 @@ void FFmpegSourceVideoProvider::LoadVideo(wxString filename) {
int CS = TempFrame->ColorSpace;
#if FFMS_VERSION >= ((2 << 24) | (17 << 16) | (1 << 8) | 0)
if (CS != FFMS_CS_RGB && CS != FFMS_CS_BT470BG && OPT_GET("Provider/Video/FFmpegSource/Force BT.601")->GetBool()) {
if (CS != FFMS_CS_RGB && CS != FFMS_CS_BT470BG && OPT_GET("Video/Force BT.601")->GetBool()) {
if (FFMS_SetInputFormatV(VideoSource, FFMS_CS_BT470BG, FFMS_CR_MPEG, FFMS_GetPixFmt(""), &ErrInfo))
throw VideoOpenError(std::string("Failed to set input format: ") + ErrInfo.Buffer);