NVIDIA DRIVE OS Linux SDK API Reference

6.0.3 Release
nvmedia_viddec.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-2022, NVIDIA CORPORATION. All rights reserved. All
3  * information contained herein is proprietary and confidential to NVIDIA
4  * Corporation. Any use, reproduction, or disclosure without the written
5  * permission of NVIDIA Corporation is prohibited.
6  */
7 
15 #ifndef NVMEDIA_VIDDEC_H
16 #define NVMEDIA_VIDDEC_H
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 #include "nvmedia_common_decode.h"
23 #include "nvmedia_core.h"
24 #include "nvmedia_video.h"
25 
43 #define NVMEDIA_VIDEODEC_VERSION_MAJOR 1
44 
45 #define NVMEDIA_VIDEODEC_VERSION_MINOR 13
46 
47 
51 typedef struct {
55  uint16_t width;
57  uint16_t height;
59  uint16_t maxReferences;
63  struct NvMediaVideoDecoderPriv_ *decoderPriv;
65 
66 
79 #define NVMEDIA_VIDEO_DECODER_10BIT_DECODE (1U<<0)
80 
86 #define NVMEDIA_VIDEO_DECODER_PIXEL_REC_2020 (1U<<1)
87 
93 #define NVMEDIA_VIDEO_DECODER_OUTPUT_16BIT_SURFACES (1U<<2)
94 
100 #define NVMEDIA_VIDEO_DECODER_ENABLE_AES (1U<<3)
101 
107 #define NVMEDIA_VIDEO_DECODER_NV24_OUTPUT (1U<<4)
108 
114 #define NVMEDIA_VIDEO_DECODER_PROFILING (1U<<5)
115 
121 #define NVMEDIA_VIDEO_DECODER_DUMP_MV (1U<<6)
122 
136  NvMediaVersion *version
137 );
138 
186  const NvMediaDevice *device,
187  NvMediaVideoCodec codec,
188  uint16_t width,
189  uint16_t height,
190  uint16_t maxReferences,
191  uint64_t maxBitstreamSize,
192  uint8_t inputBuffering,
193  uint32_t flags,
194  NvMediaDecoderInstanceId instanceId
195 );
196 
200 void
202  const NvMediaVideoDecoder *decoder
203 );
204 
205 
215 void
217  const NvMediaVideoDecoder *decoder
218 );
219 
252  const NvMediaVideoDecoder *decoder,
253  const NvMediaVideoSurface *target,
254  const NvMediaPictureInfo *pictureInfo,
255  const void *encryptParams,
256  uint32_t numBitstreamBuffers,
257  const NvMediaBitstreamBuffer *bitstreams,
258  NvMediaVideoDecodeStats *FrameStatsDump,
259  NvMediaDecoderInstanceId instanceId
260 );
261 
289  const NvMediaVideoDecoder *decoder,
290  const NvMediaVideoSurface *target,
291  const NvMediaSliceDecodeData *sliceDecData
292 );
293 
294 
345  const NvMediaVideoDecoder *decoder,
346  uint32_t ringEntryIdx,
347  NvMediaVideoDecodeFrameStatus *FrameStatus
348 );
349 
360  const NvMediaVideoDecoder *decoder,
361  void *backupdates
362 );
363 
364 /*
365  * \defgroup history_nvmedia_viddec History
366  * Provides change history for the NvMedia Video Decode API.
367  *
368  * \section history_nvmedia_viddec Version History
369  *
370  * <b> Version 1.0 </b> March 21, 2017
371  * - Initial release
372  *
373  * <b> Version 1.1 </b> April 07, 2017
374  * - Added hwClockValue in \ref NvMediaVideoDecodeFrameStatus
375  * - Rename NvMediaVideoBackwardUpdates to \ref NvMediaVideoDecoderGetBackwardUpdates
376  *
377  * <b> Version 1.2 </b> April 18, 2017
378  * - Deprecated NvMediaVideoDecoderCreate() and NvMediaVideoDecoderRender()
379  * - Added \ref NvMediaVideoDecoderGetVersion()
380  * - Added device and instance ID parameters to \ref NvMediaVideoDecoderCreateEx()
381  * - Added instanceId parameter to \ref NvMediaVideoDecoderRenderEx()
382  * - Added instanceId to \ref NvMediaVideoDecoder object
383  * - Changed to use standard data types
384  *
385  * <b> Version 1.3 </b> May 17, 2017
386  * - Added deprecated warning message for \ref NvMediaVideoDecoderSetAttributes
387  *
388  * <b> Version 1.4 </b> June 05, 2017
389  * - Removed \ref -NvMediaVideoDecoderCopySliceData interface
390  * - Added \ref NvMediaVideoDecoderSliceDecode interface
391  * - Added \ref NvMediaSliceDecodeData structure required for
392  * \ref NvMediaVideoDecoderSliceDecode argument.
393  *
394  * <b> Version 1.5 </b> June 15, 2017
395  * - Deprecated \ref NvMediaVideoDecoderSetAttributes()
396  *
397  * <b> Version 1.6 </b> July 04, 2017
398  * - Added \ref NvMedia_MB_Type_enum enumerator
399  * - Added \ref NvMedia_MB_Part_enum enumerator
400  * - Added qp, mb_type and mb_part to \ref NvMediaMotionVectorMB_Metadata structure
401  *
402  * <b> Version 1.7 </b> Dec 14, 2018
403  * - Defined Macro constants as unsigned to fix MISRA issues
404  * - Fix MISRA violations 21.1 and 21.2
405  *
406  * <b> Version 1.8 </b> January 15, 2019
407  * - Fix MISRA violations 8.13
408  *
409  * <b> Version 1.9 </b> Feb 11, 2019
410  * - Added opaque handle for decoder
411  * internal usage into video decoder object
412  * - Fix MISRA violations 11.3
413  * - Fix MISRA violations 8.13
414  *
415  * <b> Version 1.10 </b> Feb 28, 2019
416  * - Added required header include nvmedia_core.h
417  *
418  * <b> Version 1.11 </b> July 10, 2019
419  * - Header include nvmedia_common.h is replaced with nvmedia_common_decode.h
420  *
421  * <b> Version 1.12 </b> August 20, 2019
422  * - Added New API \ref NvMediaVideoDecoderUnRegisterPinnedSurfaces for
423  * Unpinning of Pinned Surfaces.
424  *
425  * <b> Version 1.13 </b> June 30, 2021
426  * - Moved \ref NvMediaVideoDecodeFrameStatus, \ref NvMediaMotionVectorFrameMetaData
427  * and \ref NvMediaVideoDecodeStats from nvmedia_videodec.h file to common header
428  * file for image and video decoder header.
429  */
430 
433 #ifdef __cplusplus
434 } /* extern "C" */
435 #endif
436 
437 #endif /* NVMEDIA_VIDDEC_H */
NvMediaVideoDecoder::maxReferences
uint16_t maxReferences
Maximum number of reference pictures.
Definition: nvmedia_viddec.h:59
NvMediaVideoDecoderSliceDecode
NvMediaStatus NvMediaVideoDecoderSliceDecode(const NvMediaVideoDecoder *decoder, const NvMediaVideoSurface *target, const NvMediaSliceDecodeData *sliceDecData)
This function is intended for use in low-latency decode mode.
nvmedia_core.h
NVIDIA Media Interface: Core
nvmedia_video.h
NVIDIA Media Interface: Video Surface Processing
nvmedia_common_decode.h
NVIDIA Media Interface: Common Types for Video/Image Decode
NvMediaVideoDecodeStats
Frame stats structure to get get ring entry idx and motion vector dump.
Definition: tvmr/include/nvmedia_common_decode.h:219
NvMediaSliceDecodeData
slice level data used with slice level decoding
Definition: tvmr/include/nvmedia_common_decode.h:507
NvMediaVideoDecoderRenderEx
NvMediaStatus NvMediaVideoDecoderRenderEx(const NvMediaVideoDecoder *decoder, const NvMediaVideoSurface *target, const NvMediaPictureInfo *pictureInfo, const void *encryptParams, uint32_t numBitstreamBuffers, const NvMediaBitstreamBuffer *bitstreams, NvMediaVideoDecodeStats *FrameStatsDump, NvMediaDecoderInstanceId instanceId)
Decodes a compressed field/frame and render the result into a NvMediaVideoSurface.
NvMediaVideoDecoder::instanceId
NvMediaDecoderInstanceId instanceId
Instance ID of the decoder.
Definition: nvmedia_viddec.h:61
NvMediaDevice
struct NvMediaDevice NvMediaDevice
An opaque handle representing an NvMediaDevice object.
Definition: tvmr/include/nvmedia_core.h:366
NvMediaVideoCodec
NvMediaVideoCodec
Video codec type.
Definition: tvmr/include/nvmedia_common_encode_decode.h:48
NvMediaVersion
Holds NvMedia version information.
Definition: tvmr/include/nvmedia_core.h:237
NvMediaVideoDecoderDestroy
void NvMediaVideoDecoderDestroy(const NvMediaVideoDecoder *decoder)
Destroys a video decoder object.
NvMediaVideoDecoder::decoderPriv
struct NvMediaVideoDecoderPriv_ * decoderPriv
An Opaque pointer for internal use.
Definition: nvmedia_viddec.h:63
NvMediaVideoDecodeFrameStatus
To Get the decoding status from HW decoder.
Definition: tvmr/include/nvmedia_common_decode.h:111
NvMediaVideoDecoder
A handle representing a video decoder object.
Definition: nvmedia_viddec.h:51
NvMediaVideoDecoderGetVersion
NvMediaStatus NvMediaVideoDecoderGetVersion(NvMediaVersion *version)
Gets the version information for the NvMedia Video Decoder library.
NvMediaVideoSurface
A handle representing a video surface object.
Definition: nvmedia_video.h:58
NvMediaVideoDecoderCreateEx
NvMediaVideoDecoder * NvMediaVideoDecoderCreateEx(const NvMediaDevice *device, NvMediaVideoCodec codec, uint16_t width, uint16_t height, uint16_t maxReferences, uint64_t maxBitstreamSize, uint8_t inputBuffering, uint32_t flags, NvMediaDecoderInstanceId instanceId)
Creates a video decoder object.
NvMediaStatus
NvMediaStatus
Defines all possible error codes.
Definition: tvmr/include/nvmedia_core.h:180
NvMediaBitstreamBuffer
Holds an application data buffer containing compressed video data.
Definition: tvmr/include/nvmedia_common_encode_decode.h:83
NvMediaVideoDecoderGetBackwardUpdates
NvMediaStatus NvMediaVideoDecoderGetBackwardUpdates(const NvMediaVideoDecoder *decoder, void *backupdates)
NvMediaVideoDecoder get backward updates counters for VP9 adaptive entropy contexts.
NvMediaVideoDecoderUnRegisterPinnedSurfaces
void NvMediaVideoDecoderUnRegisterPinnedSurfaces(const NvMediaVideoDecoder *decoder)
Unpin all the Pinned decode Surfaces used by decoder.
NvMediaPictureInfo
void NvMediaPictureInfo
A generic "picture information" pointer type.
Definition: tvmr/include/nvmedia_common_decode.h:94
NvMediaVideoDecoder::height
uint16_t height
Decoder height.
Definition: nvmedia_viddec.h:57
NvMediaVideoDecoder::codec
NvMediaVideoCodec codec
Codec type.
Definition: nvmedia_viddec.h:53
NvMediaDecoderInstanceId
NvMediaDecoderInstanceId
Specifies the decoder instance ID.
Definition: tvmr/include/nvmedia_common_decode.h:60
NvMediaVideoDecoderGetFrameDecodeStatus
NvMediaStatus NvMediaVideoDecoderGetFrameDecodeStatus(const NvMediaVideoDecoder *decoder, uint32_t ringEntryIdx, NvMediaVideoDecodeFrameStatus *FrameStatus)
Retrieves the HW decode status available.
NvMediaVideoDecoder::width
uint16_t width
Decoder width.
Definition: nvmedia_viddec.h:55