NVIDIA DRIVE OS Linux SDK API Reference

5.2.6 Release
For Test and Development only
nvmedia_imgdec.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016-2020, 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_IMGDEC_H
16 #define NVMEDIA_IMGDEC_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_image.h"
25 
44 #define NVMEDIA_IMAGEDEC_VERSION_MAJOR 2
45 
46 #define NVMEDIA_IMAGEDEC_VERSION_MINOR 9
47 
51 typedef enum {
59 
63 typedef struct {
67  uint16_t width;
69  uint16_t height;
71  uint16_t maxReferences;
75  struct NvMediaImageDecoderPriv_ *decoderPriv;
77 
88 #define NVMEDIA_IMAGE_DECODER_ATTRIBUTE_PROGRESSIVE_SEQUENCE (1U<<0)
89 
95 #define NVMEDIA_IMAGE_DECODER_10BIT_DECODE (1U<<1)
96 
102 #define NVMEDIA_IMAGE_DECODER_PIXEL_REC_2020 (1U<<2)
103 
109 #define NVMEDIA_IMAGE_DECODER_PROFILING (1U<<5)
110 
124  NvMediaVersion *version
125 );
126 
167  const NvMediaDevice *device,
168  NvMediaImageCodec codec,
169  uint16_t width,
170  uint16_t height,
171  uint16_t maxReferences,
172  uint64_t maxBitstreamSize,
173  uint8_t inputBuffering,
174  uint32_t flags,
175  NvMediaDecoderInstanceId instanceId
176 );
177 
189  void
190 );
191 
238  NvMediaImageDecoder *decoder,
239  const NvMediaDevice *device,
240  NvMediaImageCodec codec,
241  uint16_t width,
242  uint16_t height,
243  uint16_t maxReferences,
244  uint64_t maxBitstreamSize,
245  uint8_t inputBuffering,
246  uint32_t flags,
247  NvMediaDecoderInstanceId instanceId
248 );
249 
250 
260 void
262  const NvMediaImageDecoder *decoder
263 );
264 
269 void
271  const NvMediaImageDecoder *decoder
272 );
273 
300  const NvMediaImageDecoder *decoder,
301  NvMediaImage *target,
302  const NvMediaPictureInfo *pictureInfo,
303  uint32_t numBitstreamBuffers,
304  const NvMediaBitstreamBuffer *bitstreams,
305  NvMediaDecoderInstanceId instanceId
306 );
307 
308 
319  const NvMediaImageDecoder *decoder,
320  void *backupdates
321 );
322 
323 
324 /*
325  * \defgroup history_nvmedia_imgdec History
326  * Provides change history for the NvMedia Image Decode API.
327  *
328  * \section history_nvmedia_imgdec Version History
329  *
330  * <b> Version 1.0 </b> May 1, 2016
331  * - Initial release
332  *
333  * <b> Version 1.1 </b> May 27, 2016
334  * - Added \ref NvMediaImageDecoderCheckVersion API
335  *
336  * <b> Version 2.0 </b> May 9, 2017
337  * - Added instance ID parameter to \ref NvMediaImageDecoderCreate()
338  * and NvMediaImageDecoderRender()
339  * - Added NvMediaDevice parameter to NvMediaImageDecoderCreate()
340  * - NvMediaImageDecoderCheckVersion is now deprecated.
341  * Use NvMediaImageDecoderGetVersion() instead.
342  * - All NvMedia data types are moved to standard data types
343  *
344  * <b> Version 2.1 </b> Dec 14, 2018
345  * - Defined Macro constants as unsigned to fix MISRA issues
346  * - Fix MISRA violations 21.1 and 21.2
347  *
348  * <b> Version 2.2 </b> January 15, 2019
349  * - Fix MISRA violations 8.13
350  *
351  * <b> Version 2.3 </b> Feb 7, 2019
352  * - Added opaque handle for decoder
353  * internal usage into Image decoder object
354  * - Fix MISRA violations 11.3
355  * - Fix MISRA violations 8.13
356  *
357  * <b> Version 2.4 </b> February 28, 2019
358  * - Added required header include nvmedia_core.h
359  *
360  * <b> Version 2.5 </b> July 10, 2019
361  * - Header include nvmedia_common.h is replaced with nvmedia_common_decode.h
362  *
363  * <b> Version 2.6 </b> August 20, 2019
364  * - Added New API \ref NvMediaImageDecoderUnRegisterPinnedSurfaces for
365  * Unpinning of Pinned Surfaces.
366  *
367  * <b> Version 2.7 </b> August 31, 2019
368  * - Added NVMEDIA_IMAGE_CODEC_VP9 code type entry in \ref NvMediaImageCodec
369  * - Added New API \ref NvMediaImageDecoderGetBackwardUpdates to
370  * get the backward probality update.
371  *
372  * <b> Version 2.8 </b> November 21, 2019
373  * - Added NVMEDIA_IMAGE_DECODER_PROFILING bit as a part of flags to enable
374  * decoder per frame profiling information.
375  *
376  * <b> Version 2.9 </b> September 25, 2020
377  * - Added \ref NvMediaImageDecoderCreateCtx API
378  * - Added \ref NvMediaImageDecoderInit API
379  */
382 #ifdef __cplusplus
383 }; /* extern "C" */
384 #endif
385 
386 #endif /* NVMEDIA_IMGDEC_H */
NvMediaImageDecoderGetVersion
NvMediaStatus NvMediaImageDecoderGetVersion(NvMediaVersion *version)
Checks the version compatibility for the NvMedia Image decoder library.
NvMediaImageCodec
NvMediaImageCodec
Image codec type.
Definition: nvmedia_imgdec.h:51
NvMediaImageDecoder::width
uint16_t width
Decoder width.
Definition: nvmedia_imgdec.h:67
NvMediaImageDecoderUnRegisterPinnedSurfaces
void NvMediaImageDecoderUnRegisterPinnedSurfaces(const NvMediaImageDecoder *decoder)
Unpin all the Pinned decode Surfaces used by decoder.
NVMEDIA_IMAGE_CODEC_H264
@ NVMEDIA_IMAGE_CODEC_H264
H.264 codec.
Definition: nvmedia_imgdec.h:53
NvMediaImageDecoderRender
NvMediaStatus NvMediaImageDecoderRender(const NvMediaImageDecoder *decoder, NvMediaImage *target, const NvMediaPictureInfo *pictureInfo, uint32_t numBitstreamBuffers, const NvMediaBitstreamBuffer *bitstreams, NvMediaDecoderInstanceId instanceId)
Decodes a compressed field/frame and render the result into a NvMediaImage.
NvMediaImageDecoder
A handle representing a IMAGE decoder object.
Definition: nvmedia_imgdec.h:63
NvMediaImageDecoderCreate
NvMediaImageDecoder * NvMediaImageDecoderCreate(const NvMediaDevice *device, NvMediaImageCodec codec, uint16_t width, uint16_t height, uint16_t maxReferences, uint64_t maxBitstreamSize, uint8_t inputBuffering, uint32_t flags, NvMediaDecoderInstanceId instanceId)
Creates a image decoder object.
NvMediaDevice
struct NvMediaDevice NvMediaDevice
An opaque handle representing an NvMediaDevice object.
Definition: nvmedia_core.h:348
NvMediaImageDecoderInit
NvMediaStatus NvMediaImageDecoderInit(NvMediaImageDecoder *decoder, const NvMediaDevice *device, NvMediaImageCodec codec, uint16_t width, uint16_t height, uint16_t maxReferences, uint64_t maxBitstreamSize, uint8_t inputBuffering, uint32_t flags, NvMediaDecoderInstanceId instanceId)
Initialize an NvMediaImageDecoder object instance.
NvMediaImageDecoderGetBackwardUpdates
NvMediaStatus NvMediaImageDecoderGetBackwardUpdates(const NvMediaImageDecoder *decoder, void *backupdates)
NvMediaImageDecoder get backward updates counters for VP9 adaptive entropy contexts.
NvMediaVersion
Holds NvMedia version information.
Definition: nvmedia_core.h:237
NvMediaImageRec
Holds a handle representing image objects.
Definition: nvmedia_image.h:71
NvMediaImageDecoder::height
uint16_t height
Decoder height.
Definition: nvmedia_imgdec.h:69
NVMEDIA_IMAGE_CODEC_VP9
@ NVMEDIA_IMAGE_CODEC_VP9
VP9 codec.
Definition: nvmedia_imgdec.h:57
nvmedia_core.h
NVIDIA Media Interface: Core
NvMediaImageDecoder::decoderPriv
struct NvMediaImageDecoderPriv_ * decoderPriv
An Opaque pointer for internal use.
Definition: nvmedia_imgdec.h:75
NvMediaStatus
NvMediaStatus
Defines all possible error codes.
Definition: nvmedia_core.h:180
NvMediaBitstreamBuffer
Holds an application data buffer containing compressed video data.
Definition: nvmedia_common_encode_decode.h:75
NvMediaImageDecoder::maxReferences
uint16_t maxReferences
Maximum number of reference pictures.
Definition: nvmedia_imgdec.h:71
NvMediaPictureInfo
void NvMediaPictureInfo
A generic "picture information" pointer type.
Definition: nvmedia_common_decode.h:94
NvMediaImageDecoder::instanceId
NvMediaDecoderInstanceId instanceId
Instance ID of the decoder.
Definition: nvmedia_imgdec.h:73
NVMEDIA_IMAGE_CODEC_HEVC
@ NVMEDIA_IMAGE_CODEC_HEVC
H265 codec.
Definition: nvmedia_imgdec.h:55
nvmedia_common_decode.h
NVIDIA Media Interface: Common Types for Video/Image Decode
NvMediaDecoderInstanceId
NvMediaDecoderInstanceId
Specifies the decoder instance ID.
Definition: nvmedia_common_decode.h:60
NvMediaImageDecoderDestroy
void NvMediaImageDecoderDestroy(const NvMediaImageDecoder *decoder)
Destroys a image decoder object.
nvmedia_image.h
NVIDIA Media Interface: Image Processing
NvMediaImageDecoderCreateCtx
NvMediaImageDecoder * NvMediaImageDecoderCreateCtx(void)
Create an NvMediaImageDecoder object instance.
NvMediaImageDecoder::codec
NvMediaImageCodec codec
Codec type.
Definition: nvmedia_imgdec.h:65