Ticket #4567: 4567-v1.patch
File 4567-v1.patch, 6.2 KB (added by , 16 years ago) |
---|
-
libs/libmythtv/avformatdecoder.cpp
1157 1157 aspect_ratio = 4.0 / 3; 1158 1158 } 1159 1159 1160 GetNVP()->SetVideoParams( align_width, align_height, fps,1160 GetNVP()->SetVideoParams(enc->width, enc->height, fps, 1161 1161 keyframedist, aspect_ratio, kScan_Detect, 1162 1162 dvd_video_codec_changed); 1163 1163 } … … 2340 2340 uint awidth = width, aheight = height; 2341 2341 align_dimensions(context, awidth, aheight); 2342 2342 2343 GetNVP()->SetVideoParams( awidth, aheight, seqFPS,2343 GetNVP()->SetVideoParams(width, height, seqFPS, 2344 2344 keyframedist, aspect, 2345 2345 kScan_Detect); 2346 2346 … … 2420 2420 uint awidth = width, aheight = height; 2421 2421 align_dimensions(context, awidth, aheight); 2422 2422 2423 GetNVP()->SetVideoParams( awidth, aheight, seqFPS,2423 GetNVP()->SetVideoParams(width, height, seqFPS, 2424 2424 keyframedist, aspect_ratio, 2425 2425 kScan_Detect); 2426 2426 -
libs/libmythtv/videooutbase.cpp
375 375 } 376 376 377 377 display_visible_rect = QRect(0, 0, winw, winh); 378 video_disp_dim = QSize(width, height); 379 width = (width + 15) & (~0xf); 380 height = (height + 15) & (~0xf); 378 381 video_dim = QSize(width, height); 379 video_rect = QRect(QPoint(winx, winy), fix_1080i(video_di m));382 video_rect = QRect(QPoint(winx, winy), fix_1080i(video_disp_dim)); 380 383 381 db_vdisp_profile->SetInput(video_di m);384 db_vdisp_profile->SetInput(video_disp_dim); 382 385 383 386 aspectoverride = db_aspectoverride; 384 387 adjustfill = db_adjustfill; … … 603 606 (void)myth_codec_id; 604 607 (void)codec_private; 605 608 606 video_dim = input_size; 609 video_disp_dim = input_size; 610 video_dim = QSize((input_size.width() + 15) & (~0xf), 611 (input_size.height() + 15) & (~0xf)); 607 612 608 613 db_vdisp_profile->SetInput(video_dim); 609 614 … … 710 715 QRect VideoOutput::GetVisibleOSDBounds( 711 716 float &visible_aspect, float &font_scaling, float themeaspect) const 712 717 { 713 float dv_w = ((float)video_di m.width()) / display_video_rect.width();714 float dv_h = ((float)video_di m.height()) / display_video_rect.height();718 float dv_w = ((float)video_disp_dim.width()) / display_video_rect.width(); 719 float dv_h = ((float)video_disp_dim.height()) / display_video_rect.height(); 715 720 716 721 uint right_overflow = max((display_video_rect.width() 717 722 + display_video_rect.left()) … … 723 728 // top left and bottom right corners respecting letterboxing 724 729 QPoint tl = QPoint((uint) ceil(max(-display_video_rect.left(),0)*dv_w), 725 730 (uint) ceil(max(-display_video_rect.top(),0)*dv_h)); 726 QPoint br = QPoint((uint) floor(video_dim.width()-(right_overflow*dv_w)), 727 (uint) floor(video_dim.height()-(lower_overflow*dv_h))); 731 QPoint br = QPoint((uint) floor(video_disp_dim.width() 732 -(right_overflow*dv_w)), 733 (uint) floor(video_disp_dim.height() 734 -(lower_overflow*dv_h))); 728 735 // adjust for overscan 729 736 if ((db_scale_vert > 0.0f) || (db_scale_horiz > 0.0f)) 730 737 { … … 762 769 */ 763 770 QRect VideoOutput::GetTotalOSDBounds(void) const 764 771 { 765 return QRect(QPoint(0, 0), video_di m);772 return QRect(QPoint(0, 0), video_disp_dim); 766 773 } 767 774 768 775 /** \fn VideoOutput::ApplyManualScaleAndMove(void) … … 869 876 if (db_scale_horiz > 0) 870 877 { 871 878 float tmp = 1.0f - 2.0f * db_scale_horiz; 872 video_rect.moveLeft((int) round(video_di m.width() * db_scale_horiz));873 video_rect.setWidth((int) round(video_di m.width() * tmp));879 video_rect.moveLeft((int) round(video_disp_dim.width() * db_scale_horiz)); 880 video_rect.setWidth((int) round(video_disp_dim.width() * tmp)); 874 881 875 882 int xoff = db_move.x(); 876 883 if (xoff > 0) … … 1102 1109 void VideoOutput::MoveResize(void) 1103 1110 { 1104 1111 // Preset all image placement and sizing variables. 1105 video_rect = QRect(QPoint(0, 0), fix_1080i(video_di m));1112 video_rect = QRect(QPoint(0, 0), fix_1080i(video_disp_dim)); 1106 1113 display_video_rect = display_visible_rect; 1107 1114 1108 1115 // Avoid too small frames for audio only streams (for OSD). 1109 1116 if ((video_rect.width() <= 0) || (video_rect.height() <= 0)) 1110 1117 { 1111 video_dim = display_visible_rect.size(); 1118 video_disp_dim = display_visible_rect.size(); 1119 video_dim = QSize( 1120 (display_visible_rect.size().width() + 15) & (~0xf), 1121 (display_visible_rect.size().height() + 15) & (~0xf)); 1112 1122 video_rect = QRect(QPoint(0, 0), video_dim); 1113 1123 } 1114 1124 … … 1445 1455 } 1446 1456 1447 1457 // adjust for non-square pixels on screen 1448 float dispPixelAdj = (GetDisplayAspect() * video_di m.height()) /1449 video_di m.width();1458 float dispPixelAdj = (GetDisplayAspect() * video_disp_dim.height()) / 1459 video_disp_dim.width(); 1450 1460 1451 1461 // adjust for non-square pixels in video 1452 1462 float vidPixelAdj = pipVideoWidth / (pipVideoAspect * pipVideoHeight); -
libs/libmythtv/videooutbase.h
273 273 float display_aspect; ///< Physical aspect ratio of playback window 274 274 275 275 // Video dimensions 276 QSize video_dim; ///< Pixel dimensions of video 276 QSize video_dim; ///< Pixel dimensions of video buffer 277 QSize video_disp_dim; ///< Pixel dimensions of video display area 277 278 float video_aspect; ///< Physical aspect ratio of video 278 279 279 280 /// Normally this is the same as videoAspect, but may not be