コード例 #1
0
 private void UnLoadCodecWindow()
 {
     //очистка
     if (x265c != null)
     {
         grid_codec.Children.Remove(x265c);
         x265c = null;
     }
     else 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;
     }
 }
コード例 #2
0
ファイル: x265_arguments.cs プロジェクト: MaksHDR/xvid4psp
        public x265_arguments(x265.Presets preset, x265.Tunes tune, x265.Profiles profile)
        {
            //Выставляем значения в соответствии с пресетом
            if (preset == x265.Presets.Ultrafast)
            {
                _lookahead = 0;
                _ctu = 32;
                _merange = 25;
                _b_adapt = 0;
                _subme = 0;
                _me = "dia";
                _early_skip = true;
                _sao = false;
                _weightp = false;
                _rd = 2;
                _reference = 1;
                _aqstrength = "0.0";
                _aqmode = 0; //X265_AQ_NONE
                _cutree = false;

                //scenecutThreshold = 0;
                //bEnableSignHiding = 0;
                //bEnableFastIntra = 1;
            }
            else if (preset == x265.Presets.Superfast)
            {
                _lookahead = 10;
                _ctu = 32;
                _merange = 44;
                _b_adapt = 0;
                _subme = 1;
                _early_skip = true;
                _weightp = false;
                _rd = 2;
                _reference = 1;
                _aqstrength = "0.0";
                _aqmode = 0; //X265_AQ_NONE
                _cutree = false;
                _sao = false;

                //bEnableFastIntra = 1;
            }
            else if (preset == x265.Presets.Veryfast)
            {
                _lookahead = 15;
                _ctu = 32;
                _b_adapt = 0;
                _subme = 1;
                _early_skip = true;
                _rd = 2;
                _reference = 1;
                _cutree = false;

                //bEnableFastIntra = 1;
            }
            else if (preset == x265.Presets.Faster)
            {
                _lookahead = 15;
                _b_adapt = 0;
                _early_skip = true;
                _rd = 2;
                _reference = 1;
                _cutree = false;

                //bEnableFastIntra = 1;
            }
            else if (preset == x265.Presets.Fast)
            {
                _lookahead = 15;
                _b_adapt = 0;
                _rd = 2;
                _reference = 2;

                //bEnableFastIntra = 1;
            }
            else if (preset == x265.Presets.Medium)
            {
                //(defaults)
            }
            else if (preset == x265.Presets.Slow)
            {
                _rect = true;
                _lookahead = 25;
                _rd = 4;
                _subme = 3;
                _max_merge = 3;
                _me = "star";
            }
            else if (preset == x265.Presets.Slower)
            {
                _weightb = true;
                _amp = true;
                _rect = true;
                _lookahead = 30;
                _bframes = 8;
                _rd = 6;
                _subme = 3;
                _max_merge = 3;
                _me = "star";
                _b_intra = true;

                //tuQTMaxInterDepth = 2;
                //tuQTMaxIntraDepth = 2;
            }
            else if (preset == x265.Presets.Veryslow)
            {
                _weightb = true;
                _amp = true;
                _rect = true;
                _lookahead = 40;
                _bframes = 8;
                _rd = 6;
                _subme = 4;
                _max_merge = 4;
                _me = "star";
                _reference = 5;
                _b_intra = true;

                //tuQTMaxInterDepth = 3;
                //tuQTMaxIntraDepth = 3;
            }
            else if (preset == x265.Presets.Placebo)
            {
                _weightb = true;
                _amp = true;
                _rect = true;
                _lookahead = 60;
                _merange = 92;
                _bframes = 8;
                _rd = 6;
                _subme = 5;
                _max_merge = 5;
                _me = "star";
                _reference = 5;
                _slow_firstpass = true;
                _b_intra = true;

                //tuQTMaxInterDepth = 4;
                //tuQTMaxIntraDepth = 4;
                //bEnableTransformSkip = 1;
            }

            //Изменения под Tune
            if (tune == x265.Tunes.None)
            {
                //(defaults)
            }
            else if (tune == x265.Tunes.Grain)
            {
                _deblockBeta = -2;
                _deblockTC = -2;
                _b_intra = false;
                _psyrdoq = 30;
                _psyrd = 0.5m;
                _ratio_ip = 1.1m;
                _ratio_pb = 1.1m;
                _aqmode = 1; //X265_AQ_VARIANCE
                _aqstrength = "0.3";
                _qcomp = 0.8m;
            }
            else if (tune == x265.Tunes.PSNR)
            {
                _aqstrength = "0.0";
                _psyrd = 0;
                _psyrdoq = 0;
            }
            else if (tune == x265.Tunes.SSIM)
            {
                _aqmode = 2; //X265_AQ_AUTO_VARIANCE
                _psyrd = 0;
                _psyrdoq = 0;
            }
            else if (tune == x265.Tunes.FastDecode)
            {
                _deblocking = false;
                _sao = false;
                _weightp = false;
                _weightb = false;
                _b_intra = false;
            }
               /* zerolatency
               {
               _b_adapt = 0;
               _bframes = 0;
               _lookahead = 0;
               _cutree = false;
               _threads_frames = 1;

               //scenecutThreshold = 0;
               }*/
        }
コード例 #3
0
 private void LoadCodecWindow()
 {
     //загрузка
     if (m.outvcodec == "x265")
     {
         x265c = new x265(m, this, p);
         grid_codec.Children.Add(x265c);
     }
     else 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);
     }
 }