Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 12-19-08, 10:11 AM   #1
wump
Registered User
 
Join Date: Dec 2008
Posts: 9
Lightbulb VDPAU information utility

In similar vein to utilities like glxinfo, xdpyinfo, I made a simple utility that queries and displays the VDPAU capabilities of your X display and prints them in tabular format. For example, on my 8600GT at home it shows:
Code:
display: :0.0   screen: 0
API version: 0
Information string: Unknown

Video surface:

name   width height types
-------------------------------------------
420     4096  4096  NV12 YV12 
422     4096  4096  UYVY YUYV 

Decoder capabilities:

name          level macbs width height
------------------------------------
MPEG1             0  8191  2032  2032
MPEG2_SIMPLE      3  8191  2032  2032
MPEG2_MAIN        3  8191  2032  2032
H264_MAIN        41  8191  2032  2032
H264_HIGH        41  8191  2032  2032

Output surface:

name              width height nat types
----------------------------------------------------
B8G8R8A8          8192  8192    y  Y8U8V8A8 V8U8Y8A8 
R10G10B10A2       8192  8192    y  Y8U8V8A8 V8U8Y8A8 

Bitmap surface:

name              width height
------------------------------
B8G8R8A8          8192  8192
R8G8B8A8          8192  8192
R10G10B10A2       8192  8192
B10G10R10A2       8192  8192
A8                8192  8192

Video mixer:

feature name                    sup
------------------------------------
DEINTERLACE_TEMPORAL             y
DEINTERLACE_TEMPORAL_SPATIAL     y
INVERSE_TELECINE                 y
NOISE_REDUCTION                  y
SHARPNESS                        y
LUMA_KEY                         y

parameter name                  sup      min      max
-----------------------------------------------------
VIDEO_SURFACE_WIDTH              y         1     4096
VIDEO_SURFACE_HEIGHT             y         1     4096
CHROMA_TYPE                      y  
LAYERS                           y         0        4

attribute name                  sup      min      max
-----------------------------------------------------
BACKGROUND_COLOR                 y  
CSC_MATRIX                       y  
NOISE_REDUCTION_LEVEL            y      0.00     1.00
SHARPNESS_LEVEL                  y     -1.00     1.00
LUMA_KEY_MIN_LUMA                y  
LUMA_KEY_MAX_LUMA                y
I just wrote it as a simple first VDPAU program, to see how the API works, but I realised it might be useful to others as well.

Download link (c++ source code):
http://www.cs.rug.nl/~wladimir/vdpin...o-0.0.5.tar.gz

Changelog 0.0.5:
- show macroblocks instead of maximum number of references

Last edited by wump; 01-15-09 at 02:55 PM.
wump is offline   Reply With Quote
Old 12-19-08, 10:41 AM   #2
iamlindoro
Registered User
 
Join Date: Nov 2008
Posts: 18
Default Re: VDPAU information utility

Wump,

What a great and helpful little tool! What license is this released under? Any chance of making it not rely on being run from within an X session?

Thanks!
iamlindoro is offline   Reply With Quote
Old 12-19-08, 10:49 AM   #3
wump
Registered User
 
Join Date: Dec 2008
Posts: 9
Default Re: VDPAU information utility

Good point about the licensing. I just added a MIT license.

About running without an X session, I don't know if that is possible at all. To bootstrap everything, I currently use
Code:
    rv = vdp_device_create_x11(display, screen, &device, &get_proc_address);
... which requires a display and a screen. If you know of a way to make a VDP device without that, let me know.
wump is offline   Reply With Quote
Old 12-19-08, 10:58 AM   #4
iamlindoro
Registered User
 
Join Date: Nov 2008
Posts: 18
Default Re: VDPAU information utility

Hi wump,

No, I just asked an ignorant question. Of course you have to create a surface to make this work, glxinfo works the same way. Ignore me.
iamlindoro is offline   Reply With Quote
Old 12-19-08, 11:12 AM   #5
Stephen Warren
Moderator
 
Stephen Warren's Avatar
 
Join Date: Aug 2005
Posts: 1,327
Default Re: VDPAU information utility

Great tool! I always meant to write it myself...

A couple of notes:

1)

Some mixer parameters don't have an associated value range, (e.g. they're enums which could theoretically be disjoint)

Code:
CHROMA_TYPE                      y  00000001 00001000
2)

Same thing for some mixer attributes.

3)

The type of mixer attributes can vary (as indeed can mixer parameters). For example, these are floats, not ints:

