NVIDIA DRIVE OS Linux API Reference

5.1.6.1 Release
For Test and Development only

 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.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 4
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 
171 void
173  const NvMediaImageDecoder *decoder
174 );
175 
202  const NvMediaImageDecoder *decoder,
203  NvMediaImage *target,
204  const NvMediaPictureInfo *pictureInfo,
205  uint32_t numBitstreamBuffers,
206  const NvMediaBitstreamBuffer *bitstreams,
207  NvMediaDecoderInstanceId instanceId
208 );
209 
210 /*
211  * \defgroup history_nvmedia_imgdec History
212  * Provides change history for the NvMedia Image Decode API.
213  *
214  * \section history_nvmedia_imgdec Version History
215  *
216  * <b> Version 1.0 </b> May 1, 2016
217  * - Initial release
218  *
219  * <b> Version 1.1 </b> May 27, 2016
220  * - Added \ref NvMediaImageDecoderCheckVersion API
221  *
222  * <b> Version 2.0 </b> May 9, 2017
223  * - Added instance ID parameter to \ref NvMediaImageDecoderCreate()
224  * and NvMediaImageDecoderRender()
225  * - Added NvMediaDevice parameter to NvMediaImageDecoderCreate()
226  * - NvMediaImageDecoderCheckVersion is now deprecated.
227  * Use NvMediaImageDecoderGetVersion() instead.
228  * - All NvMedia data types are moved to standard data types
229  *
230  * <b> Version 2.1 </b> Dec 14, 2018
231  * - Defined Macro constants as unsigned to fix MISRA issues
232  * - Fix MISRA violations 21.1 and 21.2
233  *
234  * <b> Version 2.2 </b> January 15, 2019
235  * - Fix MISRA violations 8.13
236  *
237  * <b> Version 2.3 </b> Feb 7, 2019
238  * - Added opaque handle for decoder
239  * internal usage into Image decoder object
240  * - Fix MISRA violations 11.3
241  * - Fix MISRA violations 8.13
242  *
243  * <b> Version 2.4 </b> February 28, 2019
244  * - Added required header include nvmedia_core.h
245  *
246  */
249 #ifdef __cplusplus
250 }; /* extern "C" */
251 #endif
252 
253 #endif /* NVMEDIA_IMGDEC_H */
uint16_t width
Decoder width.
Holds a handle representing image objects.
Definition: nvmedia_image.h:69
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
NVIDIA Media Interface: Common Types for Video/Image Encode/Decode
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.
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.