From e4baf7227c011fa66a8502da4d92e7bc6e26b96f Mon Sep 17 00:00:00 2001
From: Gavin Hurlbut <gjhurlbu@gmail.com>
Date: Tue, 14 Sep 2010 16:59:18 -0700
Subject: [PATCH] Trim 8 pixels from 1080i when it's 1088 high (take 2)


diff --git a/mythtv/libs/libmythtv/previewgenerator.cpp b/mythtv/libs/libmythtv/previewgenerator.cpp
index e08c606..c60a100 100644
--- a/mythtv/libs/libmythtv/previewgenerator.cpp
+++ b/mythtv/libs/libmythtv/previewgenerator.cpp
@@ -531,6 +531,15 @@ bool PreviewGenerator::SavePreview(QString filename,
     if (!data || !width || !height)
         return false;
 
+    if( width == 1920 && height == 1088 )
+    {
+        // Remove the extra 8 pixels at the bottom of 1080i recordings that
+        // decode to 1088 rows as these are bogus pixels and make the previews
+        // look a bit wrong.  The worst offender seems to be H.264 captures
+        // from HDPVR.
+        height = 1080;
+    }
+
     const QImage img((unsigned char*) data,
                      width, height, QImage::Format_RGB32);
 
-- 
1.7.0.4