Code:
NOISE_REDUCTION_LEVEL            y  00000000 3f800000
SHARPNESS_LEVEL                  y  bf800000 3f800000
The docs in the header should indicate all the details for the various parameters/attributes.
Stephen Warren is offline   Reply With Quote
Old 12-19-08, 11:40 AM   #6
wump
Registered User
 
Join Date: Dec 2008
Posts: 9
Default Re: VDPAU information utility

Thanks for the suggestions, I just posted a new version that addressees those things and updated the opening post...
wump is offline   Reply With Quote
Old 12-19-08, 11:50 AM   #7
wump
Registered User
 
Join Date: Dec 2008
Posts: 9
Default Re: VDPAU information utility

BTW:
Querying VDP_CHROMA_TYPE_444 with VideoSurfaceQueryCapabilities returns an error (VDP_STATUS_INVALID_CHROMA_TYPE), is this supposed to be the case? Shouldn't it just report supported=0 ?
wump is offline   Reply With Quote
Old 12-19-08, 01:41 PM   #8
maheshasolkar
Registered User
 
Join Date: Jun 2008
Posts: 2
Default Re: VDPAU information utility

I get different results when I compile with the CXXFLAGS in the makefile and when I compile without any CXXFLAGS (line commented out). The difference is:

Code:
% diff info.default_cxxflags.txt info.no_cxxflags.txt
43,48c43,48
< DEINTERLACE_TEMPORAL             -
< DEINTERLACE_TEMPORAL_SPATIAL     -
< INVERSE_TELECINE                 -
< NOISE_REDUCTION                  -
< SHARPNESS                        -
< LUMA_KEY                         -
---
> DEINTERLACE_TEMPORAL             y
> DEINTERLACE_TEMPORAL_SPATIAL     y
> INVERSE_TELECINE                 y
> NOISE_REDUCTION                  y
> SHARPNESS                        y
> LUMA_KEY                         y
Is this expected?

I have a GeForce 8400GS, by the way. I ran the utility to see how the vdpau support is on that card.

Thanks for the nifty tool!

/Mahesh
maheshasolkar is offline   Reply With Quote

Old 12-19-08, 09:19 PM   #9
wump
Registered User
 
Join Date: Dec 2008
Posts: 9
Default Re: VDPAU information utility

Quote:
Originally Posted by maheshasolkar View Post
I get different results when I compile with the CXXFLAGS in the makefile Is this expected?
Yes, this is pretty weird. You can reproduce this by changing line 258 to
Code:
VdpBool is_supported = true;
or
Code:
VdpBool is_supported = false;
It seems that VideoMixerQueryFeatureSupport doesn't change the value of the boolean at all ! Even though return value is VDP_STATUS_OK (this is checked). Because the value wasn't initialized by my program either it came out random. Very strange...
wump is offline   Reply With Quote
Old 12-19-08, 11:02 PM   #10
AaronP
NVIDIA Corporation
 
AaronP's Avatar
 
Join Date: Mar 2005
Posts: 2,487
Default Re: VDPAU information utility

Neat! I just have one suggestion: replace
Code:
char *display_name = NULL;
with
Code:
char *display_name = XDisplayName(NULL);
As for VideoMixerQueryFeatureSupport, it looks like it only sets is_supported if the feature is not supported. I'll file a bug.
AaronP is offline   Reply With Quote
Old 12-21-08, 05:14 AM   #11
wump
Registered User
 
Join Date: Dec 2008
Posts: 9
Default Re: VDPAU information utility

I've patched it to default to true for support of features now, this should be correct even with the bug. Also I use the XDisplayName.
wump is offline   Reply With Quote
Old 12-22-08, 06:09 PM   #12
Deanjo
Registered User
 
Join Date: Aug 2004
Posts: 301
Default Re: VDPAU information utility

Why not put this utility up on sourceforge?
Deanjo is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
xorg locks-up with newest nvidia drivers w/ vdpau. theroot NVIDIA Linux 1 06-24-12 11:04 AM
New Massive Cyber-Attack an 'Industrial Vacuum Cleaner for Sensitive Information' News Archived News Items 0 05-28-12 12:00 PM
Moderation in an Age of Information Abundance & Hypervisibility News Archived News Items 0 05-27-12 01:10 PM
680 Graphics Card with Afterburner Overclocking Utility (MSI) News Archived News Items 0 05-04-12 06:40 AM
GeForce4 owners: Please post your TV encoder and board information ScuzziOne NVIDIA GeForce 7, 8, And 9 Series 8 08-04-02 06:55 PM

All times are GMT -5. The time now is 12:57 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.