Ticket #8937: 0001-Fix-green-bar-in-1080i-previews.patch

File 0001-Fix-green-bar-in-1080i-previews.patch, 1.2 KB (added by beirdo, 16 years ago)
  • mythtv/libs/libmythtv/previewgenerator.cpp

    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,  
    531531    if (!data || !width || !height)
    532532        return false;
    533533
    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    }
    536545
    537546    float ppw = max(desired_width, 0);
    538547    float pph = max(desired_height, 0);