[mythtv-commits] Ticket #13054: Video Playback vertical offset when using UseVideoModes=1 for JudderFree support

MythTV noreply at mythtv.org
Fri Sep 1 09:14:15 UTC 2017


#13054: Video Playback vertical offset when using UseVideoModes=1 for JudderFree
support
-------------------------------------+--------------------------------
 Reporter:  support@…                |          Owner:  pbennett
     Type:  Bug Report - General     |         Status:  infoneeded_new
 Priority:  minor                    |      Milestone:  unknown
Component:  MythTV - Video Playback  |        Version:  0.28.1
 Severity:  medium                   |     Resolution:
 Keywords:                           |  Ticket locked:  0
-------------------------------------+--------------------------------

Comment (by chrisw@…):

 I see the same issues.  Mythtv version
 {{{
 /usr/local/bin/mythutil --version
 Please attach all output as a file in bug reports.
 MythTV Version : v29.0-25-g7a40b2fcac-dirty
 MythTV Branch : fixes/29
 Network Protocol : 91
 Library API : 29.20170212-1
 QT Version : 5.7.1
 Options compiled in:
  linux profile use_hidesyms using_alsa using_oss using_backend
 using_bindings_perl using_bindings_python using_bindings_php using_dvb
 using_frontend using_hdhomerun using_vbox using_ceton using_hdpvr
 using_ivtv using_joystick_menu using_libcrypto using_libxml2 using_lirc
 using_mheg using_opengl using_opengl_video using_opengl_themepainter
 using_qtwebkit using_qtscript using_taglib using_v4l2 using_x11
 using_xrandr using_xv using_profiletype using_bindings_perl
 using_bindings_python using_bindings_php using_freetype2
 using_mythtranscode using_opengl using_vaapi using_ffmpeg_threads
 using_mheg using_libxml2
 }}}

 Core i5 Intel Skylake NUC. Software components
 {{{
 Linux mythtv 4.12.5-gentoo #16 SMP PREEMPT Tue Aug 22 18:35:49 AEST 2017
 x86_64 Intel(R) Core(TM) i5-6260U CPU @ 1.80GHz GenuineIntel GNU/Linux

 00:02.0 VGA compatible controller: Intel Corporation Iris Graphics 540
 (rev 0a)

 [IP-] [  ] x11-drivers/xf86-video-intel-2.99.917_p20170313:0
 [IP-] [  ] x11-libs/libva-1.7.3:0
 [IP-] [  ] x11-libs/libva-intel-driver-1.7.3:0
 [IP-] [  ] x11-base/xorg-server-1.19.3:0/1.19.3
 [IP-] [  ] x11-wm/evilwm-1.0.1:0
 }}}

 Mythtv straight from git with this patch as suggested above:
 {{{
 diff --git a/mythtv/libs/libmythtv/videoout_opengl.cpp
 b/mythtv/libs/libmythtv/videoout_opengl.cpp
 index 6bdd0c0a59..98490304f6 100644
 --- a/mythtv/libs/libmythtv/videoout_opengl.cpp
 +++ b/mythtv/libs/libmythtv/videoout_opengl.cpp
 @@ -381,6 +381,17 @@ bool VideoOutputOpenGL::SetupOpenGL(void)
      MythMainWindow *mainWin = GetMythMainWindow();
      QSize mainSize = mainWin->size();

 +LOG(VB_PLAYBACK, LOG_INFO, LOC + "Before adjustment");
 +LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("mainSize[w=%1 h=%2]")
 +       .arg(mainSize.width())
 +       .arg(mainSize.height()) );
 +LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("dvr[l=%1 t=%2 w=%3 h=%4]")
 +       .arg(dvr.left())
 +       .arg(dvr.top())
 +       .arg(dvr.width())
 +       .arg(dvr.height()) );
 +
 +
      // If the Video screen mode has vertically less pixels
      // than the GUI screen mode - OpenGL coordinate adjustments
      // must be made to put the video at the top of the display
 @@ -395,6 +406,16 @@ bool VideoOutputOpenGL::SetupOpenGL(void)
      if (dvr.width() < mainSize.width())
          dvr.setWidth(mainSize.width());

 +LOG(VB_PLAYBACK, LOG_INFO, LOC + "After adjustment");
 +LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("mainSize[w=%1 h=%2]")
 +       .arg(mainSize.width())
 +       .arg(mainSize.height()) );
 +LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("dvr[l=%1 t=%2 w=%3 h=%4]")
 +       .arg(dvr.left())
 +       .arg(dvr.top())
 +       .arg(dvr.width())
 +       .arg(dvr.height()) );
 +
      if (video_codec_id == kCodec_NONE)
      {
 }}}

 This output in the frontend log when playing a 1280x720p 23.98Hz  source.
 {{{
 Sep  1 18:29:54 mythtv mythfrontend[10065]: mythfrontend[10065]: I
 CoreContext DisplayRes.cpp:148 (SwitchToVideo) Trying to match best
 refresh rate 23.976Hz
 Sep  1 18:29:54 mythtv mythfrontend[10065]: mythfrontend[10065]: I
 CoreContext DisplayRes.cpp:162 (SwitchToVideo) Changing to 1920x1080
 24.000 Hz
 Sep  1 18:29:54 mythtv mythfrontend[10065]: mythfrontend[10065]: I
 CoreContext DisplayRes.cpp:183 (SwitchToVideo) SwitchToVideo: Video size
 1280 x 720:
     Switched to displaying resolution 1920 x 1080, 508mm x 285mm
 Sep  1 18:29:54 mythtv mythfrontend[10065]: mythfrontend[10065]: I
 CoreContext videooutwindow.cpp:568 (PrintMoveResizeDebug) Display Rect
 left: 0, top: 0, width: 1920, height: 1080, aspect: 1.77778
 Sep  1 18:29:54 mythtv mythfrontend[10065]: mythfrontend[10065]: I
 CoreContext videooutwindow.cpp:577 (PrintMoveResizeDebug) Video Rect
 left: 0, top: 0, width: 1280, height: 720, aspect: 1.77778
 Sep  1 18:29:54 mythtv mythfrontend[10065]: mythfrontend[10065]: I
 CoreContext videooutbase.cpp:1880 (InitDisplayMeasurements) VideoOutput:
 Pixel dimensions: Screen 1920x1080, window 1920x1080
 Sep  1 18:29:54 mythtv mythfrontend[10065]: mythfrontend[10065]: I
 CoreContext videooutbase.cpp:1913 (InitDisplayMeasurements) VideoOutput:
 Database display dimensions: 508x285 mm  Aspect: 1.78246
 Sep  1 18:29:54 mythtv mythfrontend[10065]: mythfrontend[10065]: I
 CoreContext videooutbase.cpp:1937 (InitDisplayMeasurements) VideoOutput:
 Estimated window dimensions: 508x285 mm  Aspect: 1.78246
 Sep  1 18:29:54 mythtv mythfrontend[10065]: mythfrontend[10065]: I
 CoreContext videoout_opengl.cpp:489 (CreatePainter) VidOutGL: Using main
 UI painter
 Sep  1 18:29:54 mythtv mythfrontend[10065]: mythfrontend[10065]: I
 CoreContext videoout_opengl.cpp:384 (SetupOpenGL) VidOutGL: Before
 adjustment
 Sep  1 18:29:54 mythtv mythfrontend[10065]: mythfrontend[10065]: I
 CoreContext videoout_opengl.cpp:387 (SetupOpenGL) VidOutGL:
 mainSize[w=1920 h=1080]
 Sep  1 18:29:54 mythtv mythfrontend[10065]: mythfrontend[10065]: I
 CoreContext videoout_opengl.cpp:392 (SetupOpenGL) VidOutGL: dvr[l=0 t=0
 w=1920 h=1080]
 Sep  1 18:29:54 mythtv mythfrontend[10065]: mythfrontend[10065]: I
 CoreContext videoout_opengl.cpp:409 (SetupOpenGL) VidOutGL: After
 adjustment
 Sep  1 18:29:54 mythtv mythfrontend[10065]: mythfrontend[10065]: I
 CoreContext videoout_opengl.cpp:412 (SetupOpenGL) VidOutGL:
 mainSize[w=1920 h=1080]
 Sep  1 18:29:54 mythtv mythfrontend[10065]: mythfrontend[10065]: I
 CoreContext videoout_opengl.cpp:417 (SetupOpenGL) VidOutGL: dvr[l=0 t=0
 w=1920 h=1080]
 Sep  1 18:29:54 mythtv mythfrontend[10065]: mythfrontend[10065]: I
 CoreContext openglvideo.cpp:736 (SetViewPort) GLVid: Viewport: 1920x1080
 Sep  1 18:29:54 mythtv mythfrontend[10065]: mythfrontend[10065]: I
 CoreContext videocolourspace.cpp:115 (SetSupportedAttributes) ColourSpace:
 PictureAttributes:
 }}}

 The DVR is not adjusted.  The GUI and video playback size are the same,
 only frame rate changed.

 Settings pretty much out-of-the-box
 {{{
 INSERT INTO `settings` VALUES ('DefaultVideoPlaybackProfile','VAAPI
 Normal','mythtv');
 INSERT INTO `settings` VALUES ('ThemePainter','auto','mythtv');
 INSERT INTO `settings` VALUES ('MenuTheme','defaultmenu','mythtv');
 INSERT INTO `settings` VALUES ('GuiWidth','0','mythtv');
 INSERT INTO `settings` VALUES ('GuiHeight','0','mythtv');
 INSERT INTO `settings` VALUES ('GuiOffsetX','0','mythtv');
 INSERT INTO `settings` VALUES ('GuiOffsetY','0','mythtv');
 INSERT INTO `settings` VALUES ('GuiSizeForTV','1','mythtv');
 INSERT INTO `settings` VALUES ('UseVideoModes','1','mythtv');
 INSERT INTO `settings` VALUES
 ('GuiVidModeResolution','1920x1080','mythtv');
 INSERT INTO `settings` VALUES ('Theme','MythCenter-wide','mythtv');
 INSERT INTO `settings` VALUES ('ThemeUpdateStatus','','mythtv');
 INSERT INTO `displayprofilegroups` VALUES ('VAAPI Normal','mythtv',73);
 INSERT INTO `displayprofiles` VALUES (73,199,'pref_priority','1');
 INSERT INTO `displayprofiles` VALUES (73,199,'pref_cmp0','> 0 0');
 INSERT INTO `displayprofiles` VALUES (73,199,'pref_decoder','vaapi');
 INSERT INTO `displayprofiles` VALUES (73,199,'pref_max_cpus','2');
 INSERT INTO `displayprofiles` VALUES (73,199,'pref_skiploop','1');
 INSERT INTO `displayprofiles` VALUES
 (73,199,'pref_videorenderer','openglvaapi');
 INSERT INTO `displayprofiles` VALUES
 (73,199,'pref_osdrenderer','opengl2');
 INSERT INTO `displayprofiles` VALUES (73,199,'pref_osdfade','1');
 INSERT INTO `displayprofiles` VALUES
 (73,199,'pref_deint0','vaapibobdeint');
 INSERT INTO `displayprofiles` VALUES
 (73,199,'pref_deint1','vaapionefield');
 INSERT INTO `displayprofiles` VALUES (73,199,'pref_filters','');
 INSERT INTO `displayprofiles` VALUES (73,200,'pref_priority','2');
 INSERT INTO `displayprofiles` VALUES (73,200,'pref_cmp0','> 0 0');
 INSERT INTO `displayprofiles` VALUES (73,200,'pref_decoder','ffmpeg');
 INSERT INTO `displayprofiles` VALUES (73,200,'pref_max_cpus','2');
 INSERT INTO `displayprofiles` VALUES (73,200,'pref_skiploop','1');
 INSERT INTO `displayprofiles` VALUES
 (73,200,'pref_videorenderer','opengl');
 INSERT INTO `displayprofiles` VALUES
 (73,200,'pref_osdrenderer','opengl2');
 INSERT INTO `displayprofiles` VALUES (73,200,'pref_osdfade','1');
 INSERT INTO `displayprofiles` VALUES
 (73,200,'pref_deint0','opengldoubleratekerneldeint');
 INSERT INTO `displayprofiles` VALUES
 (73,200,'pref_deint1','openglkerneldeint');
 INSERT INTO `displayprofiles` VALUES (73,200,'pref_filters','');
 INSERT INTO `displayprofiles` VALUES (73,199,'pref_cmp1','');
 INSERT INTO `displayprofiles` VALUES (73,199,'cond_codecs','');
 INSERT INTO `displayprofiles` VALUES (73,199,'cond_framerate','');
 INSERT INTO `displayprofiles` VALUES (73,200,'cond_codecs','');
 INSERT INTO `displayprofiles` VALUES (73,200,'cond_framerate','');
 INSERT INTO `displayprofiles` VALUES (73,200,'pref_cmp1','');
 }}}

 Myth successfully changes the refresh rate to match the video but the
 image is shifted downward.  It is as if the image is sitting on the bottom
 edge of the screen with the black space that should be two letterbox bars
 at the top.  Perhaps a divide-by-two missing somwehere in the positioning
 (haven't found it myself).

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13054#comment:25>
MythTV <http://www.mythtv.org>
MythTV Media Center


More information about the mythtv-commits mailing list