nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   VDPAU and RGB Movies (http://www.nvnews.net/vbulletin/showthread.php?t=139744)

bwheaton 10-06-09 01:35 PM

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

hl_ 10-06-09 02:25 PM

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.

bwheaton 10-06-09 05:21 PM

Re: VDPAU and RGB Movies
 
Quote:

Originally Posted by hl_ (Post 2099546)
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

hl_ 10-06-09 07:08 PM

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?

bwheaton 10-06-09 07:11 PM

Re: VDPAU and RGB Movies
 
Quote:

Originally Posted by hl_ (Post 2099740)
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

hl_ 10-06-09 07:25 PM

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.

crisalide 10-07-09 05:32 AM

Re: VDPAU and RGB Movies
 
Quoting the doc (http://http.download.nvidia.com/XFre...o_surface.html) :
"A VdpVideoSurface stores YCbCr data ..."

crisalide 10-07-09 05:37 AM

Re: VDPAU and RGB Movies
 
Quote:

Originally Posted by hl_ (Post 2099751)
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

bwheaton 10-07-09 11:00 AM

Re: VDPAU and RGB Movies
 
Quote:

Originally Posted by crisalide (Post 2099986)
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 10-07-09 11:15 AM

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

crisalide 10-07-09 11:23 AM

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)"

AaronP 10-07-09 11:53 AM

Re: VDPAU and RGB Movies
 
Quote:

Originally Posted by bwheaton (Post 2100125)
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.


All times are GMT -5. The time now is 08:29 AM.

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