From f6336fbb129d41bcd9e4b6c68e8dc134ff7e1d3b Mon Sep 17 00:00:00 2001
From: Gavin Hurlbut <gjhurlbu@gmail.com>
Date: Tue, 14 Sep 2010 21:45:30 -0700
Subject: [PATCH] Fix green bar in 1080i previews
diff --git a/mythtv/libs/libmythtv/previewgenerator.cpp b/mythtv/libs/libmythtv/previewgenerator.cpp
index e08c606..0945090 100644
|
a
|
b
|
bool PreviewGenerator::SavePreview(QString filename,
|
| 531 | 531 | if (!data || !width || !height) |
| 532 | 532 | return false; |
| 533 | 533 | |
| 534 | | const QImage img((unsigned char*) data, |
| 535 | | width, height, QImage::Format_RGB32); |
| | 534 | QImage img((unsigned char*) data, |
| | 535 | width, height, QImage::Format_RGB32); |
| | 536 | |
| | 537 | if( width == 1920 && height == 1088 ) |
| | 538 | { |
| | 539 | // Remove the extra 8 pixels at the bottom of 1080i recordings that |
| | 540 | // decode to 1088 rows as these are bogus pixels and make the previews |
| | 541 | // look a bit wrong. The worst offender seems to be H.264 captures |
| | 542 | // from HDPVR. |
| | 543 | img = img.copy(0, 0, 1920, 1080); |
| | 544 | } |
| 536 | 545 | |
| 537 | 546 | float ppw = max(desired_width, 0); |
| 538 | 547 | float pph = max(desired_height, 0); |