Ticket #4653: 29_skiploop_fixes_022.diff

File 29_skiploop_fixes_022.diff, 14.5 KB (added by JYA, 10 years ago)

Updated for 0.22-fixes r22847

  • libs/libmythtv/avformatdecoder.cpp

     
    16291629                    vdp.SetInput(QSize(width, height));
    16301630                    dec = vdp.GetDecoder();
    16311631                    thread_count = vdp.GetMaxCPUs();
     1632                    bool skip_loop_filter = vdp.IsSkipLoopEnabled();
     1633                    if  (!skip_loop_filter)
     1634                    {
     1635                        enc->skip_loop_filter = AVDISCARD_NONKEY;
     1636                    } 
    16321637                }
    16331638
    16341639                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
    11251129    (void) QObject::tr("VDPAU Normal", "Sample: VDPAU average quality");
    11261130    DeleteProfileGroup("VDPAU Normal", hostname);
    11271131    groupid = CreateProfileGroup("VDPAU Normal", hostname);
    11281132    CreateProfile(groupid, 1, ">=", 0, 720, "", 0, 0,
    1129                   "vdpau", 1, "vdpau", "vdpau", true,
     1133                  "vdpau", 1, true, "vdpau", "vdpau", true,
    11301134                  "vdpaubasicdoublerate", "vdpaubasic", "");
    11311135    CreateProfile(groupid, 2, ">", 0, 0, "", 0, 0,
    1132                   "vdpau", 1, "vdpau", "vdpau", true,
     1136                  "vdpau", 1, true, "vdpau", "vdpau", true,
    11331137                  "vdpauadvanceddoublerate", "vdpauadvanced", "");
    11341138
    11351139    (void) QObject::tr("VDPAU Slim", "Sample: VDPAU low power GPU");
    11361140    DeleteProfileGroup("VDPAU Slim", hostname);
    11371141    groupid = CreateProfileGroup("VDPAU Slim", hostname);
    11381142    CreateProfile(groupid, 1, ">", 0, 0, "", 0, 0,
    1139                   "vdpau", 1, "vdpau", "vdpau", false,
     1143                  "vdpau", 1, true, "vdpau", "vdpau", false,
    11401144                  "vdpaubobdeint", "vdpauonefield", "vdpauskipchroma");
    11411145}
    11421146
  • programs/mythfrontend/globalsettings.cpp

     
    820820    height[1] = new TransSpinBoxSetting(0, 1088, 64, true);
    821821    decoder   = new TransComboBoxSetting();
    822822    max_cpus  = new TransSpinBoxSetting(1, HAVE_THREADS ? 4 : 1, 1, true);
     823    skiploop  = new TransCheckBoxSetting();
    823824    vidrend   = new TransComboBoxSetting();
    824825    osdrend   = new TransComboBoxSetting();
    825826    osdfade   = new TransCheckBoxSetting();
     
    851852
    852853    decoder->setLabel(tr("Decoder"));
    853854    max_cpus->setLabel(tr("Max CPUs"));
     855    skiploop->setLabel(tr("Loopfilter"));
    854856    vidrend->setLabel(tr("Video Renderer"));
    855857    osdrend->setLabel(tr("OSD Renderer"));
    856858    osdfade->setLabel(tr("OSD Fade"));
     
    868870    filters->setHelpText(
    869871        QObject::tr("Example Custom filter list: 'ivtc,denoise3d'"));
    870872
     873    skiploop->setHelpText(
     874        tr("When unchecked the deblocking loopfilter will be disabled "
     875           "for h264 decoding.") + "\n" +
     876        tr("Disabling will significantly reduce the load on the CPU "
     877           "when watching HD h264."));
     878
    871879    osdfade->setHelpText(
    872880        tr("When unchecked the OSD will not fade away but instead "
    873881           "will disappear abruptly.") + "\n" +
     
    876884
    877885    vid_row->addChild(decoder);
    878886    vid_row->addChild(max_cpus);
    879 
     887    vid_row->addChild(skiploop);
    880888    osd_row->addChild(vidrend);
    881889    osd_row->addChild(osdrend);
    882890    osd_row->addChild(osdfade);
     
    929937
    930938    QString pdecoder  = item.Get("pref_decoder");
    931939    QString pmax_cpus = item.Get("pref_max_cpus");
     940    QString pskiploop  = item.Get("pref_skiploop");
    932941    QString prenderer = item.Get("pref_videorenderer");
    933942    QString posd      = item.Get("pref_osdrenderer");
    934943    QString posdfade  = item.Get("pref_osdfade");
     
    956965
    957966    if (!pmax_cpus.isEmpty())
    958967        max_cpus->setValue(pmax_cpus.toUInt());
     968
     969    skiploop->setValue((!pskiploop.isEmpty()) ? (bool) pskiploop.toInt() : true);
     970
    959971    if (!prenderer.isEmpty())
    960972        vidrend->setValue(prenderer);
    961973    if (!posd.isEmpty())
     
    9891001
    9901002    item.Set("pref_decoder",       decoder->getValue());
    9911003    item.Set("pref_max_cpus",      max_cpus->getValue());
     1004    item.Set("pref_skiploop",       (skiploop->boolValue()) ? "1" : "0");
    9921005    item.Set("pref_videorenderer", vidrend->getValue());
    9931006    item.Set("pref_osdrenderer",   osdrend->getValue());
    9941007    item.Set("pref_osdfade",       (osdfade->boolValue()) ? "1" : "0");
  • programs/mythfrontend/globalsettings.h

     
    8787    TransSpinBoxSetting  *height[2];
    8888    TransComboBoxSetting *decoder;
    8989    TransSpinBoxSetting  *max_cpus;
     90    TransCheckBoxSetting *skiploop;
    9091    TransComboBoxSetting *vidrend;
    9192    TransComboBoxSetting *osdrend;
    9293    TransCheckBoxSetting *osdfade;