Ticket #12308: mcf-logo-border.patch

File mcf-logo-border.patch, 2.1 KB (added by faginbagin <mythtv@…>, 5 years ago)
  • mythtv/programs/mythcommflag/ClassicCommDetector.cpp

    diff --git a/mythtv/programs/mythcommflag/ClassicCommDetector.cpp b/mythtv/programs/mythcommflag/ClassicCommDetector.cpp
    index 7bfecfa..93f280e 100644
    a b bool ClassicCommDetector::go() 
    325325
    326326    if (commDetectMethod & COMM_DETECT_LOGO)
    327327    {
     328        // Use a different border for logo detection.
     329        // If we try to detect logos in letterboxed areas,
     330        // chances are we won't detect the logo.
     331        // Generally speaking, SD video is likely to be letter boxed
     332        // and HD video is not likely to be letter boxed.
     333        // To detect logos, try to exclude letterboxed area from SD video
     334        // but exclude too much from HD video and you'll miss the logo.
     335        // Using the same border for both with no scaling seems to be
     336        // a good compromise.
     337        int logoDetectBorder =
     338            gCoreContext->GetNumSetting("CommDetectLogoBorder", 16);
    328339        logoDetector = new ClassicLogoDetector(this, width, height,
    329             commDetectBorder, horizSpacing, vertSpacing);
     340            logoDetectBorder, horizSpacing, vertSpacing);
    330341
    331342        requiredHeadStart += max(
    332343            int64_t(0), int64_t(recordingStartedAt.secsTo(startedAt)));
  • mythtv/programs/mythcommflag/ClassicLogoDetector.cpp

    diff --git a/mythtv/programs/mythcommflag/ClassicLogoDetector.cpp b/mythtv/programs/mythcommflag/ClassicLogoDetector.cpp
    index 3a2326a..dbe6b4a 100644
    a b bool ClassicLogoDetector::searchForLogo(MythPlayer* player) 
    245245
    246246            LOG(VB_COMMFLAG, LOG_INFO,
    247247                QString("Using Logo area: topleft (%1,%2), "
    248                         "bottomright (%3,%4)")
     248                        "bottomright (%3,%4), pixelsInMask (%5).")
    249249                    .arg(logoMinX).arg(logoMinY)
    250                     .arg(logoMaxX).arg(logoMaxY));
     250                    .arg(logoMaxX).arg(logoMaxY)
     251                    .arg(pixelsInMask));
    251252        }
    252253        else
    253254        {