1Name 2 3 NV_vdpau_interop2 4 5Name Strings 6 7 GL_NV_vdpau_interop2 8 9Contributors 10 11 Manoj Gupta Bonda, NVIDIA 12 James Jones, NVIDIA 13 14Contact 15 16 Manoj Gupta Bonda, NVIDIA (mbonda 'at' nvidia.com) 17 18Status 19 20 Complete 21 22Version 23 24 1 (2 Oct 2018) 25 26Number 27 28 OpenGL Extension #533 29 30Dependencies 31 32 This extension is written against the OpenGL 4.6 Specification 33 (Compatibility Profile), dated July 30, 2017. 34 but can apply to OpenGL 1.1 and up. 35 36 OpenGL 1.1 is required. 37 GL_NV_vdpau_interop is required. 38 GL_EXT_framebuffer_object affects the definition of this extension. 39 GL_ARB_texture_rectangle affects the definition of this extension. 40 GL_ARB_texture_non_power_of_two affects the definition of this 41 extension. 42 43Overview 44 45 This extension allows VDPAU video surfaces to be used 46 either with frame or field structures for texturing and rendering. 47 48IP Status 49 50 There are no known IP issues. 51 52New Types 53 54 None 55 56New Procedures and Functions 57 58 59 vdpauSurfaceNV VDPAURegisterVideoSurfaceWithPictureStructureNV (const void *vdpSurface, 60 enum target, 61 sizei numTextureNames, 62 const uint *textureNames, 63 boolean isFrameStructure); 64 65New Tokens 66 67 None 68 69Additions to Chapter 8 of the OpenGL 4.6 (unabridged) Specification 70(Textures and Samplers) 71 72 Replace the paragraph that begins with 'The command 73 vdpauSurfaceNV VDPAURegisterVideoSurfaceNV' and the following two paragraphs, 74 including table 3.8.3.1, with the following: 75 76 The commands 77 78 vdpauSurfaceNV VDPAURegisterVideoSurfaceNV (const void *vdpSurface, 79 enum target, 80 sizei numTextureNames, 81 const uint *textureNames); 82 83 vdpauSurfaceNV VDPAURegisterVideoSurfaceWithPictureStructureNV (const void *vdpSurface, 84 enum target, 85 sizei numTextureNames, 86 const uint *textureNames, 87 boolean isFrameStructure); 88 89 defines a set of two-dimensional textures, where the image data may 90 be taken from the VdpVideoSurface <vdpSurface>. <target> must be 91 one of TEXTURE_2D or TEXTURE_RECTANGLE. <numTextureNames> 92 determines how many textures are defined. <textureNames> contains 93 the names of the textures that are defined. The surface is 94 transitioned into the registered state. 95 96 VDPAURegisterVideoSurfaceNV is equivalent to calling 97 VDPAURegisterVideoSurfaceWithPictureStructureNV with <isFrameStructure> 98 set to FALSE. 99 100 Legal values for <numTextureNames>,<isFrameStructure> are derived from the 101 VdpChromaType of <vdpSurface>, as defined in table 8.7.1. 102 103 Internal 104 VdpChromaType numTextureNames isFrameStructure Index Size Format Content 105 ------------- --------------- ---------------- ----- ---- -------- ------------------- 106 VDP_CHROMA_TYPE_420 4 0 0 w x h/2 R8 Top-field luma 107 1 w x h/2 R8 Bottom-field luma 108 2 w/2 x h/4 R8G8 Top-field chroma 109 3 w/2 x h/4 R8G8 Bottom-field chroma 110 VDP_CHROMA_TYPE_422 4 0 0 w x h/2 R8 Top-field luma 111 1 w x h/2 R8 Bottom-field luma 112 2 w/2 x h/2 R8G8 Top-field chroma 113 3 w/2 x h/2 R8G8 Bottom-field chroma 114 VDP_CHROMA_TYPE_444 4 0 0 w x h/2 R8 Top-field luma 115 1 w x h/2 R8 Bottom-field luma 116 2 w x h/2 R8G8 Top-field chroma 117 3 w x h/2 R8G8 Bottom-field chroma 118 VDP_CHROMA_TYPE_420 2 1 0 w x h R8 Luma 119 1 w/2 x h/2 R8G8 Chroma 120 VDP_CHROMA_TYPE_422 2 1 0 w x h R8 Luma 121 1 w/2 x h R8G8 Chroma 122 VDP_CHROMA_TYPE_444 2 1 0 w x h R8 Luma 123 1 w x h R8G8 Chroma 124 VDP_CHROMA_TYPE_420_FIELD 4 0 0 w x h/2 R8 Top-field luma 125 1 w x h/2 R8 Bottom-field luma 126 2 w/2 x h/4 R8G8 Top-field chroma 127 3 w/2 x h/4 R8G8 Bottom-field chroma 128 VDP_CHROMA_TYPE_422_FIELD 4 0 0 w x h/2 R8 Top-field luma 129 1 w x h/2 R8 Bottom-field luma 130 2 w/2 x h/2 R8G8 Top-field chroma 131 3 w/2 x h/2 R8G8 Bottom-field chroma 132 VDP_CHROMA_TYPE_444_FIELD 4 0 0 w x h/2 R8 Top-field luma 133 1 w x h/2 R8 Bottom-field luma 134 2 w x h/2 R8G8 Top-field chroma 135 3 w x h/2 R8G8 Bottom-field chroma 136 VDP_CHROMA_TYPE_420_FRAME 2 1 0 w x h R8 Luma 137 1 w/2 x h/2 R8G8 Chroma 138 VDP_CHROMA_TYPE_422_FRAME 2 1 0 w x h R8 Luma 139 1 w/2 x h R8G8 Chroma 140 VDP_CHROMA_TYPE_444_FRAME 2 1 0 w x h R8 Luma 141 1 w x h R8G8 Chroma 142 143 Table 8.7.1: Supported VdpChromaType values, and derived values 144 of <numTextureNames>,<isFrameStructure> and texture parameters for 145 each texture. 146 147 VDPAURegisterVideoSurfaceWithPictureStructureNV's return value is a handle 148 used by various other commands detailed in NV_vdpau_interop. 149 150 151Additions to the AGL/GLX/WGL Specifications 152 153 None 154 155Additions to the OpenGL Shading Language 156 157 None 158 159GLX Protocol 160 161 VDPAU implementations currently only support direct-rendering. 162 Consequently, no GLX protocol is currently defined for this 163 extension. 164 165Dependencies on GL_ARB_texture_rectangle 166 167 If GL_ARB_texture_rectangle is not supported, TEXTURE_RECTANGLE may 168 not be used as target for VDPAURegisterVideoSurfaceWithPictureStructureNV. 169 170Dependencies on GL_ARB_texture_non_power_of_two 171 172 If GL_ARB_texture_non_power_of_two is not supported, only VDPAU 173 surfaces with power-of-two size may be used with target TEXTURE_2D. 174 175Errors 176 177 INVALID_OPERATION is generated by 178 VDPAURegisterVideoSurfaceWithPictureStructureNV if the VDPAU driver 179 refuses the request for some reason. 180 181 INVALID_OPERATION is generated if any texture named by an entry 182 within the <textureNames> parameter of 183 VDPAURegisterVideoSurfaceWithPictureStructureNV is marked as immutable. 184 185 INVALID_VALUE is generated if the VDPAU surface named by the 186 <vdpSurface> parameter of VDPAURegisterVideoSurfaceWithPictureStructureNV 187 does not have a supported format; 188 see table 8.7.1. 189 190New State 191 192 None 193 194New Implementation State 195 196 None 197 198Issues 199 200 201Revision History 202 203 1. 02 Oct 2018 - Manoj Bonda 204 Initial version 205 206 2. 21 Nov 2018 - Manoj Bonda 207 Changed status to complete. 208 209