[mythtv] Aspect Change problems

Edward Wildgoose edward.wildgoose at frmhedge.com
Sat Nov 22 10:25:49 EST 2003


Just to confirm that I tried the latest CVS and it still have the problem
with that wierd jitter developing after any change in aspect ratio in the
source stream.  The problem with cvs seems to be in
VideoOutput::InputChanged, something in there to do with resetting video
buffers is causing something which triggers this jitter.  The effect is very
odd, video frames jitter forwards and backwards in time...

I can't really understand what's happening, but perhaps someone else could
take a look (Isaac?).  I have uploaded a sample file which demonstrates the
issue:

http://www.wildgooses.com/dummyfile.mpg

It's 20Mb and on the end of a dsl line so please be gentle.  The problems
occur at the end of the trailors as the program (scrubs) starts.

In the meantime, DVB users might want to try Kenneth's patch below:


Index: avformatdecoder.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/avformatdecoder.cpp,v
retrieving revision 1.64
diff -u -r1.64 avformatdecoder.cpp
--- avformatdecoder.cpp 15 Nov 2003 00:56:02 -0000      1.64
+++ avformatdecoder.cpp 21 Nov 2003 15:47:23 -0000
@@ -723,8 +723,7 @@
                     float aspect = GetMpegAspect(context, aspectratioinfo,
                                                  width, height);

-                    if (CheckVideoParams(width, height) ||
-                        aspect != current_aspect)
+                    if (CheckVideoParams(width, height))
                     {
                         m_parent->SetVideoParams(ALIGN(width,16),
                                                  ALIGN(height,16), fps,
@@ -738,6 +737,13 @@
                         prevgoppos = 0;
                         video_last_P_pts = lastapts = lastvpts = 0;
                     }
+
+                    if (aspect != current_aspect)
+                    {
+                        m_parent->SetVideoParams(0,0,0, keyframedist,
aspect);
+                        m_parent->ReinitVideo(true);
+                        current_aspect = aspect;
+                    }
                 }
                 break;

Index: NuppelVideoPlayer.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/NuppelVideoPlayer.cpp,v
retrieving revision 1.295
diff -u -r1.295 NuppelVideoPlayer.cpp
--- NuppelVideoPlayer.cpp       16 Nov 2003 01:11:49 -0000      1.295
+++ NuppelVideoPlayer.cpp       21 Nov 2003 15:47:41 -0000
@@ -344,8 +344,14 @@
     }
 }

-void NuppelVideoPlayer::ReinitVideo(void)
+void NuppelVideoPlayer::ReinitVideo(bool aspect_only)
 {
+    if (aspect_only)
+    {
+        videoOutput->AspectChanged(video_aspect);
+        return;
+    }
+
     InitFilters();
     videoOutput->InputChanged(video_width, video_height, video_aspect);

Index: NuppelVideoPlayer.h
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/NuppelVideoPlayer.h,v
retrieving revision 1.123
diff -u -r1.123 NuppelVideoPlayer.h
--- NuppelVideoPlayer.h 5 Nov 2003 03:53:07 -0000       1.123
+++ NuppelVideoPlayer.h 21 Nov 2003 15:47:41 -0000
@@ -167,7 +167,7 @@

     bool GetLimitKeyRepeat(void) { return limitKeyRepeat; }

-    void ReinitVideo(void);
+    void ReinitVideo(bool aspect_only=false);
     void ReinitAudio(void);

     void ToggleLetterbox(void);




More information about the mythtv-dev mailing list