NVIDIA DRIVE OS Linux SDK API Reference

5.1.12.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 6
47 
51 typedef enum {
57 
61 typedef struct {
65  uint16_t width;
67  uint16_t height;
69  uint16_t maxReferences;
73  struct NvMediaImageDecoderPriv_ *decoderPriv;
75 
86 #define NVMEDIA_IMAGE_DECODER_ATTRIBUTE_PROGRESSIVE_SEQUENCE (1U<<0)
87 
93 #define NVMEDIA_IMAGE_DECODER_10BIT_DECODE (1U<<1)
94 
100 #define NVMEDIA_IMAGE_DECODER_PIXEL_REC_2020 (1U<<2)
101 
114  NvMediaVersion *version
115 );
116 
156  const NvMediaDevice *device,
157  NvMediaImageCodec codec,
158  uint16_t width,
159  uint16_t height,
160  uint16_t maxReferences,
161  uint64_t maxBitstreamSize,
162  uint8_t inputBuffering,
163  uint32_t flags,
164  NvMediaDecoderInstanceId instanceId
165 );
166 
167 
177 void
179  const NvMediaImageDecoder *decoder
180 );
181 
186 void
188  const NvMediaImageDecoder *decoder
189 );
190 
217  const NvMediaImageDecoder *decoder,
218  NvMediaImage *target,
219  const NvMediaPictureInfo *pictureInfo,
220  uint32_t numBitstreamBuffers,
221  const NvMediaBitstreamBuffer *bitstreams,
222  NvMediaDecoderInstanceId instanceId
223 );
224 
225 /*
226  * \defgroup history_nvmedia_imgdec History
227  * Provides change history for the NvMedia Image Decode API.
228  *
229  * \section history_nvmedia_imgdec Version History
230  *
231  * <b> Version 1.0 </b> May 1, 2016
232  * - Initial release
233  *
234  * <b> Version 1.1 </b> May 27, 2016
235  * - Added \ref NvMediaImageDecoderCheckVersion API
236  *
237  * <b> Version 2.0 </b> May 9, 2017
238  * - Added instance ID parameter to \ref NvMediaImageDecoderCreate()
239  * and NvMediaImageDecoderRender()
240  * - Added NvMediaDevice parameter to NvMediaImageDecoderCreate()
241  * - NvMediaImageDecoderCheckVersion is now deprecated.
242  * Use NvMediaImageDecoderGetVersion() instead.
243  * - All NvMedia data types are moved to standard data types
244  *
245  * <b> Version 2.1 </b> Dec 14, 2018
246  * - Defined Macro constants as unsigned to fix MISRA issues
247  * - Fix MISRA violations 21.1 and 21.2
248  *
249  * <b> Version 2.2 </b> January 15, 2019
250  * - Fix MISRA violations 8.13
251  *
252  * <b> Version 2.3 </b> Feb 7, 2019
253  * - Added opaque handle for decoder
254  * internal usage into Image decoder object
255  * - Fix MISRA violations 11.3
256  * - Fix MISRA violations 8.13
257  *
258  * <b> Version 2.4 </b> February 28, 2019
259  * - Added required header include nvmedia_core.h
260  *
261  * <b> Version 2.5 </b> July 10, 2019
262  * - Header include nvmedia_common.h is replaced with nvmedia_common_decode.h
263  *
264  * <b> Version 2.6 </b> August 20, 2019
265  * - Added New API \ref NvMediaImageDecoderUnRegisterPinnedSurfaces for
266  * Unpinning of Pinned Surfaces.
267  */
270 #ifdef __cplusplus
271 }; /* extern "C" */
272 #endif
273 
274 #endif /* NVMEDIA_IMGDEC_H */
uint16_t width
Decoder width.
Holds a handle representing image objects.
Definition: nvmedia_image.h:69
void NvMediaImageDecoderUnRegisterPinnedSurfaces(const NvMediaImageDecoder *decoder)
Unpin all the Pinned decode Surfaces used by decoder.
uint16_t height
Decoder height.
Holds an application data buffer containing compressed video data.
int uint32_t width
NvMediaStatus NvMediaImageDecoderGetVersion(NvMediaVersion *version)
Checks the version compatibility for the NvMedia Image decoder library.
NvMediaDecoderInstanceId
Specifies the decoder instance ID.
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.
NVIDIA Media Interface: Image Processing
NvMediaImageCodec
Image codec type.
Holds NvMedia version information.
Definition: nvmedia_core.h:226
struct NvMediaDevice NvMediaDevice
An opaque handle representing an NvMediaDevice object.
Definition: nvmedia_core.h:337
NvMediaDecoderInstanceId instanceId
Instance ID of the decoder.
NVIDIA Media Interface: Core
NvMediaStatus
Defines all possible error codes.
Definition: nvmedia_core.h:169
int uint32_t uint32_t uint32_t const uint32_t const uint32_t const uint32_t const uint64_t uint32_t uint32_t flags
int uint32_t uint32_t height
uint16_t maxReferences
Maximum number of reference pictures.
void NvMediaPictureInfo
A generic "picture information" pointer type.
NVIDIA Media Interface: Common Types for Video/Image Decode
struct NvMediaImageDecoderPriv_ * decoderPriv
An Opaque pointer for internal use.
A handle representing a IMAGE decoder object.
void NvMediaImageDecoderDestroy(const NvMediaImageDecoder *decoder)
Destroys a image decoder object.
NvMediaImageCodec codec
Codec type.
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.