Example #1
0
 private void LoadCodecWindow()
 {
     //загрузка
     if (m.outvcodec == "x264")
     {
         x264c = new x264(m, this, p);
         grid_codec.Children.Add(x264c);
     }
     else if (m.outvcodec == "x262")
     {
         x262c = new x262(m, this, p);
         grid_codec.Children.Add(x262c);
     }
     else if (m.outvcodec == "XviD")
     {
         xvid = new XviD(m, this, p);
         grid_codec.Children.Add(xvid);
     }
     else if (m.outvcodec == "MPEG1")
     {
         mpeg1 = new FMPEG1(m, this, p);
         grid_codec.Children.Add(mpeg1);
     }
     else if (m.outvcodec == "MPEG2")
     {
         mpeg2 = new FMPEG2(m, this, p);
         grid_codec.Children.Add(mpeg2);
     }
     else if (m.outvcodec == "MPEG4")
     {
         mpeg4 = new FMPEG4(m, this, p);
         grid_codec.Children.Add(mpeg4);
     }
     else if (m.outvcodec == "DV")
     {
         dv = new FDV(m, this, p);
         grid_codec.Children.Add(dv);
     }
     else if (m.outvcodec == "HUFF")
     {
         huff = new FFHUFF(m, this, p);
         grid_codec.Children.Add(huff);
     }
     else if (m.outvcodec == "FFV1")
     {
         ffv1 = new FFV1(m, this, p);
         grid_codec.Children.Add(ffv1);
     }
     else if (m.outvcodec == "FLV1")
     {
         flv = new FLV1(m, this, p);
         grid_codec.Children.Add(flv);
     }
     else if (m.outvcodec == "MJPEG")
     {
         mjpeg = new FMJPEG(m, this, p);
         grid_codec.Children.Add(mjpeg);
     }
     else if (m.outvcodec == "Copy")
     {
         copyordisabled = new CopyOrDisabled();
             copyordisabled.text_info.Content = "Codec: " + m.invcodecshort + Environment.NewLine;
             copyordisabled.text_info.Content += "Bitrate: " + m.invbitrate + " kbps" + Environment.NewLine;
             copyordisabled.text_info.Content += "Resolution: " + m.inresw + "x" + m.inresh + Environment.NewLine;
             copyordisabled.text_info.Content += "Framerate: " + m.inframerate + " fps";
         grid_codec.Children.Add(copyordisabled);
     }
 }
Example #2
0
 private void UnLoadCodecWindow()
 {
     //очистка
     if (x264c != null)
     {
         grid_codec.Children.Remove(x264c);
         x264c = null;
     }
     else if (x262c != null)
     {
         grid_codec.Children.Remove(x262c);
         x262c = null;
     }
     else if (xvid != null)
     {
         grid_codec.Children.Remove(xvid);
         xvid = null;
     }
     else if (mpeg1 != null)
     {
         grid_codec.Children.Remove(mpeg1);
         mpeg1 = null;
     }
     else if (mpeg2 != null)
     {
         grid_codec.Children.Remove(mpeg2);
         mpeg2 = null;
     }
     else if (mpeg4 != null)
     {
         grid_codec.Children.Remove(mpeg4);
         mpeg4 = null;
     }
     else if (dv != null)
     {
         grid_codec.Children.Remove(dv);
         dv = null;
     }
     else if (huff != null)
     {
         grid_codec.Children.Remove(huff);
         huff = null;
     }
     else if (ffv1 != null)
     {
         grid_codec.Children.Remove(ffv1);
         ffv1 = null;
     }
     else if (flv != null)
     {
         grid_codec.Children.Remove(flv);
         flv = null;
     }
     else if (mjpeg != null)
     {
         grid_codec.Children.Remove(mjpeg);
         mjpeg = null;
     }
     else if (copyordisabled != null)
     {
         grid_codec.Children.Remove(copyordisabled);
         copyordisabled = null;
     }
 }
Example #3
0
        public x262_arguments(x262.Presets preset, x262.Tunes tune, x262.Profiles profile)
        {
            //Выставляем значения в соответствии с пресетом
            if (preset == x262.Presets.Ultrafast)
            {
                _aqmode = 0;
                _b_adapt = 0;
                _bframes = 0;
                _lookahead = 0;
                _me = "dia";
                _no_mbtree = true;
                _subme = 0;
            }
            else if (preset == x262.Presets.Superfast)
            {
                _lookahead = 0;
                _me = "dia";
                _no_mbtree = true;
                _subme = 1;
                _weightp = 0;
            }
            else if (preset == x262.Presets.Veryfast)
            {
                _lookahead = 10;
                _subme = 2;
                _weightp = 0;
            }
            else if (preset == x262.Presets.Faster)
            {
                _lookahead = 20;
                _subme = 4;
                _weightp = 0;
            }
            else if (preset == x262.Presets.Fast)
            {
                _subme = 6;
                _lookahead = 30;
                _weightp = 0;
            }
            else if (preset == x262.Presets.Medium)
            {
                //(defaults)
            }
            else if (preset == x262.Presets.Slow)
            {
                _b_adapt = 2;
                _lookahead = 50;
                _me = "umh";
                _subme = 8;
            }
            else if (preset == x262.Presets.Slower)
            {
                _b_adapt = 2;
                _lookahead = 60;
                _me = "umh";
                _subme = 9;
            }
            else if (preset == x262.Presets.Veryslow)
            {
                _b_adapt = 2;
                _bframes = 8;
                _lookahead = 60;
                _me = "umh";
                _merange = 24;
                _subme = 9;
            }
            else if (preset == x262.Presets.Placebo)
            {
                _b_adapt = 2;
                _bframes = 16;
                _lookahead = 60;
                _me = "tesa";
                _merange = 24;
                _no_fastpskip = true;
                _slow_frstpass = true;
                _subme = 9;
            }

            //Изменения под Tune
            if (tune == x262.Tunes.None)
            {
                //(defaults)
            }
            else if (tune == x262.Tunes.Film)
            {
                //
            }
            else if (tune == x262.Tunes.Animation)
            {
                _bframes += 2;
                _psyrdo = 0.4m;
                _aqstrength = "0.6";
            }
            else if (tune == x262.Tunes.Grain)
            {
                _aqstrength = "0.5";
                _ratio_ip = 1.1m;
                _ratio_pb = 1.1m;
                _qcomp = 0.8m;
            }
            else if (tune == x262.Tunes.StillImage)
            {
                _aqstrength = "1.2";
                _psyrdo = 2.0m;
            }
            else if (tune == x262.Tunes.PSNR)
            {
                _aqmode = 0;
                _no_psy = true;
            }
            else if (tune == x262.Tunes.SSIM)
            {
                _aqmode = 2;
                _no_psy = true;
            }
            else if (tune == x262.Tunes.FastDecode)
            {
                //
            }
        }