From 3253ccdb90f122b05820d6022ad8cedd01193793 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Mon, 16 Apr 2012 23:55:21 +0000 Subject: [PATCH] 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. --- aegisub/src/libresrc/default_config.json | 2 +- aegisub/src/preferences.cpp | 5 ++--- aegisub/src/video_provider_avs.cpp | 2 +- aegisub/src/video_provider_ffmpegsource.cpp | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/aegisub/src/libresrc/default_config.json b/aegisub/src/libresrc/default_config.json index 6b3473799..22c38a057 100644 --- a/aegisub/src/libresrc/default_config.json +++ b/aegisub/src/libresrc/default_config.json @@ -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", diff --git a/aegisub/src/preferences.cpp b/aegisub/src/preferences.cpp index ab5653390..a7e445d5d 100644 --- a/aegisub/src/preferences.cpp +++ b/aegisub/src/preferences.cpp @@ -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); diff --git a/aegisub/src/video_provider_avs.cpp b/aegisub/src/video_provider_avs.cpp index 34ca006d2..46f367ba2 100644 --- a/aegisub/src/video_provider_avs.cpp +++ b/aegisub/src/video_provider_avs.cpp @@ -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"; } diff --git a/aegisub/src/video_provider_ffmpegsource.cpp b/aegisub/src/video_provider_ffmpegsource.cpp index a614ae855..aa4d68113 100644 --- a/aegisub/src/video_provider_ffmpegsource.cpp +++ b/aegisub/src/video_provider_ffmpegsource.cpp @@ -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);