Opened 16 years ago

Last modified 13 years ago

#1012 new defect

xv colorkey is too small by one pixel

Reported by: aflist2@… Owned by: reimar
Priority: normal Component: vo
Version: HEAD Severity: normal
Keywords: Cc: reimar
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

hello,

a thin black line is visible on the left and bottom of xv video windows, because the colorkey is too small by one pixel in width and height. these artifacts may be difficult to see if a window manager is active, as it would blend into any shadow/raised line effect.

Attachments (3)

undersize_colorkey.patch (854 bytes ) - added by aflist2@… 16 years ago.
a fix
withpatch.png (2.8 KB ) - added by aflist2@… 16 years ago.
with patch
withoutpatch.png (2.8 KB ) - added by aflist2@… 16 years ago.
without patch

Download all attachments as: .zip

Change History (11)

by aflist2@…, 16 years ago

Attachment: undersize_colorkey.patch added

a fix

comment:1 by aflist2@…, 16 years ago

i've been using this patch for 30 days with no bad defect noted on regular playback or panscan playback.

comment:2 by reimar, 16 years ago

According to my copy of the X manpages, XFillRectangle behaves just like XFillPolygon with the points
[x,y] [x+width,y] [x+width,y+height] [x,y+height]
which would mean that the current code is correct and your change would break it and actually draw one pixel too much, possibly resulting in a green border.

comment:3 by aflist2@…, 16 years ago

here are two images taken with import -window root -display :0.1, with and without the patch applied. load them in gimp and use its autocrop tool to tell you how wide the colorkey area is. i've got 640x480 with the patch and 639x479 without it.
screen size is 800x600, background green and colorkey was put on the screen by mplayer -nofs <video>.

by aflist2@…, 16 years ago

Attachment: withpatch.png added

with patch

comment:4 by aflist2@…, 16 years ago

by aflist2@…, 16 years ago

Attachment: withoutpatch.png added

without patch

comment:5 by aflist2@…, 16 years ago

comment:6 by reimar, 16 years ago

Cc: Reimar.Doeffinger@… added

The problem is not that I would not believe you, the question is just where is the bug?
In MPlayer and the X man pages or in the X server/driver?
This kind of code was changed back and forth several times, which is why I am very reluctant to change it, even though I can see the same behaviour.
Which X driver are you using? I tried with the nvidia binary ones.

comment:7 by aflist2@…, 16 years ago

i'm using xorg ati driver 6.6.3.

an interesting bit is in in vo_xvmc.c, lines 1000-1006. xvmc doesn't subtract one from the same call to vo_xv_draw_colorkey.

comment:8 by compn, 13 years ago

Owner: changed from beastd to reimar
Note: See TracTickets for help on using tickets.