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

Newegg Daily Deals

Reply
 
Thread Tools
Old 10-06-09, 01:35 PM   #1
bwheaton
Registered User
 
Join Date: Nov 2008
Location: California
Posts: 59
Send a message via AIM to bwheaton
Default VDPAU and RGB Movies

Do any of the codecs as implemented by VDPAU allow RGB encoding? I need to re-encode movies for playback on VDPAU, but I'd like to keep the 8-bit RGB ones in RGB throughout.

Until a magical way to convert VideoSurfaces to OpenGL textures appears, I'll probably be pulling the pixels back to the CPU side.

Thanks,

Bruce
bwheaton is offline   Reply With Quote
Old 10-06-09, 02:25 PM   #2
hl_
Registered User
 
Join Date: Feb 2009
Posts: 138
Default Re: VDPAU and RGB Movies

Quote:
Do any of the codecs as implemented by VDPAU allow RGB encoding? I need to re-encode movies for playback on VDPAU, but I'd like to keep the 8-bit RGB ones in RGB throughout.
No. MPEG-family codecs don't support RGB at all as far as I know so it'd be quite useless...

Quote:
Until a magical way to convert VideoSurfaces to OpenGL textures appears, I'll probably be pulling the pixels back to the CPU side.
I think rendering into a X pixmap and using texture_from_pixmap on that works just fine.
hl_ is offline   Reply With Quote
Old 10-06-09, 05:21 PM   #3
bwheaton
Registered User
 
Join Date: Nov 2008
Location: California
Posts: 59
Send a message via AIM to bwheaton
Default Re: VDPAU and RGB Movies

Quote:
Originally Posted by hl_ View Post
No. MPEG-family codecs don't support RGB at all as far as I know so it'd be quite useless...

I think rendering into a X pixmap and using texture_from_pixmap on that works just fine.
As far as I know either. Can anyone say for sure, is what I'm asking.

I'm aware of texture_from_pixmap, but I think sync is hard in that path, and I think it only delivers RGB frames - I need the raw pixels so I can go through the same path as non-VDPAU codecs.

Bruce
bwheaton is offline   Reply With Quote
Old 10-06-09, 07:08 PM   #4
hl_
Registered User
 
Join Date: Feb 2009
Posts: 138
Default Re: VDPAU and RGB Movies

Well, the point is, VideoSurfaces cannot be RGB at the moment anyway... and yes RGB frames are delivered that way but I think that is what you wanted?
hl_ is offline   Reply With Quote
Old 10-06-09, 07:11 PM   #5
bwheaton
Registered User
 
Join Date: Nov 2008
Location: California
Posts: 59
Send a message via AIM to bwheaton
Default Re: VDPAU and RGB Movies

Quote:
Originally Posted by hl_ View Post
Well, the point is, VideoSurfaces cannot be RGB at the moment anyway... and yes RGB frames are delivered that way but I think that is what you wanted?
That's not how I read it. VdpVideoSurfaces are mainly yuv. I'm curious whether they can be RGB if the codec supports it. You're thinking of VdpOutputSurfaces.

And no, I want native frames - be they yuv or RGB. I'll make my own RGB, as I do with non-VDPAU codecs (using GLSL shaders).

Bruce
bwheaton is offline   Reply With Quote
Old 10-06-09, 07:25 PM   #6
hl_
Registered User
 
Join Date: Feb 2009
Posts: 138
Default Re: VDPAU and RGB Movies

No, I was thinking of VideoSurfaces. The functions to handle these have 'YCbCr' in them which implies that it's YUV only (YCbCr is the technically correct term for YUV). OTOH, ChromaTypes also have RGB. I'm not sure what to think about that.
hl_ is offline   Reply With Quote
Old 10-07-09, 05:32 AM   #7
crisalide
Registered User
 
Join Date: Dec 2008
Posts: 173
Default Re: VDPAU and RGB Movies

