Ticket #4653: 29_skiploop_trunk_22847.2.diff

File 29_skiploop_trunk_22847.2.diff, 14.6 KB (added by JYA, 11 years ago)

Updated for trunk r22847

  • libs/libmythtv/avformatdecoder.cpp

     
    16821682                    vdp.SetInput(QSize(width, height));
    16831683                    dec = vdp.GetDecoder();
    16841684                    thread_count = vdp.GetMaxCPUs();
     1685                    bool skip_loop_filter = vdp.IsSkipLoopEnabled();
     1686                    if  (!skip_loop_filter)
     1687                    {
     1688                        enc->skip_loop_filter = AVDISCARD_NONKEY;
     1689                    } 
    16851690                }
    16861691
    16871692                bool handled = false;
  • libs/libmythtv/videodisplayprofile.h

     
    8484    uint GetMaxCPUs(void) const
    8585        { return GetPreference("pref_max_cpus").toUInt(); }
    8686
     87    bool IsSkipLoopEnabled(void) const
     88        { return GetPreference("pref_skiploop").toInt(); }
     89   
    8790    QString GetVideoRenderer(void) const
    8891        { return GetPreference("pref_videorenderer"); }
    8992
     
    125128        uint grpid, uint priority,
    126129        QString cmp0, uint width0, uint height0,
    127130        QString cmp1, uint width1, uint height1,
    128         QString decoder, uint max_cpus, QString videorenderer,
     131        QString decoder, uint max_cpus, bool skiploop, QString videorenderer,
    129132        QString osdrenderer, bool osdfade,
    130133        QString deint0, QString deint1, QString filters);
    131134
  • libs/libmythtv/videodisplayprofile.cpp

     
    175175    QString cmp1      = Get("pref_cmp1");
    176176    QString decoder   = Get("pref_decoder");
    177177    uint    max_cpus  = Get("pref_max_cpus").toUInt();
     178    bool    skiploop  = Get("pref_skiploop").toInt();
    178179    QString renderer  = Get("pref_videorenderer");
    179180    QString osd       = Get("pref_osdrenderer");
    180181    QString deint0    = Get("pref_deint0");
     
    182183    QString filter    = Get("pref_filters");
    183184    bool    osdfade   = Get("pref_osdfade").toInt();
    184185
    185     QString str =  QString("cmp(%1%2) dec(%3) cpus(%4) rend(%5) ")
     186    QString str =  QString("cmp(%1%2) dec(%3) cpus(%4) skiploop(%5) rend(%6) ")
    186187        .arg(cmp0).arg(QString(cmp1.isEmpty() ? "" : ",") + cmp1)
    187         .arg(decoder).arg(max_cpus).arg(renderer);
     188        .arg(decoder).arg(max_cpus).arg((skiploop) ? "enabled" : "disabled").arg(renderer);
    188189    str += QString("osd(%1) osdfade(%2) deint(%3,%4) filt(%5)")
    189190        .arg(osd).arg((osdfade) ? "enabled" : "disabled")
    190191        .arg(deint0).arg(deint1).arg(filter);
     
    858859    uint groupid, uint priority,
    859860    QString cmp0, uint width0, uint height0,
    860861    QString cmp1, uint width1, uint height1,
    861     QString decoder, uint max_cpus, QString videorenderer,
     862    QString decoder, uint max_cpus, bool skiploop, QString videorenderer,
    862863    QString osdrenderer, bool osdfade,
    863864    QString deint0, QString deint1, QString filters)
    864865{
     
    904905    queryValue += "pref_max_cpus";
    905906    queryData  += QString::number(max_cpus);
    906907
     908    queryValue += "pref_skiploop";
     909    queryData  += (skiploop) ? "1" : "0";
     910
    907911    queryValue += "pref_videorenderer";
    908912    queryData  += videorenderer;
    909913
     
    10171021    DeleteProfileGroup("CPU++", hostname);
    10181022    uint groupid = CreateProfileGroup("CPU++", hostname);
    10191023    CreateProfile(groupid, 1, ">", 0, 0, "", 0, 0,
    1020                   "ffmpeg", 1, "xv-blit", "softblend", true,
     1024                  "ffmpeg", 1, true, "xv-blit", "softblend", true,
    10211025                  "bobdeint", "linearblend", "");
    10221026    CreateProfile(groupid, 2, ">", 0, 0, "", 0, 0,
    1023                   "ffmpeg", 1, "quartz-blit", "softblend", true,
     1027                  "ffmpeg", 1, true, "quartz-blit", "softblend", true,       
    10241028                  "linearblend", "linearblend", "");
    10251029
    10261030    (void) QObject::tr("CPU+", "Sample: Hardware assist HD only");
    10271031    DeleteProfileGroup("CPU+", hostname);
    10281032    groupid = CreateProfileGroup("CPU+", hostname);
    10291033    CreateProfile(groupid, 1, "<=", 720, 576, ">", 0, 0,
    1030                   "ffmpeg", 1, "xv-blit", "softblend", true,
     1034                  "ffmpeg", 1, true, "xv-blit", "softblend", true,
    10311035                  "bobdeint", "linearblend", "");
    10321036    CreateProfile(groupid, 2, "<=", 1280, 720, ">", 720, 576,
    1033                   "xvmc", 1, "xvmc-blit", "opengl", true,
     1037                  "xvmc", 1, true, "xvmc-blit", "opengl", true,
    10341038                  "bobdeint", "onefield", "");
    10351039    CreateProfile(groupid, 3, "<=", 1280, 720, ">", 720, 576,
    1036                   "libmpeg2", 1, "xv-blit", "softblend", true,
     1040                  "libmpeg2", 1, true, "xv-blit", "softblend", true,
    10371041                  "bobdeint", "onefield", "");
    10381042    CreateProfile(groupid, 4, ">", 0, 0, "", 0, 0,
    1039                   "xvmc", 1, "xvmc-blit", "ia44blend", false,
     1043                  "xvmc", 1, true, "xvmc-blit", "ia44blend", false,
    10401044                  "bobdeint", "onefield", "");
    10411045    CreateProfile(groupid, 5, ">", 0, 0, "", 0, 0,
    1042                   "libmpeg2", 1, "xv-blit", "chromakey", false,
     1046                  "libmpeg2", 1, true, "xv-blit", "chromakey", false,
    10431047                  "bobdeint", "onefield", "");
    10441048
    10451049    (void) QObject::tr("CPU--", "Sample: Hardware assist all");
    10461050    DeleteProfileGroup("CPU--", hostname);
    10471051    groupid = CreateProfileGroup("CPU--", hostname);
    10481052    CreateProfile(groupid, 1, "<=", 720, 576, ">", 0, 0,
    1049                   "ivtv", 1, "ivtv", "ivtv", true,
     1053                  "ivtv", 1, true, "ivtv", "ivtv", true,
    10501054                  "none", "none", "");
    10511055    CreateProfile(groupid, 2, "<=", 720, 576, ">", 0, 0,
    1052                   "xvmc", 1, "xvmc-blit", "ia44blend", false,
     1056                  "xvmc", 1, true, "xvmc-blit", "ia44blend", false,
    10531057                  "bobdeint", "onefield", "");
    10541058    CreateProfile(groupid, 3, "<=", 1280, 720, ">", 720, 576,
    1055                   "xvmc", 1, "xvmc-blit", "ia44blend", false,
     1059                  "xvmc", 1, true, "xvmc-blit", "ia44blend", false,
    10561060                  "bobdeint", "onefield", "");
    10571061    CreateProfile(groupid, 4, ">", 0, 0, "", 0, 0,
    1058                   "xvmc", 1, "xvmc-blit", "ia44blend", false,
     1062                  "xvmc", 1, true, "xvmc-blit", "ia44blend", false,
    10591063                  "bobdeint", "onefield", "");
    10601064    CreateProfile(groupid, 5, ">", 0, 0, "", 0, 0,
    1061                   "libmpeg2", 1, "xv-blit", "chromakey", false,
     1065                  "libmpeg2", 1, true, "xv-blit", "chromakey", false,
    10621066                  "none", "none", "");
    10631067}
    10641068
     
    10681072    DeleteProfileGroup("High Quality", hostname);
    10691073    uint groupid = CreateProfileGroup("High Quality", hostname);
    10701074    CreateProfile(groupid, 1, ">=", 1920, 1080, "", 0, 0,
    1071                   "ffmpeg", 2, "xv-blit", "softblend", true,
     1075                  "ffmpeg", 2, true, "xv-blit", "softblend", true,
    10721076                  "linearblend", "linearblend", "");
    10731077    CreateProfile(groupid, 2, ">", 0, 0, "", 0, 0,
    1074                   "ffmpeg", 1, "xv-blit", "softblend", true,
     1078                  "ffmpeg", 1, true, "xv-blit", "softblend", true,
    10751079                  "yadifdoubleprocessdeint", "yadifdeint", "");
    10761080    CreateProfile(groupid, 3, ">=", 1920, 1080, "", 0, 0,
    1077                   "ffmpeg", 2, "quartz-blit", "softblend", true,
     1081                  "ffmpeg", 2, true, "quartz-blit", "softblend", true,
    10781082                  "linearblend", "linearblend", "");
    10791083    CreateProfile(groupid, 4, ">", 0, 0, "", 0, 0,
    1080                   "ffmpeg", 1, "quartz-blit", "softblend", true,
     1084                  "ffmpeg", 1, true, "quartz-blit", "softblend", true,
    10811085                  "yadifdoubleprocessdeint", "yadifdeint", "");
    10821086
    10831087    (void) QObject::tr("Normal", "Sample: average quality");
    10841088    DeleteProfileGroup("Normal", hostname);
    10851089    groupid = CreateProfileGroup("Normal", hostname);
    10861090    CreateProfile(groupid, 1, ">=", 1280, 720, "", 0, 0,
    1087                   "ffmpeg", 1, "xv-blit", "softblend", false,
     1091                  "ffmpeg", 1, true, "xv-blit", "softblend", false,
    10881092                  "linearblend", "linearblend", "");
    10891093    CreateProfile(groupid, 2, ">", 0, 0, "", 0, 0,
    1090                   "ffmpeg", 1, "xv-blit", "softblend", true,
     1094                  "ffmpeg", 1, true, "xv-blit", "softblend", true,
    10911095                  "greedyhdoubleprocessdeint", "kerneldeint", "");
    10921096    CreateProfile(groupid, 3, ">=", 1280, 720, "", 0, 0,
    1093                   "ffmpeg", 1, "quartz-blit", "softblend", false,
     1097                  "ffmpeg", 1, true, "quartz-blit", "softblend", false,
    10941098                  "linearblend", "linearblend", "");
    10951099    CreateProfile(groupid, 4, ">", 0, 0, "", 0, 0,
    1096                   "ffmpeg", 1, "quartz-blit", "softblend", true,
     1100                  "ffmpeg", 1, true, "quartz-blit", "softblend", true,
    10971101                  "greedyhdoubleprocessdeint", "kerneldeint", "");
    10981102
    10991103    (void) QObject::tr("Slim", "Sample: low CPU usage");
    11001104    DeleteProfileGroup("Slim", hostname);
    11011105    groupid = CreateProfileGroup("Slim", hostname);
    11021106    CreateProfile(groupid, 1, ">=", 1280, 720, "", 0, 0,
    1103                   "ffmpeg", 1, "xv-blit", "softblend", false,
     1107                  "ffmpeg", 1, true, "xv-blit", "softblend", false,
    11041108                  "onefield", "onefield", "");
    11051109    CreateProfile(groupid, 2, ">", 0, 0, "", 0, 0,
    1106                   "ffmpeg", 1, "xv-blit", "softblend", true,
     1110                  "ffmpeg", 1, true, "xv-blit", "softblend", true,
    11071111                  "linearblend", "linearblend", "");
    11081112    CreateProfile(groupid, 3, ">=", 1280, 720, "", 0, 0,
    1109                   "ffmpeg", 1, "quartz-blit", "softblend", false,
     1113                  "ffmpeg", 1, true, "quartz-blit", "softblend", false,
    11101114                  "onefield", "onefield", "");
    11111115    CreateProfile(groupid, 4, ">", 0, 0, "", 0, 0,
    1112                   "ffmpeg", 1, "quartz-blit", "softblend", true,
     1116                  "ffmpeg", 1, true, "quartz-blit", "softblend", true,
    11131117                  "linearblend", "linearblend", "");
    11141118}
    11151119
     
    11191123    DeleteProfileGroup("VDPAU High Quality", hostname);
    11201124    uint groupid = CreateProfileGroup("VDPAU High Quality", hostname);
    11211125    CreateProfile(groupid, 1, ">", 0, 0, "", 0, 0,
    1122                   "vdpau", 1, "vdpau", "vdpau", true,
     1126                  "vdpau", 1, true, "vdpau", "vdpau", true,
    11231127                  "vdpauadvanceddoublerate", "vdpauadvanced",
    11241128                  "vdpaucolorspace=auto");
    11251129
     
    11271131    DeleteProfileGroup("VDPAU Normal", hostname);
    11281132    groupid = CreateProfileGroup("VDPAU Normal", hostname);
    11291133    CreateProfile(groupid, 1, ">=", 0, 720, "", 0, 0,
    1130                   "vdpau", 1, "vdpau", "vdpau", true,
     1134                  "vdpau", 1, true, "vdpau", "vdpau", true,
    11311135                  "vdpaubasicdoublerate", "vdpaubasic",
    11321136                  "vdpaucolorspace=auto");
    11331137    CreateProfile(groupid, 2, ">", 0, 0, "", 0, 0,
    1134                   "vdpau", 1, "vdpau", "vdpau", true,
     1138                  "vdpau", 1, true, "vdpau", "vdpau", true,
    11351139                  "vdpauadvanceddoublerate", "vdpauadvanced",
    11361140                  "vdpaucolorspace=auto");
    11371141
     
    11391143    DeleteProfileGroup("VDPAU Slim", hostname);
    11401144    groupid = CreateProfileGroup("VDPAU Slim", hostname);
    11411145    CreateProfile(groupid, 1, ">", 0, 0, "", 0, 0,
    1142                   "vdpau", 1, "vdpau", "vdpau", false,
     1146                  "vdpau", 1, true, "vdpau", "vdpau", false,
    11431147                  "vdpaubobdeint", "vdpauonefield", "vdpauskipchroma,colorspace=auto");
    11441148}
    11451149
  • programs/mythfrontend/globalsettings.cpp

     
    878878    height[1] = new TransSpinBoxSetting(0, 1088, 64, true);
    879879    decoder   = new TransComboBoxSetting();
    880880    max_cpus  = new TransSpinBoxSetting(1, HAVE_THREADS ? 4 : 1, 1, true);
     881    skiploop  = new TransCheckBoxSetting();
    881882    vidrend   = new TransComboBoxSetting();
    882883    osdrend   = new TransComboBoxSetting();
    883884    osdfade   = new TransCheckBoxSetting();
     
    909910
    910911    decoder->setLabel(tr("Decoder"));
    911912    max_cpus->setLabel(tr("Max CPUs"));
     913    skiploop->setLabel(tr("Loopfilter"));
    912914    vidrend->setLabel(tr("Video Renderer"));
    913915    osdrend->setLabel(tr("OSD Renderer"));
    914916    osdfade->setLabel(tr("OSD Fade"));
     
    926928    filters->setHelpText(
    927929        QObject::tr("Example Custom filter list: 'ivtc,denoise3d'"));
    928930
     931    skiploop->setHelpText(
     932        tr("When unchecked the deblocking loopfilter will be disabled "
     933           "for h264 decoding.") + "\n" +
     934        tr("Disabling will significantly reduce the load on the CPU "
     935           "when watching HD h264."));
     936
    929937    osdfade->setHelpText(
    930938        tr("When unchecked the OSD will not fade away but instead "
    931939           "will disappear abruptly.") + "\n" +
     
    934942
    935943    vid_row->addChild(decoder);
    936944    vid_row->addChild(max_cpus);
    937 
     945    vid_row->addChild(skiploop);
    938946    osd_row->addChild(vidrend);
    939947    osd_row->addChild(osdrend);
    940948    osd_row->addChild(osdfade);
     
    987995
    988996    QString pdecoder  = item.Get("pref_decoder");
    989997    QString pmax_cpus = item.Get("pref_max_cpus");
     998    QString pskiploop  = item.Get("pref_skiploop");
    990999    QString prenderer = item.Get("pref_videorenderer");
    9911000    QString posd      = item.Get("pref_osdrenderer");
    9921001    QString posdfade  = item.Get("pref_osdfade");
     
    10141023
    10151024    if (!pmax_cpus.isEmpty())
    10161025        max_cpus->setValue(pmax_cpus.toUInt());
     1026
     1027    skiploop->setValue((!pskiploop.isEmpty()) ? (bool) pskiploop.toInt() : true);
     1028
    10171029    if (!prenderer.isEmpty())
    10181030        vidrend->setValue(prenderer);
    10191031    if (!posd.isEmpty())
     
    10471059
    10481060    item.Set("pref_decoder",       decoder->getValue());
    10491061    item.Set("pref_max_cpus",      max_cpus->getValue());
     1062    item.Set("pref_skiploop",       (skiploop->boolValue()) ? "1" : "0");
    10501063    item.Set("pref_videorenderer", vidrend->getValue());
    10511064    item.Set("pref_osdrenderer",   osdrend->getValue());
    10521065    item.Set("pref_osdfade",       (osdfade->boolValue()) ? "1" : "0");
  • programs/mythfrontend/globalsettings.h

     
    9292    TransSpinBoxSetting  *height[2];
    9393    TransComboBoxSetting *decoder;
    9494    TransSpinBoxSetting  *max_cpus;
     95    TransCheckBoxSetting *skiploop;
    9596    TransComboBoxSetting *vidrend;
    9697    TransComboBoxSetting *osdrend;
    9798    TransCheckBoxSetting *osdfade;