Bug 10438 - i965 Xv scaling wrong for nonsquare pixels
Summary: i965 Xv scaling wrong for nonsquare pixels
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Eric Anholt
QA Contact: Xorg Project Team
URL: http://www.parkercat.org/doug/i965_vi...
Whiteboard:
Keywords:
Depends on:
Blocks: 10102
  Show dependency treegraph
 
Reported: 2007-03-27 17:35 UTC by Doug Larrick
Modified: 2007-04-17 10:50 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch for i965_video.c (637 bytes, patch)
2007-03-27 17:37 UTC, Doug Larrick
no flags Details | Splinter Review

Description Doug Larrick 2007-03-27 17:35:28 UTC
MythTV implements "bob" deinterlacing by rearranging the scanlines of an
interlaced picture such that the first field's lines are in the top half
of the picture, and the second field's lines are in the bottom half.  It
then does XvShmPutImage with first the top half of the frame (one field)
then the bottom, at twice the video's interlaced frame rate.  It is
counting on the video card/driver to scale the output back to full
height.  I wrote this code.  It has worked for a few years for many
people on a variety of hardware.  

Example debug output from i830_video.c, I830PutImage :

  I830PutImage: src: (0,0)(704,240), dst: (209,50)(960,720)
  width 704, height 480
  I830PutImage: src: (0,240)(704,240), dst: (209,51)(960,720)
  width 704, height 480

With the current Intel driver (as well as with recent i810 drivers), the video is not scaled to fit the entire window, instead showing in the top half only.

The simple patch in the supplied URL fixes this problem for me.
Comment 1 Doug Larrick 2007-03-27 17:37:02 UTC
Created attachment 9332 [details] [review]
Patch for i965_video.c
Comment 2 Doug Larrick 2007-03-28 14:29:09 UTC
You can see a related effect in the GXine or Totem movie players by zooming in on a video while it's playing.  The video takes up progressively less of the window with each zoom step.  With the patch, it works properly.
Comment 3 Eric Anholt 2007-04-17 10:50:51 UTC
Fixed with a slightly different patch.  Thanks!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.