Quoting the doc (http://http.download.nvidia.com/XFre...o_surface.html) :
"A VdpVideoSurface stores YCbCr data ..."
crisalide is offline   Reply With Quote
Old 10-07-09, 05:37 AM   #8
crisalide
Registered User
 
Join Date: Dec 2008
Posts: 173
Default Re: VDPAU and RGB Movies

Quote:
Originally Posted by hl_ View Post
OTOH, ChromaTypes also have RGB. I'm not sure what to think about that.
From http://http.download.nvidia.com/XFre...sc__types.html :
#define VDP_CHROMA_TYPE_420
#define VDP_CHROMA_TYPE_422
#define VDP_CHROMA_TYPE_444

Also note that nvidia's decoders only support 4:2:0
crisalide is offline   Reply With Quote

Old 10-07-09, 11:00 AM   #9
bwheaton
Registered User
 
Join Date: Nov 2008
Location: California
Posts: 59
Send a message via AIM to bwheaton
Default Re: VDPAU and RGB Movies

Quote:
Originally Posted by crisalide View Post
From http://http.download.nvidia.com/XFre...sc__types.html :
#define VDP_CHROMA_TYPE_420
#define VDP_CHROMA_TYPE_422
#define VDP_CHROMA_TYPE_444

Also note that nvidia's decoders only support 4:2:0
Those are chroma sub-sampling types. Format, which is used in the same method, has values like:

#define VDP_RGBA_FORMAT_B8G8R8A8

I cant' find where it says they only do 4:2:0.

Maybe I can re-phrase my question.

I am a native English speaker and can operate a web browser (I have also heard of Google). I have read through the current VDPAU API documents as closely as I can. I notice that, although many methods refer primarily to YCbCr (which, being English, I refer to correctly in EBU terms as YUV), the possible formats also refer to RGB types. I notice there is a 4:4:4 chroma sub-sampling type, which of course can refer to RGB or YUV data.

So I wonder if, although the main VDPAU rendering path is YCbCr, there is anyone watching the list with *specific knowledge* of whether the VDPAU codecs, as implemented currently, will decode any color spaces other than YCbCr if requested. I understand that, in that case, I would probably only be able to get the raw pixel data back, not pass them through the whole VDPAU pipeline.

I have tried looking through MPEG, H.264 and WMV docs, but there's so much information I can be sure I wouldn't have missed it. For instance, I know that H.264 can support YCoCg, but that's rarely mentioned.

Thank you,

Bruce Wheaton
bwheaton is offline   Reply With Quote
Old 10-07-09, 11:15 AM   #10
bwheaton
Registered User
 
Join Date: Nov 2008
Location: California
Posts: 59
Send a message via AIM to bwheaton
Default Re: VDPAU and RGB Movies

Ok, having stopped by grumpy, I found the following in the 190.36 read me (please could we add the 'Implementation Limits' section to the API reference?).
VdpVideoSurface

The maximum supported resolution is 4096x4096.

The following surface formats and get-/put-bits combinations are supported:

VDP_CHROMA_TYPE_420 (Supported get-/put-bits formats are VDP_YCBCR_FORMAT_NV12, VDP_YCBCR_FORMAT_YV12)

VDP_CHROMA_TYPE_422 (Supported get-/put-bits formats are VDP_YCBCR_FORMAT_UYVY, VDP_YCBCR_FORMAT_YUYV)
and
VdpDecoder

In all cases, VdpDecoder objects solely support 8-bit 4:2:0 streams, and only support writing to VDP_CHROMA_TYPE_420 surfaces.
I guess that covers it, thanks.

Sometimes it's tough on a list when people try to help but don't quote where the info comes from - sometimes a definitive answer is what people need, and the developers/company reps on this list don't have time to provide specific answers to everyone. I'm going to have to try to be aware of this myself. I got quite the catty smack-down on the decklink list a while back...

Bruce
bwheaton is offline   Reply With Quote
Old 10-07-09, 11:23 AM   #11
crisalide
Registered User
 
Join Date: Dec 2008
Posts: 173
Default Re: VDPAU and RGB Movies

Have a look at nvidia's driver README, Appendix-H :

"In all cases, VdpDecoder objects solely support 8-bit 4:2:0 streams, and only support writing to VDP_CHROMA_TYPE_420 surfaces."

"The following surface formats and get-/put-bits combinations are supported:
  • VDP_CHROMA_TYPE_420 (Supported get-/put-bits formats are VDP_YCBCR_FORMAT_NV12, VDP_YCBCR_FORMAT_YV12)
  • VDP_CHROMA_TYPE_422 (Supported get-/put-bits formats are VDP_YCBCR_FORMAT_UYVY, VDP_YCBCR_FORMAT_YUYV)"
crisalide is offline   Reply With Quote
Old 10-07-09, 11:53 AM   #12
AaronP
NVIDIA Corporation
 
AaronP's Avatar
 
Join Date: Mar 2005
Posts: 2,487
Default Re: VDPAU and RGB Movies

Quote:
Originally Posted by bwheaton View Post
please could we add the 'Implementation Limits' section to the API reference?
It doesn't really belong in the API reference because it's an NVIDIA-specific limitation and the API is designed to work with other vendors' products that may not have these limitations.
AaronP 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


All times are GMT -5. The time now is 03:16 PM.


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