Ticket #3797: pillarbars.diff

File pillarbars.diff, 3.5 KB (added by Juppers, 13 years ago)
  • libs/libmythtv/videooutbase.cpp

     
    11211121
    11221122        letterAdj  = video_aspect / letterboxed_video_aspect;
    11231123    }
     1124    if (letterbox = kLetterbox_Gray_Pillarboxes)
     1125    {
     1126        letterXadj = max(-display_video_rect.left(), 0);
     1127        float xadj = (float) video_rect.width() / display_visible_rect.width();
     1128        letterXadj = (int) (letterXadj * xadj);
    11241129
     1130        float yadj = (float)video_rect.height() /display_visible_rect.height();
     1131        letterYadj = max(-display_video_rect.top(), 0);
     1132        letterYadj = (int) (letterYadj * yadj);
     1133
     1134        letterAdj  = video_aspect / letterboxed_video_aspect;
     1135    }
     1136
    11251137    // adjust for non-square pixels on screen
    11261138    float dispPixelAdj = (GetDisplayAspect() * video_dim.height()) /
    11271139        video_dim.width();
  • libs/libmythtv/videoout_xv.h

     
    186186    int                  XJ_screenwidth;
    187187    int                  XJ_screenheight;
    188188    bool                 XJ_started;
     189    Colormap             cmap;
     190    XColor               color, colorrgb;
    189191
    190192    // Used for all non-XvMC drawing
    191193    VideoFrame           av_pause_frame;
  • libs/libmythtv/videoout_xv.cpp

     
    25592559    needrepaint = false;
    25602560    xv_need_bobdeint_repaint = false;
    25612561
    2562     // Draw black in masked areas
    2563     XSetForeground(XJ_disp, XJ_gc, XJ_black);
     2562    // Set the masked area to black unless Gray Pillarbars was selected
     2563    cmap = DefaultColormap (XJ_disp, XJ_screen_num);
     2564    db_letterbox       = gContext->GetNumSetting("AspectOverride",     0);
     2565    if (kLetterbox_Gray_Pillarboxes == db_letterbox)
     2566    {
     2567        XAllocNamedColor (XJ_disp, cmap, "gray20", &color, &colorrgb);
     2568    }
     2569    else
     2570    {
     2571        XAllocNamedColor (XJ_disp, cmap, "gray0", &color, &colorrgb);
     2572    }
    25642573
     2574    // Draw black or gray in masked areas
     2575    XSetForeground(XJ_disp, XJ_gc, color.pixel);
     2576
    25652577    if (display_video_rect.left() > display_visible_rect.left())
    25662578    { // left
    25672579        XFillRectangle(XJ_disp, XJ_curwin, XJ_gc,
  • libs/libmythtv/videooutbase.h

     
    9999    kLetterbox_16_9_Zoom,
    100100    kLetterbox_16_9_Stretch,
    101101    kLetterbox_Fill,
     102    kLetterbox_Gray_Pillarboxes,
    102103    kLetterbox_END
    103104};
    104105
  • programs/mythfrontend/globalsettings.cpp

     
    15501550    gc->addSelection(QObject::tr("16/9 Zoom"), "4");
    15511551    gc->addSelection(QObject::tr("16/9 Stretch"), "5");
    15521552    gc->addSelection(QObject::tr("Fill"), "6");
     1553    gc->addSelection(QObject::tr("Gray Pillarboxes"), "7");
    15531554    gc->setHelpText(QObject::tr("This will override any aspect ratio in the "
    15541555                    "recorded stream, the same as pressing the W Key during "
    15551556                    "playback. Fill will \"fill\" the screen with the image "