Ejemplo n.º 1
0
        public static List <DeinterlaceFilter> GetDeinterlacers(SourceInfo info)
        {
            List <DeinterlaceFilter> filters = new List <DeinterlaceFilter>();

            if (info.sourceType == SourceType.PROGRESSIVE)
            {
                filters.Add(new DeinterlaceFilter(
                                "Do nothing",
                                "#Not doing anything because the source is progressive"));
            }
            else if (info.sourceType == SourceType.DECIMATING)
            {
                ScriptServer.AddTDecimate(info.decimateM, filters);
            }
            else if (info.sourceType == SourceType.INTERLACED)
            {
                ScriptServer.AddYadif(info.fieldOrder, filters);
                ScriptServer.AddTDeint(info.fieldOrder, filters, true, false);
                ScriptServer.AddTDeint(info.fieldOrder, filters, true, true);
                if (info.fieldOrder != FieldOrder.VARIABLE)
                {
                    ScriptServer.AddLeakDeint(info.fieldOrder, filters);
                }
                ScriptServer.AddTMC(info.fieldOrder, filters);
                ScriptServer.AddFieldDeint(info.fieldOrder, filters, true, true);
                ScriptServer.AddFieldDeint(info.fieldOrder, filters, true, false);
            }
            else if (info.sourceType == SourceType.FILM)
            {
                ScriptServer.AddTIVTC("", info.isAnime, false, true, false, info.fieldOrder, filters);
                ScriptServer.AddIVTC(info.fieldOrder, false, true, filters);
            }
            else if (info.sourceType == SourceType.HYBRID_FILM_INTERLACED ||
                     info.sourceType == SourceType.HYBRID_PROGRESSIVE_FILM)
            {
                ScriptServer.AddTIVTC("", info.isAnime, true, info.majorityFilm, false,
                                      info.fieldOrder, filters);
                ScriptServer.AddTIVTC("", info.isAnime, true, info.majorityFilm, true,
                                      info.fieldOrder, filters);
                ScriptServer.AddIVTC(info.fieldOrder, true, info.majorityFilm, filters);
            }
            else if (info.sourceType == SourceType.HYBRID_PROGRESSIVE_INTERLACED)
            {
                ScriptServer.AddYadif(info.fieldOrder, filters);
                ScriptServer.AddTDeint(info.fieldOrder, filters, false, false);
                ScriptServer.AddTDeint(info.fieldOrder, filters, false, true);
                ScriptServer.AddFieldDeint(info.fieldOrder, filters, false, true);
                ScriptServer.AddFieldDeint(info.fieldOrder, filters, false, false);
                if (info.fieldOrder != FieldOrder.VARIABLE)
                {
                    ScriptServer.AddLeakDeint(info.fieldOrder, filters);
                }
                ScriptServer.AddTMC(info.fieldOrder, filters);
            }
            return(filters);
        }