NVIDIA DRIVE OS Linux SDK API Reference

5.1.15.2 Release
For Test and Development only
nvmedia_imgdec.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016-2019, 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 8
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 
166  const NvMediaDevice *device,
167  NvMediaImageCodec codec,
168  uint16_t width,
169  uint16_t height,
170  uint16_t maxReferences,
171  uint64_t maxBitstreamSize,
172  uint8_t inputBuffering,
173  uint32_t flags,
174  NvMediaDecoderInstanceId instanceId
175 );
176 
177 
187 void
189  const NvMediaImageDecoder *decoder
190 );
191 
196 void
198  const NvMediaImageDecoder *decoder
199 );
200 
227  const NvMediaImageDecoder *decoder,
228  NvMediaImage *target,
229  const NvMediaPictureInfo *pictureInfo,
230  uint32_t numBitstreamBuffers,
231  const NvMediaBitstreamBuffer *bitstreams,
232  NvMediaDecoderInstanceId instanceId
233 );
234 
235 
246  const NvMediaImageDecoder *decoder,
247  void *backupdates
248 );
249 
250 
251 /*
252  * \defgroup history_nvmedia_imgdec History
253  * Provides change history for the NvMedia Image Decode API.
254  *
255  * \section history_nvmedia_imgdec Version History
256  *
257  * <b> Version 1.0 </b> May 1, 2016
258  * - Initial release
259  *
260  * <b> Version 1.1 </b> May 27, 2016
261  * - Added \ref NvMediaImageDecoderCheckVersion API
262  *
263  * <b> Version 2.0 </b> May 9, 2017
264  * - Added instance ID parameter to \ref NvMediaImageDecoderCreate()
265  * and NvMediaImageDecoderRender()
266  * - Added NvMediaDevice parameter to NvMediaImageDecoderCreate()
267  * - NvMediaImageDecoderCheckVersion is now deprecated.
268  * Use NvMediaImageDecoderGetVersion() instead.
269  * - All NvMedia data types are moved to standard data types
270  *
271  * <b> Version 2.1 </b> Dec 14, 2018
272  * - Defined Macro constants as unsigned to fix MISRA issues
273  * - Fix MISRA violations 21.1 and 21.2
274  *
275  * <b> Version 2.2 </b> January 15, 2019
276  * - Fix MISRA violations 8.13
277  *
278  * <b> Version 2.3 </b> Feb 7, 2019
279  * - Added opaque handle for decoder
280  * internal usage into Image decoder object
281  * - Fix MISRA violations 11.3
282  * - Fix MISRA violations 8.13
283  *
284  * <b> Version 2.4 </b> February 28, 2019
285  * - Added required header include nvmedia_core.h
286  *
287  * <b> Version 2.5 </b> July 10, 2019
288  * - Header include nvmedia_common.h is replaced with nvmedia_common_decode.h
289  *
290  * <b> Version 2.6 </b> August 20, 2019
291  * - Added New API \ref NvMediaImageDecoderUnRegisterPinnedSurfaces for
292  * Unpinning of Pinned Surfaces.
293  *
294  * <b> Version 2.7 </b> August 31, 2019
295  * - Added NVMEDIA_IMAGE_CODEC_VP9 code type entry in \ref NvMediaImageCodec
296  * - Added New API \ref NvMediaImageDecoderGetBackwardUpdates to
297  * get the backward probality update.
298  *
299  * <b> Version 2.8 </b> November 21, 2019
300  * - Added NVMEDIA_IMAGE_DECODER_PROFILING bit as a part of flags to enable
301  * decoder per frame profiling information.
302  */
305 #ifdef __cplusplus
306 }; /* extern "C" */
307 #endif
308 
309 #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
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:73
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
NvMediaImageDecoder::codec
NvMediaImageCodec codec
Codec type.
Definition: nvmedia_imgdec.h:65