QUADRO SDI OUTPUT PG-03776-001_v06 | May 2011 Programmer’s Guide
DOCUMENT CHANGE HISTORY PG-03776-001_v06 Version Date Authors Description of Change 01 January 24, 2008 TT, SM Initial Release 02 August 14, 2009 TT, SM • API Change • New template 03 January 15, 2010 TT, SM The following information added in this revision: Chapter 6 Ancillary Data Chapter 14 Ancillary Data API 04 June 17, 2010 TT, SM 05 November 8, 2010 TT, SM 06 May 26, 2011 Quadro SDI Output TT, SM • Change to the code in Chapter 12 NVAPI VIO • Updated Code Listing 25 • Updated
TABLE OF CONTENTS 1 Getting Started ..................................................................... 1 2 Device Control APIs ..................................................................... 2 2.1 2.2 Windows .................................................................................. 2 Linux ...................................................................................... 2 3 OpenGL Extensions .....................................................................
9 Device Feedback .................................................................... 47 9.1 Determining the Number of Queued Buffers ....................................... 47 9.1.1 Using the GLX/WGL_video_out Extension ........................................ 48 9.1.2 Using the GL_present_video Extension ........................................... 49 9.2 Detecting Duplicate Frames .......................................................... 51 9.2.1 Using the GLX/WGL_video_out Extension .................
LIST OF TABLES Table 5-1. Pbuffer Size = Field ................................................................. 26 Table 5-2. Pbuffer Size = Frame................................................................ 27 Table 8-1. Changeable and Unchangeable Configuration Parameters .................... 46 Table 10-1. SD ITU 601 Coefficients .......................................................... 56 Table 10-2. HD ITU 709 Coefficients .......................................................... 56 Table 10-3.
1 GETTING STARTED Application programming of the NVIDIA Quadro® FX SDI is broken into two principle parts, device control and data transfer. Device control handles the hardware configuration as well as the starting and stopping of data transfers while data transfer is the sequence of operations that send graphics data to the video device for output.
2 DEVICE CONTROL APIS 2.1 WINDOWS On systems running the Microsoft Windows Operating System, hardware setup and control is handled by the VIO commands of NVAPI, NVIDIA’s universal control API. Use of NVAPI requires the inclusion of the following include and library files. These files are packaged within the NVIDA Quadro SDI SDK. nvapi.h nvapi.lib Use of the NVAPI to control the Quadro SDI device is described in Chapter 4 Device Setup and Control.
Device Control APIs Control of the Quadro SDI device with the NV-CONTROL X Extension is described in Chapter 4 Device Setup and Control. Additional information on the NV-CONTROL X Extension can be found in the NV-CONTROL-API.txt document included in the archive listed previously.
3 OPENGL EXTENSIONS Data transfer is enabled by extensions to OpenGL. The GL_NV_present_video extension provides a mechanism for the displaying of textures and renderbuffers on the Quadro SDI output. This extension is supported on both Windows and Linux systems. The WGL_NV_video_out extension sends pbuffers to the SDI device in the case of Windows while the GLX_NV_video_out extension provides the same capabilities on Linux systems.
4 DEVICE SETUP AND CONTROL Before graphics data can be transferred to the Quadro SDI for scan out as serial digital video, the video device must be properly configured for the desired video signal format, data format, timing, color space and genlock or framelock synchronization. This hardware configuration is performed by NVAPI on Microsoft Windows-based systems and the NV-CONTROL X extension on Linux-based systems.
Device Setup and Control 4.2 DETERMINING VIDEO CAPABILITES On Windows, prior to configuring a video device, an application must query the available video I/O topologies and locate a video device with the capability NVVIOCAPS_VIDOUT_SDI. The procedure for doing this is outlined in Code Listing 2. Once a video device with the desired capabilities is found, it is important to save the VIO handle as this is the handle that will be passed to other NVAPI VIO functions for configuring and controlling the device.
Device Setup and Control On Linux, use the XNVCTRLQueryAttribute function to query NV_CTRL_GVO_SUPPORTED to determine if the X screen supports video output. This call will fail if video output is not supported on the current X screen, or if the video output is already in use by the desktop or another application.
Device Setup and Control 4.4 CONFIGURING THE VIDEO DEVICE After opening a video device, the device must be configured for the desired video output mode, format, timing, color space, genlock or frame lock characteristics and any other required video parameters. Code Listing 5 shows a simple example of device configuration for RGBA 4:4:4:4 input and 1080i YCrCbA 4:2:2:4 video output with composite tri-level sync.
Device Setup and Control if (NvAPI_VIO_Status(m_vioHandle, &l_vioStatus) != NVAPI_OK) { return E_FAIL; } // Verify that incoming sync is compatible with outgoing signal if (frameLock) { if (l_vioStatus.vioStatus.outStatus.syncFormat != l_vioConfig.vioConfig.outConfig.signalFormat) { return E_FAIL; } l_vioConfig.vioConfig.outConfig.frameLockEnable = FALSE; l_vioConfig.
Device Setup and Control l_vioSyncDelay.horizontalDelay = hDelay; l_vioSyncDelay.verticalDelay = vDelay; l_vioConfig.fields |= NVVIOCONFIG_SYNCDELAY; l_vioConfig.vioConfig.outConfig.syncDelay = l_gvoSyncDelay; // Setup external sync if (NvAPI_VIO_SetConfig(m_vioHandle, &l_vioConfig) != NVAPI_OK) { return E_FAIL; } On Linux, the video device is configured using XNVCTRLSetAttribute.
Device Setup and Control } Quadro SDI Output &val); PG-03776-001_v06 | 11
5 DATA TRANSFER In programmable mode, the source for video output data is rendered into an 8-bit integer or 16-bit floating point frame buffer object (FBO) or pbuffer render target. For 10bit or 12-bit video output, a 16-bit per-component floating-point render target must be utilized. For 8-bit output, either an 8-bit integer or 16-bit floating-point per-component render target may be used.
Data Transfer Code Listing 7: Selecting the GPU that is connected to the Output Card on Windows while(wglEnumGpusNV(GPUindex,&GPUHandle)) // First call this //function to get a handle to the gpu { //get detailed GPU info while(wglEnumGpuDevicesNV(GPUHandle,DisplayIdx,&gpuDevice)) { NvAPI_GetAssociatedNvidiaDisplayHandle(gpuDevice.
Data Transfer Code Listing 8: Configuring a Frame Buffer Object GLuint fboId; GLuit textureObject; GLuint renderbufferIds[2]; glGenRenderbuffersEXT(numRenderbuffers, renderbufferIds); glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, renderbufferIds[0]); glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGBA8, width, height); if (depth) { glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, renderbufferIds[1]); } glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, width, height); glGenFramebuffersEXT(1, &f
Data Transfer Creation of an FBO is identical on both Windows and Linux, and requires only a current OpenGL context. In the previous code listing example, when a texture object is specified, it is attached as COLOR_ATTACHMENT0, otherwise, a renderbuffer is used. For more information on FBO creation and usage, refer to the GL_EXT_framebuffer_object specification. In order for an application to render into an FBO render target, the target must first be bound using the command in Code Listing 9.
Data Transfer } MessageBox(NULL, "Failed to bind a videoDevice to slot 0.\n", "Error", MB_OK); exit(1); // Free list of available video devices, don't need it anymore. free(videoDevices); 5.3 PBUFFER INITIALIZATION On Windows, the first step in the initialization of the pbuffer is to use the function wglChoosePixelFormatARB() to choose a compatible pixel format.
Data Transfer Code Listing 12: Choosing a 16-bit Floating Point Pixel Format int format = 0; int nformats = 0; int attribList = { WGL_RED_BITS_ARB, 16, WGL_GREEN_BITS_ARB, 16, WGL_BLUE_BITS_ARB, 16, WGL_ALPHA_BITS_ARB, 16, WGL_STENCIL_BITS_ARB, 8, WGL_DEPTH_BITS_ARB, 24, WGL_DRAW_TO_PBUFFER_ARB, true, WGL_BIND_TO_VIDEO_RGBA_NV, true, WGL_FLOAT_COMPONENTS_NV, true, 0} wglChoosePixelFormat(hDC, attribList, 1, &format, &nformats); Once an available pixel format that meets the requirements has been specified,
Data Transfer Code Listing 14: Get Video Devices Available on the System HPVIDEODEV hpDevList; if ((wglGetVideoDeviceNV(hDC, 1, &hpDevList) != GL_NOERROR) { } // Handle error. Once a video device has been identified, bind the application pbuffers using the wglBindVideoImageNV() command. The final argument to this function must be one of WGL_VIDEO_OUT_COLOR_NV, WGL_VIDEO_OUT_ALPHA_NV, WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV or WGL_VIDEO_OUT_COLOR_AND_DEPTH._NV.
Data Transfer int attr; if (glXGetFBConfigAttrib(dpy, configs[i], GLX_RED_SIZE, &attr)) { // Handle error } if (attr != 8) continue; if (glXGetFBConfigAttrib(dpy, configs[i], GLX_GREEN_SIZE, &attr)) { // Handle error } if (attr != 8) continue; if (glXGetFBConfigAttrib(dpy, configs[i], GLX_BLUE_SIZE, &attr)) { // Handle error } if (attr != 8) continue; if (glXGetFBConfigAttrib(dpy, configs[i], GLX_ALPHA_SIZE, &attr)) { // Handle error if (attr != 8) continue; } break; if (i == nelements) { printf("No 8-bi
Data Transfer pbuffer_list[4] = None; pbuffer = glXCreatePbuffer(dpy, config, pbuffer_list); // Create rendering context for GLX_RGBA_TYPE pbuffer.
Data Transfer if (glXGetFBConfigAttrib(dpy, configs[i], GLX_ALPHA_SIZE, &attr)) { // Handle error } if (attr != 16) continue; } break; if (i == nelements) { printf("No 16-bit FBConfigs found\n"); return -1; } // Config found config = configs[i]; // Don't need the config list anymore so free it.
Data Transfer After creating one or more pbuffers using the procedure described in Code Listing 17, each of these pbuffers must be bound to the video device so that subsequent OpenGL rendering into that pbuffer is sent to the video output device. Prior to binding the pbuffer however, it is necessary to identify the video devices available using the glXGetVideoDeviceNV() function from the GLX_NV_video_out extension.
Data Transfer 5.4 STARTING VIDEO TRANSFERS Once a video device has been configured, and the OpenGL pbuffer(s) required for data transfer have been allocated and bound to the device, the next step is to commence video transfers. This step is only required on Windows. The code to do this is listed in Code Listing 20.
Data Transfer Frame presentation is always queued until the vertical blanking period of the SDI device. At that time, the SDI device will display the: Last presented frame if there are no additional frames queued to present. Next frame in the queue with the minimum presentation time of 0. The last frame in the queue that has a minimum presentation time past the current time. Queued frames are always consumed in the order in which they were sent. Any consumed frames not displayed are discarded.
Data Transfer glPresentFrameDualFillNV() should be utilized to display two channels of singlelink fill data. This operating mode is useful for presenting two completely different fill channels or two fill channels in stereo, where one eye is presented on one channel while the other eye is presented on the other SDI channel. glPresentFrameDualFillNV() operates similarly to PresentFrameKeyedNV() described above.
Data Transfer Code Listing 22: Sending Two Video Fill Channels glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo1Id); drawPattern1(); glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo2Id); drawPattern2(); glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); glPresentFrameDualFillNV(1, 0, 0, 0, GL_FRAME_NV, GL_RENDERBUFFER_EXT, renderbuffer1Id, GL_NONE, 0, GL_RENDERBUFFER_EXT, renderbuffer2Id, GL_NONE,0); 5.
Data Transfer Table 5-2. Pbuffer Size = Frame iBufferType Pbuffer Size = Frame WGL_VIDEO_OUT_FIELD_1 Even lines to Field 0 WGL_VIDEO_OUT_FIELD_2 Odd lines to Field 1 WGL_VIDEO_OUT_FRAME Full frame WGL_VIDEO_OUT_STACKED_FIELDS_1_2 Upper half to Field 2 Bottom half to Field 1 WGL_VIDEO_OUT_STACKED_FIELDS_2_1 Upper half to Field 1 Bottom half to Field 2 The parameter pulCounterPbuffer returns the count of the pbuffer sent.
Data Transfer Code Listing 24: Sending a Frame of Data to the Linux Video Device glXSendPbufferToVideoNV(dpy, pbuffer, GLX_VIDEO_OUT_FRAME_NV, &gBufCount, GL_FALSE); 5.7 STOPPING VIDEO TRANSFERS AND CLOSING THE VIDEO DEVICE On Windows, once an application has completed all video transfers and no longer needs access to a video device, an application should stop sending and release any OpenGL resources prior to closing the device with NVAPI.
Data Transfer Code Listing 27: Releasing Bound OpenGL Resources on Linux glXReleaseVideoImageNV(dpy, pbuffer); glXReleaseVideoDeviceNV(dpy, 0, video_device); glXDestroyPbuffer(dpy, pbuffer); Quadro SDI Output PG-03776-001_v06 | 29
6 ANCILLARY DATA Ancillary data can be sent to the Quadro SDI device by using the NVIDIA SDI Ancillary Data API. This API is defined in ANCapi.h in the SDK include directory. Applications designed for the Microsoft Windows operating system must statically link against ANCapi.lib. to utilize the ancillary data API. Linux application must link with libanc.a. The library files can be found in the appropriate lib folder in the SDK.
Ancillary Data 6.2 BASICS Ancillary data is sent do the Quadro SDI device per frame by filling in the corresponding fields in the following structure and setting the fields mask to indicate those fields with valid data to be sent.
Ancillary Data 6.3 TIME CODE The following code example shows how an application can send VITC time code as defined by SMPTE 12M-1999 to the SDI device. The time code data as well as relevant bit flags are packed into the 32-bit VITCTimecode field as documented and demonstrated in the following code example. Code Listing 31: Specifying Time Code Data NVVIOANCDATAFRAME ancData = {0}; static int counter = 0; // Set field mask ancData.version = NVVIOANCDATAFRAME_VERSION; ancData.
Ancillary Data // // // // // // // // // // // // 0 // // // // // // // 1 // 12 13 14 15 16 17 18 19 20 21 22 23 Second Second Second Flag Minute Minute Minute Minute Minute Minute Minute Flag 24 25 26 27 28 29 30 Hours Hours Hours Hours Hours Hours Flag 31 Flag Tens Tens Tens Units Units Units Units Tens Tens Tens Units Units Units Units Tens Tens (1) (2) (4) (1) (2) (4) (8) (1) (2) (4) (1) (2) (4) (8) (1) (2) Field/Phase Binary Group 0 Phase Binary Group 0 Binary Group 2 Binary Group Binary
Ancillary Data 6.4.1 SMPTE 272M – Standard Definition Audio In the case of standard definition audio data, SMPTE 272M places up to 20-bits of audio data along with the block sync (Z), validity (V), user (U), channel (C), and parity (P) bits into a 32-bit AES subframe. The API requires that the 20-bit audio data and associated bits also be packed into 32-bits as illustrated Code Listing 32.
Ancillary Data sample = ((C & 0x1) << 25) | ((U & 0x1) << 24) | ((V & 0x1) << 23) | ((((NvU32)(*input)) // Add Z / block sync if (curFrame == 0) { sample |= (0x1 << } 0); // AES channel status (C) bit // AES user data (U) bit // AES sample validity (V) bit & 0xffff) << 7); // AES sample data // AES block sync (Z bit) The channel numbers are added and the 26-bit even parity are computed by the Quadro SDI output device prior to embedding the audio data into the Quadro SDI output stream. 6.4.
Ancillary Data // UDWx+2: // b9 // b8 // b7 (b23) // b6 (b22) // b5 (b21) // b4 (b20) // b3 (b19) // b2 (b18) // b1 (b17) // b0 (b16) // // UDWx+3: // b9 // b8 // b7 (b31) // b6 (b30) // b5 (b29) // b4 (b28) // b3 (b27) // b2 (b26) // b1 (b25) // b0 (b24) // ^ // `// - !b8 (Computed by HW) Even parity of b0-b7 (Computed by HW) aud 19 aud 18 aud 17 aud 16 aud 15 aud 14 aud 13 aud 12 - !b8 (Computed by HW) Even parity of b0-b7 (Computed by HW) P - Parity for bits 0-30 of sample C - Channel status bit.
Ancillary Data 6.4.3 Determining the Number of Audio Samples per Frame It is the responsibility of the application to send the required number of audio samples per frame. Sending an insufficient number of samples will result in breaks in the audio stream. To determine the number of required audio samples per frame for a given video signal format and the length of the audio frame sequence, an application should use NvVIOANCAPI_NumAudioSamples as demonstrated in the following code sample.
Ancillary Data Note: When inserting audio data into the NVVIOANCDATAFRAME structure for each frame in an audio frame sequence it is important to set the correct frame sequence number and only insert the number of audio samples required for the current frame. Not setting the correct frame sequence number or sending the improper number of samples for the current frame will result in audio dropouts. Code Listing 35: Specifying Audio Data static int frameSequenceNum = 0; // Audio Channels 1-4 m_AncData.
Ancillary Data m_AncData.AudioGroup2.audioCntrl.frameNumber3_4 = frameSequenceNum + 1; m_AncData.AudioGroup2.audioCntrl.rate = NVVIOANCAUDIO_SAMPLING_RATE_48_0; // Assign data buffers from ring buffer m_AncData.AudioGroup2.numAudioSamples = m_pRingBuffer->NumValidSamples(0); m_AncData.AudioGroup2.audioData[0] = m_pRingBuffer->GetBuffer(0); m_AncData.AudioGroup2.audioData[1] = m_pRingBuffer->GetBuffer(1); m_AncData.AudioGroup2.audioData[2] = m_pRingBuffer->GetBuffer(0); m_AncData.AudioGroup2.
Ancillary Data m_pRingBuffer->NumValidSamples(0); m_AncData.AudioGroup4.audioData[0] = m_pRingBuffer->GetBuffer(0); m_AncData.AudioGroup4.audioData[1] = m_pRingBuffer->GetBuffer(1); m_AncData.AudioGroup4.audioData[2] = m_pRingBuffer->GetBuffer(0); m_AncData.AudioGroup4.audioData[3] = m_pRingBuffer->GetBuffer(1); // Increment frame sequence number. // When sequence length reached, reset. frameSequenceNum++; if (frameSequenceNum == m_uiSequenceLength) frameSequenceNum = 0; 6.
Ancillary Data 6.6 CLEAN UP When the video signal format changes, an application must release and then reinitialize the ancillary data API. This is necessary in order for the state to be set properly for the new video signal format. The API is release by calling NvVIOANCAPI_ReleaseGVO().
7 VIDEO COMPOSITING The Quadro SDI supports programmable 2D compositing. This operating mode combines the image data from the incoming video stream with the GPU-rendered image based upon the values in a third image known as a matte or key channel. The Quadro SDI supports the following compositing methods. Note: 2D compositing is any supported when the signal format of the incoming video matches the outgoing signal format and the outgoing SDI video signal is genlocked to the input signal.
Video Compositing In configuration of the SDI device, alpha compositing is enabled as follows: l_vioConfig.fields = 0; l_vioConfig.fields = NVVIOCONFIG_COMPOSITE; l_vioConfig.vioConfig.outConfig.enableComposite = TRUE; l_vioConfig.fields = NVVIOCONFIG_ALPHAKEYCOMPOSITE; l_vioConfig.vioConfig.outConfig.enableAlphaKeyComposite |= TRUE; if (NvAPI_VIO_SetConfig(m_vioHandle, &l_vioConfig)!= NVAPI_OK) { return E_FAIL; } OpenGL must be configured to provide an alpha channel to the SDI device.
Video Compositing l_vioConfig.vioConfig.outConfig.compRange.uMin = crCompRange[2]; l_vioConfig.vioConfig.outConfig.compRange.uMax = crCompRange[3]; if (NvAPI_VIO_SetConfig(m_vioHandle, &l_vioConfig)!= NVAPI_OK) { return E_FAIL; } // Cb composite ranges l_vioConfig.fields = 0; // reset fields l_vioConfig.fields = NVVIOCONFIG_COMPOSITE | NVVIOCONFIG_COMPOSITE_CB; l_vioConfig.vioConfig.outConfig.enableComposite = TRUE; l_vioConfig.vioConfig.outConfig.compRange.uEnabled = TRUE; l_vioConfig.vioConfig.outConfig.
Video Compositing 7.3 LUMA-KEYING For luma keying, the application specifies up to two pairs of luma (Y) values via the API. These values represent the starting and ending luma values for replacement. Luma keying is enabled with the range specified as follows. // Y composite ranges l_vioConfig.fields = 0; // reset fields l_vioConfig.fields = NVVIOCONFIG_COMPOSITE | NVVIOCONFIG_COMPOSITE_Y; l_vioConfig.vioConfig.outConfig.enableComposite = TRUE; l_vioConfig.vioConfig.outConfig.compRange.
8 CHANGING THE VIDEO DEVICE CONFIGURATION Changes to the SDI video device configuration can be made using NvAPI_VIO_SetConfig() and XNVCTRLSetAttribute() as outlined in the section entitled Configuring the Video Device. Some configuration parameters may be changed during video transfers while for other changes, video output must first be stopped with OpenGL resources released before the new configuration parameters can take affect.
9 DEVICE FEEDBACK The WGL_NV_video_out/GLX_NV_video_out as well as the GL_NV_present_video extensions provides device feedback. This functionality provides the following information to the calling application. Number of buffers queued for SDI scanout. Vertical retrace interval count. Time at which a frame was scanned out. Number of vertical retrace intervals during which the same frame was scanned out.
Device Feedback 9.1.1 Using the GLX/WGL_video_out Extension Applications that utilize the wglSendPbufferToVideoNV() or glXSendPbufferToVideoNV()functions within the WGL_video_out or GLX_video_out extensions should set the bBlock argument to GL_FALSE in order to queue buffers, otherwise if blocking is specified, the number queued buffers will always be 1.
Device Feedback 9.1.2 Using the GL_present_video Extension In the case of applications that utilize glPresentFrameKeyedNV() or glPresentFrameDualFillNV() provided by the GL_NV_present_video extension, the number of queued buffers can be determined by subtracting the time at which the buffer was sent from the time at which the buffer was presented or scanned out and then divide this value by the presentation interval.
Device Feedback Code Listing 38: Determining Number of Buffers Queued static int cur_query = 0; static bool queryTime = GL_FALSE; GLuint64EXT presentTime; static GLuint64EXT lastPresentTime = 0; GLuint durationTime; static GLuint64EXT sendTime[NUM_QUERIES]; GLuint presentTimeID = gPresentID[cur_query]; GLuint presentDurationID = gDurationID[cur_query]; cur_query++; // // // if Query video present time and duration.
Device Feedback 9.2 DETECTING DUPLICATE FRAMES A duplicate frame will occur on the SDI output when a new frame is not ready in the queue at the time of the vertical retrace. This will happen when an application’s draw time exceeds the time period between subsequent vertical retrace events on the outgoing SDI video signal. When a new frame is not sent prior to the next vertical retrace, one of two possible scenarios takes place.
Device Feedback l_bField1 = l_bField1 ? 0 : 1; l_bBlock = options.block; //l_bField1 ? FALSE : TRUE; l_iVsyncDiff = 1; } } else { l_iBufType = WGL_VIDEO_OUT_FRAME; l_iVsyncDiff = 2; l_bBlock = options.
10 ADVANCED TOPICS This chapter outlines the use of some advanced features of the Quadro SDI. 10.1 WORKING WITH TWO VIDEO CHANNELS The Quadro SDI, in addition to operating in a dual-link configuration, can also be programmed to output the same video signal or two different video signals on the two video output jacks. 10.1.1 Dual-Link Operation The SMPTE standard defines dual-link video data formats.
Advanced Topics Code Listing 40: Configuring the SDI Device to Output Two Independent Video Channels l_gvoConfig.dataFormat= NVGVODATAFORMAT_DUAL_R8G8B8_TO_DUAL_YCRCB422; Once configured, an application must utilize separate render targets for each video channel. The application draw loop would then bind and update each render target in turn prior to utilizing glPresentFrameDualFillNV()to send the rendered data to the SDI device as demonstrated in Code Listing 41.
Advanced Topics Code Listing 42: Configuring Desktop Video Output // Open the SDI device for desktop output if (NvAPI_VIO_Open(hVIO, NVVIOCLASS_SDI, NVVIOOWNERTYPE_DESKTOP) != NVAPI_OK) { return E_FAIL; } // Configure video output parameters NVVIOCONFIG l_vioConfig; memset(&l_vioConfig, 0, sizeof(l_vioConfig)); l_vioConfig.version = NVVIOCONFIG_VER; l_vioConfig.fields = NVVIOCONFIG_SIGNALFORMAT | NVVIOCONFIG_DATAFORMAT | NVVIOCONFIG_OUTPUTREGION; // Video output signal format l_vioConfig.vioConfig.
Advanced Topics The Quadro SDI processes the input values at 12-bit precision. In the case of 8-bit input data, the data is shifted up by 4 bits and the top 4 MSB bits are copied to the least 4 LSB bits. For 16-bit per-component input data, only the upper 12 bits are processed. The RGB data values come from the GPU output. The coefficient, offset and scale values are determined as described in the following sections. 10.3.
Advanced Topics In the 8-bit case, Y ranges from 16 – 235 while CrCb ranges from 16 – 240. The default scale values for Video Range are then similar: scaley = (235 – 16) / 256 = 0.85547 scalecr = (240 – 16) / 256 = 0.875 scalecb = (240 – 16) / 256 = 0.875 To perform color space conversion into what is frequently referred to as Film Range or Full Range a custom color space conversion must be specified via the API. In the case of 10-bit full range, Y and CrCb ranges [4,1019].
Advanced Topics Code Listing 43: Specifying a Custom Color Space Conversion on Windows . . . // Colorspace Conversion if (gbCSC) { l_vioConfig.fields |= NVVIOCONFIG_CSCOVERRIDE; l_vioConfig.vioConfig.outConfig.cscOverride = TRUE; l_vioConfig.fields |= NVVIOCONFIG_COLORCONVERSION; l_vioConfig.vioConfig.outConfig.colorConversion.version = NVVIOCOLORCONVERSION_VER; l_vioConfig.vioConfig.outConfig.colorConversion.colorOffset[0] = 0.0625; l_vioConfig.vioConfig.outConfig.colorConversion.colorOffset[1] = 0.
Advanced Topics = = = = = l_vioConfig.vioConfig.outConfig.colorConversion.colorMatrix[1][1] -0.4542f; l_vioConfig.vioConfig.outConfig.colorConversion.colorMatrix[1][2] -0.0455f; l_vioConfig.vioConfig.outConfig.colorConversion.colorMatrix[2][0] -0.1146f; l_vioConfig.vioConfig.outConfig.colorConversion.colorMatrix[2][1] -0.3850f; l_vioConfig.vioConfig.outConfig.colorConversion.colorMatrix[2][2] 0.5000f; break; // ITU 601 case VIDEO_FORMAT_487I: case VIDEO_FORMAT_576I: = = = = = = = l_vioConfig.
Advanced Topics = = l_vioConfig.vioConfig.outConfig.colorConversion.colorMatrix[2][1] -0.3310f; l_vioConfig.vioConfig.outConfig.colorConversion.colorMatrix[2][2] 0.5000f; } break; // switch } else { l_vioConfig.fields |= NVGVOCONFIG_CSCOVERRIDE; l_vioConfig.vioConfig.outConfig.cscOverride = FALSE; } // if . . .
Advanced Topics colorMat[0][2] colorMat[1][0] colorMat[1][1] colorMat[1][2] colorMat[2][0] colorMat[2][1] colorMat[2][2] break; } // switch = = = = = = = 0.0725f; 0.5000f; -0.4542f; -0.0455f; -0.1146f; -0.3350f; 0.5000f; colorOffset[0] = 0.0625; colorOffset[1] = 0.5; colorOffset[2] = 0.5; colorScale[0] = 0.0625; colorScale[1] = 0.875; colorScale[2] = 0.
Advanced Topics Scale (8-bit) Y = (235-16) / 256 = 0.85546875 Cb = (240-16) / 256 = 0.875 Cr = (240-16) / 256 = 0.875 Scale (10-bit) Y = (940-64) / 1024 = 0.85546875 Cb = (960-64) / 1024 = 0.875 Cr = (260-64) / 1024 = 0.875 RGB[0,255] from ITU-R BT.601 Y’CrCb[0,255] = RGB[0,255] from ITU-R BT.601 Y’CrCb[0,247] = Offset (8-bit) Y = 4/251 = 0.015936 Cb = (251+4)/2 / (255) = 0.5 Cr = (251+4)/2 / (255) = 0.5 Offset(10-bit) Y = 4/1019 = 0.0039254 Cb = (1019+4)/2 / (1023) = 0.5 Cr = (1019+4)/2 / (1023) = 0.
Advanced Topics Scale (8-bit) Y = (235-16) / 256 = 0.85546875 Cb = (240-16) / 256 = 0.875 Cr = (240-16) / 256 = 0.875 Scale (10-bit) Y = (940-64) / 1024 = 0.85546875 Cb = (960-64) / 1024 = 0.875 Cr = (260-64) / 1024 = 0.875 RGB[0,255] from ITU-R BT.709 [0,255] = RGB[0,255] from ITU-R BT.709 [0,247] = Offset (8-bit) Y = 4/251 = 0.015936 Cb = (251+4)/2 / (255) = 0.5 Cr = (251+4)/2 / (255) = 0.5 Offset(10-bit) Y = 4/1019 = 0.0039254 Cb = (1019+4)/2 / (1023) = 0.5 Cr = (1019+4)/2 / (1023) = 0.
Advanced Topics Code Listing 45: Requesting a Multi-Sampled Pixel Format During Pbuffer Creation // Request multisampled pixel format. int attribList = { WGL_RED_BITS_ARB, 8, WGL_GREEN_BITS_ARB, 8, WGL_BLUE_BITS_ARB, 8, WGL_ALPHA_BITS_ARB, 8, WGL_STENCIL_BITS_ARB, 8, WGL_DEPTH_BITS_ARB, 24, WGL_SAMPLE_BUFFERS_ARB, GL_TRUE, WGL_SAMPLES_ARB, num_samples, WGL_DRAW_TO_PBUFFER_ARB, true, WGL_BIND_TO_VIDEO_RGBA_NV, true, 0 }; wglChoosePixelFormat(hWindowDC, attribList, NULL, 1, &format, &nformats); . . .
Advanced Topics 10.4.2 Multi-Sampling with Buffer Objects An application that wishes to use multisampling with buffer objects will utilize the capabilities enabled by the GL_EXT_framebuffer_multisample OpenGL extension. Unlike in the case of pbuffers, the application must perform the down sample bit and filter operation prior to sending the buffer objects to the SDI device. The first step is to create an additional multi-sampled buffer object during OpenGL initialization.
Advanced Topics gFBO); glBlitFramebufferEXT(0, 0, gWidth, gHeight, 0, 0, gWidth, gHeight, GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT, GL_NEAREST); glDisable(GL_MULTISAMPLE); // Unbind FBOs glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, 0); glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0); } // Present final frame to the video device . . . 10.
Advanced Topics Table 10-3. Video Memory Required by an Application Framebuffer Width: Color : 1920 Height: 1080 1920 x 1080 x 4 x 2 / 1024 / 1024 = 15.82 MB 1920 x 1080 x 4 / 1024 / 1024 = 7.91 MB 1920 x 1080 x 2 x 2 / 1024 / 1024= 7.91 MB (32-bit RGBA, double buffered) Depth : (32-bit with packed stencil) Overlay : (16-bit front + back) 31.64 MB Total: Pbuffer Width: Color: 1920 Height: 1080 Samples Per Pixel: 4 1920 x 1080 x 4 x 4 x 2 / 1024 / 1024 = 63.
Advanced Topics 10.7 DATA INTEGRITY CHECK The Quadro SDI provides the capability to test the integrity of the data cable between the graphics card and the SDI daughter board. When this mode is enabled, the SDI daughter card compares the color value of each pixel on a line to the color of the first pixel on that line and returns a count of the number of mismatched pixels.
Advanced Topics // Cleanup OpenGL state cleanupGL; } // Release video device. cleanupVideo(); The data integrity check mode is a hardware state enabled and disabled by calling NvGvoConfigSet() much the same way as other video control parameters are set by an application. Examples of functions that demonstrate the enabling and disabling of the data integrity check are shown in Code Listing 49.
Advanced Topics FALSE; // Set configuration if (NvAPI_VIO_SetConfig(g_hVIO, &l_vioConfig)!= NVAPI_OK) { return E_FAIL; } } return S_OK; 10.8 COMPOSITE SYNC TERMINATION The Quadro SDI also provides the capability to enable and disable termination of the composite sync signal by calling NvGvoConfigSet() the same way that other video control parameters are set within an application. Examples of functions that demonstrate the enabling and disabling of composite sync termination are shown in Code Listing 50.
Advanced Topics disableSyncTermination(GLvoid) { NVVIOCONFIG l_vioConfig; memset(&l_vioConfig, 0, sizeof(l_vioConfig)); l_vioConfig.version = NVVIOCONFIG_VER; l_vioConfig.fields = 0; l_vioConfig.fields = NVVIOCONFIG_COMPOSITETERMINATE; l_vioConfig.vioConfig.outConfig.compositeTerminate = FALSE; // Set configuration if (NvAPI_VIO_SetConfig(hVIO, &l_vioConfig)!= NVAPI_OK) { return E_FAIL; } } return S_OK; 10.
Advanced Topics } return E_FAIL; } return S_OK; At the time that the video output device is configured and prior to calling either wglBindVideoImageNV() or glXBindVideoImageNV(),this number of internal buffers can be specified by an application using NvAPI_VIO_SetConfig(). The number of internal buffers specified must be between two and seven.
11 NV_PRESENT_VIDEO /* NV_present_video */ #define GL_FRAME_NV #define GL_FIELDS_NV #define GL_CURRENT_TIME_NV #define GL_NUM_FILL_STREAMS_NV #define GL_PRESENT_TIME_NV #define GL_PRESENT_DURATION_NV 0x8E26 0x8E27 0x8E28 0x8E29 0x8E2A 0x8E2B #ifndef GL_NV_present_video #define GL_NV_present_video 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void GLAPIENTRY glPresentFrameKeyedNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint f
NV_Present_video GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3); typedef void (GLAPIENTRYP PFNGLGETVIDEOIVNVPROC) (GLuint video_slot, GLenum pname, GLint *params); typedef void (GLAPIENTRYP PFNGLGETVIDEOUIVNVPROC) (GLuint video_slot, GLenum pname, GLuint *params); typedef void (GLAPIENTRYP PFNGLGETVIDEOI64VNVPROC) (GLuint video_slot, GLenum pname, GLint64EXT *params); typedef void (GLAPIENTRYP PF
12 NVAPI VIO typedef NvU32 NVVIOOWNERID; // Unique identifier for VIO owner (process identifier or NVVIOOWNERID_NONE) #define NVVIOOWNERID_NONE 0 // Unregistered ownerId typedef enum _NVVIOOWNERTYPE // Owner type for device { NVVIOOWNERTYPE_NONE, // No owner for device NVVIOOWNERTYPE_APPLICATION, // Application owns device NVVIOOWNERTYPE_DESKTOP, // Desktop transparent mode owns device (not applicable for video input) }NVVIOOWNERTYPE; // Access rights for NvAPI_VIO_Open() #define NVVIO_O_READ 0x00000000 //
NVAPI VIO //--------------------------------------------------------------------// Enumerations //--------------------------------------------------------------------// Video signal format and resolution typedef enum _NVVIOSIGNALFORMAT { NVVIOSIGNALFORMAT_NONE, Invalid signal format NVVIOSIGNALFORMAT_487I_59_94_SMPTE259_NTSC, 59.94Hz (SMPTE259) NTSC NVVIOSIGNALFORMAT_576I_50_00_SMPTE259_PAL, 50.00Hz (SMPTE259) PAL NVVIOSIGNALFORMAT_1035I_59_94_SMPTE260, 59.
NVAPI VIO NVVIOSIGNALFORMAT_720P_23_98_SMPTE296, 23.98Hz (SMPTE296) NVVIOSIGNALFORMAT_2048P_30_00_SMPTE372, 30.00Hz (SMPTE372) NVVIOSIGNALFORMAT_2048P_29_97_SMPTE372, 29.97Hz (SMPTE372) NVVIOSIGNALFORMAT_2048I_60_00_SMPTE372, 60.00Hz (SMPTE372) NVVIOSIGNALFORMAT_2048I_59_94_SMPTE372, 59.94Hz (SMPTE372) NVVIOSIGNALFORMAT_2048P_25_00_SMPTE372, 25.00Hz (SMPTE372) NVVIOSIGNALFORMAT_2048I_50_00_SMPTE372, 50.00Hz (SMPTE372) NVVIOSIGNALFORMAT_2048P_24_00_SMPTE372, 24.
NVAPI VIO NVVIOSIGNALFORMAT_1080P_30_00_SMPTE274_3G_LEVEL_B, 30.00Hz (SMPTE274) 3G Level B NVVIOSIGNALFORMAT_2048P_30_00_SMPTE372_3G_LEVEL_B, 30.00Hz (SMPTE372) 3G Level B NVVIOSIGNALFORMAT_1080P_25_00_SMPTE274_3G_LEVEL_B, 25.00Hz (SMPTE274) 3G Level B NVVIOSIGNALFORMAT_2048P_25_00_SMPTE372_3G_LEVEL_B, 25.00Hz (SMPTE372) 3G Level B NVVIOSIGNALFORMAT_1080P_24_00_SMPTE274_3G_LEVEL_B, 24.00Hz (SMPTE274) 3G Level B NVVIOSIGNALFORMAT_2048P_24_00_SMPTE372_3G_LEVEL_B, 24.
NVAPI VIO }NVVIOVIDEOTYPE; // Interlace mode typedef enum _NVVIOINTERLACEMODE { NVVIOINTERLACEMODE_PROGRESSIVE, // Progressive (p) NVVIOINTERLACEMODE_INTERLACE, // Interlace (i) NVVIOINTERLACEMODE_PSF, // Progressive Segment Frame (psf) }NVVIOINTERLACEMODE; // Video data format typedef enum _NVVIODATAFORMAT { NVVIODATAFORMAT_UNKNOWN = -1, // Invalid DataFormat NVVIODATAFORMAT_R8G8B8_TO_YCRCB444, // R8:G8:B8 => YCrCb (4:4:4) NVVIODATAFORMAT_R8G8B8A8_TO_YCRCBA4444, // R8:G8:B8:A8 => YCrCbA (4:4:4:4) NVVIODAT
NVAPI VIO NVVIODATAFORMAT_Y8CR8CB8_TO_YCRCB422, => YCrCb (4:2:2) NVVIODATAFORMAT_Y10CR8CB8A10_TO_YCRCBA4224, => YCrCbA (4:2:2:4) NVVIODATAFORMAT_R10G10B10_TO_RGB444, => RGB (4:4:4) NVVIODATAFORMAT_R12G12B12_TO_RGB444, => RGB (4:4:4) }NVVIODATAFORMAT; // Video output area typedef enum _NVVIOOUTPUTAREA { NVVIOOUTPUTAREA_FULLSIZE, resolution (full size) NVVIOOUTPUTAREA_SAFEACTION, resolution (safe action) NVVIOOUTPUTAREA_SAFETITLE, resolution (safe title) }NVVIOOUTPUTAREA; // Synchronization source typedef en
NVAPI VIO NVVIOSYNCSTATUS_SDI_SD, NVVIOSYNCSTATUS_SDI_HD, }NVVIOSYNCSTATUS; // SDI sync (standard-definition) // SDI sync (high-definition) //Video Capture Status typedef enum _NVVIOCAPTURESTATUS { NVVIOSTATUS_STOPPED, // Sync not detected NVVIOSTATUS_RUNNING, // Error detected NVVIOSTATUS_ERROR, // Genlock in use, format mismatch with output }NVVIOCAPTURESTATUS; //Video Capture Status typedef enum _NVVIOSTATUSTYPE { NVVIOSTATUSTYPE_IN, NVVIOSTATUSTYPE_OUT, }NVVIOSTATUSTYPE; // Input Status // Output St
NVAPI VIO }NVVIOCONFIGTYPE; typedef enum _NVVIOCOLORSPACE { NVVIOCOLORSPACE_UNKNOWN, NVVIOCOLORSPACE_YCBCR, NVVIOCOLORSPACE_YCBCRA, NVVIOCOLORSPACE_YCBCRD, NVVIOCOLORSPACE_GBR, NVVIOCOLORSPACE_GBRA, NVVIOCOLORSPACE_GBRD, } NVVIOCOLORSPACE; // Component sampling typedef enum _NVVIOCOMPONENTSAMPLING { NVVIOCOMPONENTSAMPLING_UNKNOWN, NVVIOCOMPONENTSAMPLING_4444, NVVIOCOMPONENTSAMPLING_4224, NVVIOCOMPONENTSAMPLING_444, NVVIOCOMPONENTSAMPLING_422 } NVVIOCOMPONENTSAMPLING; typedef enum _NVVIOBITSPERCOMPONENT { N
NVAPI VIO #define NVVIOCAPS_SYNCSRC_COMP Composite synchronization input #define NVVIOCAPS_OUTPUTMODE_DESKTOP Desktop transparent mode #define NVVIOCAPS_OUTPUTMODE_OPENGL OpenGL application mode #define NVVIOCAPS_VIDIN_SDI Serial Digital Interface (SDI) input 0x00002000 // Supports 0x00010000 // Supports 0x00020000 // Supports 0x00100000 // Supports #define NVVIOCLASS_SDI 0x00000001 class interface: SDI output with two genlock inputs // SDI- // Device capabilities typedef struct _NVVIOCAPS { NvU
NVAPI VIO NVVIOLINKID } NVVIOCHANNELSTATUS; linkID; // Link ID // Input device status typedef struct _NVVIOINPUTSTATUS { NVVIOCHANNELSTATUS vidIn[NVAPI_MAX_VIO_JACKS][NVAPI_MAX_VIO_CHANNELS_PER_JACK]; // Video input status per channel within a jack NVVIOCAPTURESTATUS captureStatus; // status of video capture } NVVIOINPUTSTATUS; // Output device status typedef struct _NVVIOOUTPUTSTATUS { NVVIOINPUTOUTPUTSTATUS vid1Out; NVVIOINPUTOUTPUTSTATUS vid2Out; NVVIOSYNCSTATUS sdiSyncIn; NVVIOSYNCSTATUS compSyncIn;
NVAPI VIO typedef struct _NVVIOOUTPUTREGION { NvU32 x; NvU32 y; NvU32 width; NvU32 height; } NVVIOOUTPUTREGION; // // // // Horizontal origin in pixels Vertical origin in pixels Width of region in pixels Height of region in pixels // Gamma ramp (8-bit index) typedef struct _NVVIOGAMMARAMP8 { NvU16 uRed[256]; // Red channel gamma ramp (8-bit index, 16-bit values) NvU16 uGreen[256]; // Green channel gamma ramp (8-bit index, 16bit values) NvU16 uBlue[256]; // Blue channel gamma ramp (8-bit index, 16-bit va
NVAPI VIO // Signal format details typedef struct _NVVIOSIGNALFORMATDETAIL { NVVIOSIGNALFORMAT signalFormat; // Signal format enumerated value NVVIOVIDEOMODE videoMode; // Video mode for signal format }NVVIOSIGNALFORMATDETAIL; // Buffer formats #define NVVIOBUFFERFORMAT_R8G8B8 R8:G8:B8 #define NVVIOBUFFERFORMAT_R8G8B8Z24 R8:G8:B8:Z24 #define NVVIOBUFFERFORMAT_R8G8B8A8 R8:G8:B8:A8 #define NVVIOBUFFERFORMAT_R8G8B8A8Z24 R8:G8:B8:A8:Z24 #define NVVIOBUFFERFORMAT_R16FPG16FPB16FP R16FP:G16FP:B16FP #define NVVIOB
NVAPI VIO #define NVVIOCOLORCONVERSION_VER MAKE_NVAPI_VERSION(NVVIOCOLORCONVERSION,1) // Gamma correction typedef struct _NVVIOGAMMACORRECTION { NvU32 version; // Structure version NvU32 vioGammaCorrectionType; // Gamma correction type (8-bit or 10-bit) union // Gamma correction: { NVVIOGAMMARAMP8 gammaRamp8; // Gamma ramp (8-bit index, 16bit values) NVVIOGAMMARAMP10 gammaRamp10; // Gamma ramp (10-bit index, 16-bit values) }gammaRamp; float fGammaValueR; // Red Gamma value within gamma ranges. 0.5 - 6.
NVAPI VIO #define NVVIOCONFIG_GAMMACORRECTION 0x00000020 // fields: gammaCorrection #define NVVIOCONFIG_SYNCSOURCEENABLE 0x00000040 // fields: syncSource and syncEnable #define NVVIOCONFIG_SYNCDELAY 0x00000080 // fields: syncDelay #define NVVIOCONFIG_COMPOSITESYNCTYPE 0x00000100 // fields: compositeSyncType #define NVVIOCONFIG_FRAMELOCKENABLE 0x00000200 // fields: EnableFramelock #define NVVIOCONFIG_422FILTER 0x00000400 // fields: bEnable422Filter #define NVVIOCONFIG_COMPOSITETERMINATE 0x00000800 // fields
NVAPI VIO | \ #define NVVIOCONFIG_VALIDFIELDS \ \ \ \ \ \ \ \ \ \ | \ \ \ \ \ \ \ \ \ Quadro SDI Output NVVIOCONFIG_COMPOSITETERMINATE | \ NVVIOCONFIG_DATAINTEGRITYCHECK | \ NVVIOCONFIG_CSCOVERRIDE | \ NVVIOCONFIG_FLIPQUEUELENGTH | \ NVVIOCONFIG_ANCTIMECODEGENERATION | \ NVVIOCONFIG_COMPOSITE | \ NVVIOCONFIG_ALPHAKEYCOMPOSITE | \ NVVIOCONFIG_COMPOSITE_Y | \ NVVIOCONFIG_COMPOSITE_CR | \ NVVIOCONFIG_COMPOSITE_CB | \ NVVIOCONFIG_FULL_COLOR_RANGE | \ NVVIOCONFIG_RGB_DATA | \ NVVIOCONFIG_RESERVED_SDIOUTPUTENA
NVAPI VIO \ \ \ \ \ | \ NVVIOCONFIG_COMPOSITE_Y | NVVIOCONFIG_COMPOSITE_CR | NVVIOCONFIG_COMPOSITE_CB | NVVIOCONFIG_FULL_COLOR_RANGE | NVVIOCONFIG_RGB_DATA | NVVIOCONFIG_RESERVED_SDIOUTPUTENABLE NVVIOCONFIG_STREAMS) #define NVVIOCONFIG_DRIVERFIELDS ( NVVIOCONFIG_OUTPUTREGION \ NVVIOCONFIG_OUTPUTAREA \ NVVIOCONFIG_COLORCONVERSION \ NVVIOCONFIG_FLIPQUEUELENGTH) #define NVVIOCONFIG_GAMMAFIELDS ( NVVIOCONFIG_GAMMACORRECTION #define NVVIOCONFIG_RMCTRLFIELDS ( NVVIOCONFIG_SIGNALFORMAT \ NVVIOCONFIG
NVAPI VIO NVVIOCONFIG_SYNCDELAY | \ NVVIOCONFIG_CSCOVERRIDE | \ NVVIOCONFIG_ANCTIMECODEGENERATION | \ | \ NVVIOCONFIG_ALPHAKEYCOMPOSITE | \ | \ | \ NVVIOCONFIG_COMPOSITE NVVIOCONFIG_COMPOSITE_Y NVVIOCONFIG_COMPOSITE_CR NVVIOCONFIG_COMPOSITE_CB) #define NVVIOCONFIG_RMMODESET_FIELDS ( NVVIOCONFIG_SIGNALFORMAT | \ NVVIOCONFIG_DATAFORMAT | \ NVVIOCONFIG_SYNCSOURCEENABLE | \ NVVIOCONFIG_FRAMELOCKENABLE | \ NVVIOCONFIG_COMPOSITESYNCTYPE ) // Output device configuration // No members can be deleted from
NVAPI VIO NvU32 compositeTerminate; // Composite termination NvU32 enableDataIntegrityCheck; // Enable data integrity check: true - enable, false - disable NvU32 cscOverride; // Use provided CSC color matrix to overwrite NvU32 flipQueueLength; // Number of buffers used for the internal flipqueue NvU32 enableANCTimeCodeGeneration; // Enable SDI ANC time code generation NvU32 enableComposite; // Enable composite NvU32 enableAlphaKeyComposite; // Enable Alpha key composite NVVIOCOMPOSITERANGE compRange; // Co
NVAPI VIO NVVIOSTREAM Stream configurations } NVVIOINPUTCONFIG; streams[NVAPI_MAX_VIO_STREAMS]; typedef struct _NVVIOCONFIG { NvU32 version; NvU32 fields; NVVIOCONFIG_* mask for fields to use NVVIOCONFIGTYPE nvvioConfigType; configuration union { NVVIOINPUTCONFIG inConfig; configuration NVVIOOUTPUTCONFIG outConfig; configuration }vioConfig; } NVVIOCONFIG; #define NVVIOCONFIG_VER // // Structure version // Caller sets to // Input or Output // Input device // Output device MAKE_NVAPI_VERSION(NVVIOCO
NVAPI VIO // // SUPPORTED OS: Windows XP and higher // // Parameters: NvVioHandle[IN] - The caller provides the SDI device handle as input.
NVAPI VIO NVVIOOWNERTYPE ownerType); //--------------------------------------------------------------------// Function: NvAPI_VIO_Close // // Description: Closes graphics adapter for Graphics to Video operations // using the OpenGL application interface. Closing an // OpenGL handle releases the device. // // SUPPORTED OS: Windows XP and higher // // Parameters: NvVioHandle[IN] - The caller provides the SDI output device handle as input.
NVAPI VIO NVAPI_INTERFACE NvAPI_VIO_Status(NvVioHandle NVVIOSTATUS hVioHandle, *pStatus); //--------------------------------------------------------------------// Function: NvAPI_VIO_SyncFormatDetect // // Description: Detects Video I/O incoming sync video format. // // SUPPORTED OS: Windows XP and higher // // Parameters: NvVioHandle[IN] - The caller provides the SDI device handle as input. // pWait(OUT) - Pointer to receive milliseconds to wait // before VIOStatus will return detected // syncFormat.
NVAPI VIO NVVIOCONFIG *pConfig); //--------------------------------------------------------------------// Function: NvAPI_VIO_SetConfig // // Description: Set Graphics to Video configuration. // // SUPPORTED OS: Windows XP and higher // // Parameters: NvVioHandle[IN] - The caller provides the SDI device handle as input.
NVAPI VIO //--------------------------------------------------------------------NVAPI_INTERFACE NvAPI_VIO_SetCSC(NvVioHandle hVioHandle, NVVIOCOLORCONVERSION *pCSC); //--------------------------------------------------------------------// Function: NvAPI_VIO_GetCSC // // Description: Get colorspace conversion parameters. // // SUPPORTED OS: Windows XP and higher // // Parameters: NvVioHandle[IN] - The caller provides the SDI device handle as input.
NVAPI VIO NVAPI_INTERFACE NvAPI_VIO_SetGamma(NvVioHandle NVVIOGAMMACORRECTION hVioHandle, *pGamma); //--------------------------------------------------------------------// Function: NvAPI_VIO_GetGamma // // Description: Get gamma conversion parameters. // // SUPPORTED OS: Windows XP and higher // // Parameters: NvVioHandle[IN] - The caller provides the SDI device handle as input.
NVAPI VIO //--------------------------------------------------------------------// Function: NvAPI_VIO_GetSyncDelay // // Description: Get sync delay parameters. // // SUPPORTED OS: Windows XP and higher // // Parameters: NvVioHandle[IN] - The caller provides the SDI device handle as input.
NVAPI VIO // NVAPI_INVALID_ARGUMENT - Arguments passed to API are not valid // NVAPI_NOT_SUPPORTED - Video I/O not supported // NVAPI_ERROR - NVAPI Random errors // NVAPI_DEVICE_BUSY - Access denied for requested access //--------------------------------------------------------------------NVAPI_INTERFACE NvAPI_VIO_Start(NvVioHandle hVioHandle); //--------------------------------------------------------------------// Function: NvAPI_VIO_Stop // // Description: Stop Video I/O.
NVAPI VIO // NVAPI_NOT_SUPPORTED - Video I/O not supported // NVAPI_ERROR - NVAPI Random errors //--------------------------------------------------------------------NVAPI_INTERFACE NvAPI_VIO_IsFrameLockModeCompatible(NvVioHandle hVioHandle, NvU32 srcEnumIndex, NvU32 destEnumIndex, NvU32* pbCompatible); //--------------------------------------------------------------------// Function: NvAPI_VIO_EnumDevices // // Description: Enumerate all valid SDI topologies // // SUPPORTED OS: Windows XP and higher // //
NVAPI VIO // NVAPI_INVALID_ARGUMENT - Arguments passed to API are not valid // NVAPI_INCOMPATIBLE_STRUCT_VERSION - Invalid structure version // NVAPI_ERROR - NVAPI Random errors //--------------------------------------------------------------------NVAPI_INTERFACE NvAPI_VIO_QueryTopology(NV_VIO_TOPOLOGY *pNvVIOTopology); //--------------------------------------------------------------------// Function: NvAPI_VIO_EnumSignalFormats // // Description: Enumerate signal formats supported by Video I/O.
NVAPI VIO NVVIODATAFORMATDETAIL *pDataFormatDetail); Quadro SDI Output PG-03776-001_v06 | 104
13 NV CONTROL VIO CONTROLS /********************************************************************** ****/ /* * Attribute Targets * * Targets define attribute groups. For example, some attributes are only * valid to set on a GPU, others are only valid when talking about an * X Screen. Target types are then what is used to identify the target * group of the attribute you wish to set/query.
NV Control VIO Controls * Key to Integer Attribute "Permissions": * * R: The attribute is readable (in general, all attributes will be * readable) * * W: The attribute is writable (attributes may not be writable for * various reasons: they represent static system information, they * can only be changed by changing an XF86Config option, etc). * * D: The attribute requires the display mask argument.
NV Control VIO Controls * Integer attributes can be queried through the XNVCTRLQueryAttribute() and * XNVCTRLQueryTargetAttribute() function calls. * * Integer attributes can be set through the XNVCTRLSetAttribute() and * XNVCTRLSetTargetAttribute() function calls. * * Unless otherwise noted, all integer attributes can be queried/set * using an NV_CTRL_TARGET_TYPE_X_SCREEN target.
NV Control VIO Controls * * - if using the GLX_NV_video_out extension to display one or more * pbuffers, call glXGetVideoDeviceNV() to lock the GVO output for use * by the GLX client; then bind the pbuffer(s) to the GVO output with * glXBindVideoImageNV() and send pbuffers to the GVO output with * glXSendPbufferToVideoNV(); see the GLX_NV_video_out spec for more * details.
NV Control VIO Controls * video format have the same refresh rate as the incoming sync video * format. */ #define RW- */ #define #define #define NV_CTRL_GVO_SYNC_MODE 68 NV_CTRL_GVO_SYNC_MODE_FREE_RUNNING NV_CTRL_GVO_SYNC_MODE_GENLOCK NV_CTRL_GVO_SYNC_MODE_FRAMELOCK 0 1 2 /* /* * NV_CTRL_GVO_SYNC_SOURCE - if NV_CTRL_GVO_SYNC_MODE is set to either * GENLOCK or FRAMELOCK, this controls which sync source is used as * the incoming sync signal (either Composite or SDI).
NV Control VIO Controls #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define NV_CTRL_GVIO_VIDEO_FORMAT_1035I_59_94_SMPTE260 5 NV_CTRL_GVIO_VIDEO_FO
NV Control VIO Controls #define #define #define #define #define #define #define #define NV_CTRL_GVIO_VIDEO_FORMAT_1080I_59_94_3G_LEVEL_B_SMPTE274 NV_CTRL_GVIO_VIDEO_FORMAT_2048I_59_94_3G_LEVEL_B_SMPTE372 NV_CTRL_GVIO_VIDEO_FORMAT_1080P_29_97_3G_LEVEL_B_SMPTE274 NV_CTRL_GVIO_VIDEO_FORMAT_2048P_29_97_3G_LEVEL_B_SMPTE372 NV_CTRL_GVIO_VIDEO_FORMAT_1080P_23_98_3G_LEVEL_B_SMPTE274 NV_CTRL_GVIO_VIDEO_FORMAT_2048P_23_98_3G_LEVEL_B_SMPTE372 NV_CTRL_GVIO_VIDEO_FORMAT_1080I_47_96_3G_LEVEL_B_SMPTE274 NV_CTRL_GVIO_VID
NV Control VIO Controls #define #define #define #define NV_CTRL_GVO_VIDEO_FORMAT_2048P_24_00_SMPTE372 NV_CTRL_GVO_VIDEO_FORMAT_2048P_23_98_SMPTE372 NV_CTRL_GVO_VIDEO_FORMAT_2048I_48_00_SMPTE372 NV_CTRL_GVO_VIDEO_FORMAT_2048I_47_96_SMPTE372 35 36 37 38 /* * NV_CTRL_GVIO_DETECTED_VIDEO_FORMAT - indicates the input video format * detected for GVO or GVI devices; the possible values are the * NV_CTRL_GVIO_VIDEO_FORMAT constants.
NV Control VIO Controls #define renamed #define #define renamed #define #define renamed #define #define renamed #define #define renamed #define #define renamed #define #define #define renamed #define #define #define #define renamed #define #define #define #define #define #define #define #define #define #define #define /* * * * is * * * * * * * * * * NV_CTRL_GVO_DATA_FORMAT_R8G8B8A8_TO_RGBA4444 7 // NV_CTRL_GVO_DATA_FORMAT_X8X8X8A8_4444_PASSTHRU NV_CTRL_GVO_DATA_FORMAT_R8G8B8Z10_TO_RGBZ4444 7 8 // NV_C
NV Control VIO Controls * * */ the GVO device will be locked by NV_CTRL_GVO_LOCK_OWNER_CLONE. see NV_CTRL_GVO_LOCK_OWNER for detais. #define NV_CTRL_GVO_DISPLAY_X_SCREEN RW- */ #define NV_CTRL_GVO_DISPLAY_X_SCREEN_ENABLE #define NV_CTRL_GVO_DISPLAY_X_SCREEN_DISABLE 73 /* 1 0 /* * NV_CTRL_GVO_COMPOSITE_SYNC_INPUT_DETECTED - indicates whether * Composite Sync input is detected.
NV Control VIO Controls #define NV_CTRL_GVO_VIDEO_OUTPUTS_VIDEO1 #define NV_CTRL_GVO_VIDEO_OUTPUTS_VIDEO2 #define NV_CTRL_GVO_VIDEO_OUTPUTS_VIDEO_BOTH 1 2 3 /* * NV_CTRL_GVO_FPGA_VERSION - indicates the version of the Firmware on * the GVO device. Deprecated; use * NV_CTRL_STRING_GVIO_FIRMWARE_VERSION instead.
NV Control VIO Controls #define NV_CTRL_GVO_INPUT_VIDEO_FORMAT_REACQUIRE_FALSE #define NV_CTRL_GVO_INPUT_VIDEO_FORMAT_REACQUIRE_TRUE 0 1 /* * NV_CTRL_GVO_GLX_LOCKED - indicates that GVO configurability locked by * GLX; this occurs when the GLX_NV_video_out function calls * glXGetVideoDeviceNV(). All GVO output resources are locked * either glXReleaseVideoDeviceNV() is called or the X Display * when calling glXGetVideoDeviceNV() is closed.
NV Control VIO Controls #define NV_CTRL_GVIO_VIDEO_FORMAT_REFRESH_RATE R--I */ 85 /* The following are deprecated; use the NV_CTRL_GVIO_* versions, instead */ #define NV_CTRL_GVO_VIDEO_FORMAT_WIDTH 83 R-- */ #define NV_CTRL_GVO_VIDEO_FORMAT_HEIGHT 84 R-- */ #define NV_CTRL_GVO_VIDEO_FORMAT_REFRESH_RATE 85 R-- */ /* /* /* /* /* * NV_CTRL_GVO_X_SCREEN_PAN_[XY] - when GVO output of the X screen is * enabled, the pan x/y attributes control which portion of the X * screen is displayed by GVO.
NV Control VIO Controls * XNVCTRLSetGvoColorConversion() and XNVCTRLGetGvoColorConversion(). If * this attribute is FALSE, then the values specified through * XNVCTRLSetGvoColorConversion() are ignored. */ #define NV_CTRL_GVO_OVERRIDE_HW_CSC /* RW- */ #define NV_CTRL_GVO_OVERRIDE_HW_CSC_FALSE #define NV_CTRL_GVO_OVERRIDE_HW_CSC_TRUE 228 0 1 /* * NV_CTRL_GVO_CAPABILITIES - this read-only attribute describes GVO * capabilities that differ between NVIDIA SDI products.
NV Control VIO Controls #define NV_CTRL_GVO_CAPABILITIES_ADVANCE_SYNC_SKEW 0x00000020 /* * NV_CTRL_GVO_COMPOSITE_TERMINATION - enable or disable 75 ohm * termination of the SDI composite input signal.
NV Control VIO Controls * * * */ NV_CTRL_GVIO_REQUESTED_VIDEO_FORMAT NV_CTRL_GVO_DATA_FORMAT NV_CTRL_GVO_FLIP_QUEUE_SIZE #define NV_CTRL_GVO_LOCK_OWNER 257 /* R-- */ #define NV_CTRL_GVO_LOCK_OWNER_NONE 0 #define NV_CTRL_GVO_LOCK_OWNER_GLX 1 #define NV_CTRL_GVO_LOCK_OWNER_CLONE 2 #define NV_CTRL_GVO_LOCK_OWNER_X_SCREEN 3 /* * NV_CTRL_GVO_OUTPUT_VIDEO_LOCKED - Returns whether or not the GVO output * video is locked to the GPU.
NV Control VIO Controls * is only available when an SDI input source is detected and is in genlock * mode. */ #define NV_CTRL_GVO_COMPOSITE RW-- */ #define NV_CTRL_GVO_COMPOSITE_DISABLE #define NV_CTRL_GVO_COMPOSITE_ENABLE 270 /* 0 1 /* * NV_CTRL_GVO_COMPOSITE_ALPHA_KEY - When compositing is enabled, this * enables/disables alpha blending.
NV Control VIO Controls * channel range. This is a packed int that has the following format * (in order of high-bits to low bits): * * Range # (11 bits), (Enabled 1 bit), min value (10 bits), max value (10 bits) * * To query the current values, pass the range # throught he display_mask * variable. */ #define NV_CTRL_GVO_COMPOSITE_CR_KEY_RANGE RW-- */ 273 /* /* * NV_CTRL_GVO_COMPOSITE_CB_KEY_RANGE - Set the values of a CB * channel range.
NV Control VIO Controls * with OpenGL). */ #define NV_CTRL_GVO_SYNC_TO_DISPLAY --- */ #define NV_CTRL_GVO_SYNC_TO_DISPLAY_DISABLE #define NV_CTRL_GVO_SYNC_TO_DISPLAY_ENABLE 296 /* 0 1 /* * NV_CTRL_IS_GVO_DISPLAY - returns whether or not a given display is an * SDI device. */ #define NV_CTRL_IS_GVO_DISPLAY R-D */ #define NV_CTRL_IS_GVO_DISPLAY_FALSE #define NV_CTRL_IS_GVO_DISPLAY_TRUE 300 /* 0 1 /* * NV_CTRL_GVO_FULL_RANGE_COLOR - Allow full range color data [4-1019] * without clamping to [64-940].
NV Control VIO Controls #define NV_CTRL_GVI_MAX_LINKS_PER_STREAM R--I */ 308 /* /* * NV_CTRL_GVI_DETECTED_CHANNEL_BITS_PER_COMPONENT - Returns the detected * number of bits per component (BPC) of data on the given input jack+ * channel. * * The jack number should be specified in the lower 16 bits of the * "display_mask" parameter, while the channel number should be specified in * the upper 16 bits.
NV Control VIO Controls /* * NV_CTRL_GVI_REQUESTED_COMPONENT_SAMPLING - Specify the sampling format for * the captured stream. * The possible values are the NV_CTRL_GVI_DETECTED_COMPONENT_SAMPLING * constants. * The stream number should be specified in the "display_mask" parameter. */ #define NV_CTRL_GVI_REQUESTED_STREAM_COMPONENT_SAMPLING RW-I */ 312 /* /* * NV_CTRL_GVI_CHROMA_EXPAND - Enable or disable 4:2:2 -> 4:4:4 chroma * expansion for the captured stream.
NV Control VIO Controls * * The jack number should be specified in the lower 16 bits of the * "display_mask" parameter, while the channel number should be specified in * the upper 16 bits. */ #define NV_CTRL_GVI_DETECTED_CHANNEL_LINK_ID R--I */ #define NV_CTRL_GVI_LINK_ID_UNKNOWN 315 /* 0xFFFF /* * NV_CTRL_GVI_DETECTED_CHANNEL_SMPTE352_IDENTIFIER - Returns the 4byte * SMPTE 352 identifier from the given input jack+channel.
NV Control VIO Controls * supported number of (logical) channels within a single physical jack of * a GVI device. For most SDI video formats, there is only one channel * (channel 0). But for 3G video formats (as specified in SMPTE 425), * as an example, there are two channels (channel 0 and channel 1) per * physical jack. */ #define NV_CTRL_GVI_MAX_CHANNELS_PER_JACK R--I */ 336 /* /* * NV_CTRL_GVI_MAX_STREAMS - Returns the maximum number of streams * that can be configured on the GVI device.
NV Control VIO Controls * set on non-X Screen targets.) * * Unless otherwise noted, all string attributes can be queried/set using an * NV_CTRL_TARGET_TYPE_X_SCREEN target. Attributes that cannot take an * NV_CTRL_TARGET_TYPE_X_SCREEN target also cannot be queried/set through * XNVCTRLQueryStringAttribute()/XNVCTRLSetStringAttribute() (Since * these assume an X Screen target). */ /* * NV_CTRL_STRING_GVIO_FIRMWARE_VERSION - indicates the version of the * Firmware on the GVIO device.
NV Control VIO Controls #define NV_CTRL_STRING_LAST_ATTRIBUTE \ NV_CTRL_STRING_GVIO_VIDEO_FORMAT_NAME /********************************************************************** ****/ /* * String Operation Attributes: * * These attributes are used with the XNVCTRLStringOperation() * function; a string is specified as input, and a string is returned * as output. * * Unless otherwise noted, all attributes can be operated upon using * an NV_CTRL_TARGET_TYPE_X_SCREEN target.
NV Control VIO Controls 0 * * * * "stream=0, link0=jack0, link1=jack1; stream=1, link0=jack2.1" This example specifies two streams, stream 0 and stream 1. Stream * is defined to capture link0 data from the first channel (channel 0) of * BNC jack 0 and link1 data from the first channel of BNC jack 1. The * second stream (Stream 1) is defined to capture link0 data from channel 1 * (second channel) of BNC jack 2.
NV Control VIO Controls * either 1 (on/true) or 0 (off/false). * * ATTRIBUTE_TYPE_RANGE : the attribute can have any integer value * between NVCTRLAttributeValidValues.u.range.min and * NVCTRLAttributeValidValues.u.range.max (inclusive). * * ATTRIBUTE_TYPE_INT_BITS : the attribute can only have certain * integer values, indicated by which bits in * NVCTRLAttributeValidValues.u.bits.ints are on (for example: if bit * 0 is on, then 0 is a valid value; if bit 5 is on, then 5 is a valid * value, etc).
NV Control VIO Controls #define ATTRIBUTE_TYPE_XINERAMA #define ATTRIBUTE_TYPE_VCSC #define ATTRIBUTE_TYPE_GVI 0x040 0x080 0x100 typedef struct _NVCTRLAttributeValidValues { int type; union { struct { int min; int max; } range; struct { unsigned int ints; } bits; } u; unsigned int permissions; } NVCTRLAttributeValidValuesRec; /********************************************************************** ****/ /* * NV-CONTROL X event notification.
14 ANCILLARY DATA API /////////////////////////////////////////////////////////////////////// ////// // ANCAPI.H // // Header file for ANCAPI.CPP - This header file implements the NVIDIA GVO // ancillary data API for SDI. // // This file will be exposed to 3rd party developers // // Platforms/OS - Windows XP, linux // /////////////////////////////////////////////////////////////////////// ////// #ifndef __NVANCAPI_H__ #define __NVANCAPI_H__ #ifdef _WIN32 #include "nvapi.
Ancillary Data API # define OUT #endif//OUT #ifndef INOUT # define INOUT #endif//INOUT #ifdef _WIN32 #define NVVIOANCAPI_INTERFACE extern NvAPI_Status __cdecl #else #define NVVIOANCAPI_INTERFACE NvAPI_Status #endif #define DECLARE_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__ *name // Need #ifndef typedef typedef typedef typedef typedef these nvapi.h defines on linux.
Ancillary Data API #define MAKE_NVAPI_VERSION(typeName,ver) (NvU32)(sizeof(typeName) | ((ver)<<16)) #define GET_NVAPI_VERSION(ver) (NvU32)((ver)>>16) #define GET_NVAPI_SIZE(ver) (NvU32)((ver) & 0xffff) //--------------------------------------------------------------------// Types //--------------------------------------------------------------------//--------------------------------------------------------------------// Enumerations //--------------------------------------------------------------------// =
Ancillary Data API // Active channel definitions typedef enum { NVVIOANCAUDIO_ACTIVE_CH1 NVVIOANCAUDIO_ACTIVE_CH2 NVVIOANCAUDIO_ACTIVE_CH3 NVVIOANCAUDIO_ACTIVE_CH4 } NVVIOANCAUDIO_ACTIVE_CHANNEL; from SMPTE 299M-2004 Table 9 = = = = 0x1, 0x2, 0x4, 0x8 //--------------------------------------------------------------------// Structures //--------------------------------------------------------------------// Audio control typedef struct tagNVVIOANCAUDIOCNTRL { NvU32 version; // Structure version NvU8 frame
Ancillary Data API // Data use) #define #define #define #define #define #define #define #define #define #define field mask definitions (Indicate NVVIOANCDATAFRAME fields in NVVIOANCDATAFRAME_AUDIO_GROUP_1 NVVIOANCDATAFRAME_AUDIO_GROUP_2 NVVIOANCDATAFRAME_AUDIO_GROUP_3 NVVIOANCDATAFRAME_AUDIO_GROUP_4 NVVIOANCDATAFRAME_LTC NVVIOANCDATAFRAME_VITC NVVIOANCDATAFRAME_FILM_TC NVVIOANCDATAFRAME_PROD_TC NVVIOANCDATAFRAME_FRAME_ID NVVIOANCDATAFRAME_CUSTOM 0x00000001 0x00000002 0x00000004 0x00000008 0x00000010 0x00
Ancillary Data API /////////////////////////////////////////////////////////////////////// //////// // // FUNCTION NAME: NvVIOANCAPI_InitializeGVO // // DESCRIPTION: Initializes NV GVO ancillary data library. This function must be // called before any other NV GVO ancillary data library function. // This function queries the current video device state and // initializes all internal data structures.
Ancillary Data API NVVIOANCAPI_INTERFACE NvVIOANCAPI_InitializeGVI(Display *dpy, int target_id); #endif /////////////////////////////////////////////////////////////////////// //////// // // FUNCTION NAME: NvVIOANCAPI_ReleaseGVO // // DESCRIPTION: Releases NV GVO ancillary data library. This function must be // called to release all NV GVO ancillary data library resources.
Ancillary Data API // DESCRIPTION: converts an NVVIOANCAPI error code into a null terminated string // // RETURN STATUS: null terminated string (always, never NULL) // /////////////////////////////////////////////////////////////////////// //////// NVVIOANCAPI_INTERFACE NvVIOANCAPI_GetErrorMessage(NvAPI_Status nr,NvAPI_ShortString szDesc); /////////////////////////////////////////////////////////////////////// //////// // // FUNCTION NAME: NvVIOANCAPI_GetInterfaceVersionString // // DESCRIPTION: Returns a
Ancillary Data API // // RETURN STATUS: NVAPI_ERROR // NVAPI_OK // /////////////////////////////////////////////////////////////////////// //////// NVVIOANCAPI_INTERFACE NvVIOANCAPI_NumAudioSamples(NvVioHandle handle, NVVIOANCAUDIO_SAMPLE_RATE rate, float *num); /////////////////////////////////////////////////////////////////////// //////// // // FUNCTION NAME: NvVIOANCAPI_CaptureANCData // // DESCRIPTION: Capture ancillary data for current field or frame.
Notice ALL NVIDIA DESIGN SPECIFICATIONS, REFERENCE BOARDS, FILES, DRAWINGS, DIAGNOSTICS, LISTS, AND OTHER DOCUMENTS (TOGETHER AND SEPARATELY, “MATERIALS”) ARE BEING PROVIDED “AS IS.” NVIDIA MAKES NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. Information furnished is believed to be accurate and reliable.