Hi all,
Some of you on the VDR mailing list may have seen me struggling to get
softdevice's OSD to work without odd artifacts.
Although I have not yet found the source of the problem, I have a
potential work around: I believe my nVidia 6200 provides hardware alpha
blending support for Xv images. I think most, if not all new nVidia cards
do. If so, this would be really nice to support!
xdpyinfo lists for the blitter port, among other things:
id: 0x3
guid: 03000000-0000-0010-8000-00aa00389b71
bits per pixel: 32
number of planes: 1
type: RGB (packed)
depth: 24
red, green, blue masks: 0xff0000, 0xff00, 0xff
This is confirmed by page 18/95 on:
download.nvidia.com/XFree86_40/1.0-4191/NVLinuxNotes4191.pdf
"Added an 8:8:8:8 XRGB XvImage format to the video blitter."
To add nVidia alpha-blending support to softdevice for the OSD seems
straightforward.
I would think one would need to:
- Set softdevice to use video blitter for video XvPutImage calls
- Open a second video blitter port for OSD purposes (with id 0x3 for color
space)
- Create an OSD buffer and store VDR's OSD with appropriate color weight
(i.e. if VDR uses 6-6-6 for RGB, left-shift RGB components into upper 6
bits of each XRGB 8-bit color component)
- Store alpha value (menu settable?) in buffer
- Call XvPutImage with second blitter port for OSD updates
- To clear or blank OSD perhaps use a second OSD buffer with alpha set to
zero (0) and just call XvPutImage
Although this seems logical and easy in theory, I am having a very very
hard time following softdevice's code. I do not understand the
partitioning of functions among files (video.c, video-xv.c, etc) and the
lack of many comments makes it hard for me to reverse engineer the logic.
I tried adding a menu item for "nv_hardware", but immediately after
setting that softdevice crashes. That's about as far as I've gone.
Is there anyone on the list willing to work with me to add or test this
theory out?
Thank you,
CR.
X-Video Extension version 2.2
screen #0
Adaptor #0: "NV17 Video Texture"
number of ports: 1
port base: 53
operations supported: PutImage
supported visuals:
depth 24, visualID 0x21
depth 24, visualID 0x22
number of attributes: 3
"XV_SET_DEFAULTS" (range 0 to 0)
client settable attribute
"XV_ITURBT_709" (range 0 to 1)
client settable attribute
client gettable attribute (current value is 0)
"XV_SYNC_TO_VBLANK" (range 0 to 1)
client settable attribute
client gettable attribute (current value is 1)
maximum XvImage size: 2046 x 2046
Number of image formats: 4
id: 0x32595559 (YUY2)
guid: 59555932-0000-0010-8000-00aa00389b71
bits per pixel: 16
number of planes: 1
type: YUV (packed)
id: 0x32315659 (YV12)
guid: 59563132-0000-0010-8000-00aa00389b71
bits per pixel: 12
number of planes: 3
type: YUV (planar)
id: 0x59565955 (UYVY)
guid: 55595659-0000-0010-8000-00aa00389b71
bits per pixel: 16
number of planes: 1
type: YUV (packed)
id: 0x30323449 (I420)
guid: 49343230-0000-0010-8000-00aa00389b71
bits per pixel: 12
number of planes: 3
type: YUV (planar)
Adaptor #1: "NV05 Video Blitter"
number of ports: 32
port base: 54
operations supported: PutImage
supported visuals:
depth 24, visualID 0x21
depth 24, visualID 0x22
number of attributes: 2
"XV_SET_DEFAULTS" (range 0 to 0)
client settable attribute
"XV_SYNC_TO_VBLANK" (range 0 to 1)
client settable attribute
client gettable attribute (current value is 0)
maximum XvImage size: 2046 x 2046
Number of image formats: 5
id: 0x32595559 (YUY2)
guid: 59555932-0000-0010-8000-00aa00389b71
bits per pixel: 16
number of planes: 1
type: YUV (packed)
Adaptor #1: "NV05 Video Blitter"
number of ports: 32
port base: 54
operations supported: PutImage
supported visuals:
depth 24, visualID 0x21
depth 24, visualID 0x22
number of attributes: 2
"XV_SET_DEFAULTS" (range 0 to 0)
client settable attribute
"XV_SYNC_TO_VBLANK" (range 0 to 1)
client settable attribute
client gettable attribute (current value is 0)
maximum XvImage size: 2046 x 2046
Number of image formats: 5
id: 0x32595559 (YUY2)
guid: 59555932-0000-0010-8000-00aa00389b71
bits per pixel: 16
number of planes: 1
type: YUV (packed)
id: 0x32315659 (YV12)
guid: 59563132-0000-0010-8000-00aa00389b71
bits per pixel: 12
number of planes: 3
type: YUV (planar)
id: 0x59565955 (UYVY)
guid: 55595659-0000-0010-8000-00aa00389b71
bits per pixel: 16
number of planes: 1
type: YUV (packed)
id: 0x30323449 (I420)
guid: 49343230-0000-0010-8000-00aa00389b71
bits per pixel: 12
number of planes: 3
type: YUV (planar)
id: 0x3
guid: 03000000-0000-0010-8000-00aa00389b71
bits per pixel: 32
number of planes: 1
type: RGB (packed)
depth: 24
red, green, blue masks: 0xff0000, 0xff00, 0xff
_______________________________________________
Softdevice-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/softdevice-devel