NVIDIA DRIVE 5.0 Linux SDK API Reference

5.0.5.0 Release

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvmedia_ijpd.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017, 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_IJPD_H
16 #define _NVMEDIA_IJPD_H
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 #include "nvmedia_common.h"
23 
34 #define NVMEDIA_IJPD_VERSION_MAJOR 1
35 
36 #define NVMEDIA_IJPD_VERSION_MINOR 2
37 
42 #define NVMEDIA_JPEG_DEC_ATTRIBUTE_ALPHA_VALUE (1 << 0)
43 
47 #define NVMEDIA_JPEG_DEC_ATTRIBUTE_COLOR_STANDARD (1 << 1)
48 
52 #define NVMEDIA_IJPD_RENDER_FLAG_ROTATE_0 0
53 
57 #define NVMEDIA_IJPD_RENDER_FLAG_ROTATE_90 1
58 
62 #define NVMEDIA_IJPD_RENDER_FLAG_ROTATE_180 2
63 
67 #define NVMEDIA_IJPD_RENDER_FLAG_ROTATE_270 3
68 
72 #define NVMEDIA_IJPD_RENDER_FLAG_FLIP_HORIZONTAL (1 << 2)
73 
77 #define NVMEDIA_IJPD_RENDER_FLAG_FLIP_VERTICAL (1 << 3)
78 
82 typedef struct {
90  uint32_t alphaValue;
92 
96 typedef struct {
99  uint16_t width;
102  uint16_t height;
105  uint8_t partialAccel;
107 
113 typedef struct {
115  uint16_t maxWidth;
117  uint16_t maxHeight;
122 } NvMediaIJPD;
123 
135  NvMediaVersion *version
136 );
137 
154 NvMediaIJPD *
156  NvMediaDevice *device,
157  uint16_t maxWidth,
158  uint16_t maxHeight,
159  uint32_t maxBitstreamBytes,
160  uint8_t supportPartialAccel
161 );
162 
167 void NvMediaIJPDDestroy(NvMediaIJPD *decoder);
168 
183  NvMediaIJPD *decoder,
184  uint16_t maxWidth,
185  uint16_t maxHeight,
186  uint32_t maxBitstreamBytes
187 );
188 
207  NvMediaIJPD *decoder,
208  uint32_t attributeMask,
209  void *attributes
210 );
211 
238  NVMEDIAJPEGDecInfo *info,
239  uint32_t numBitstreamBuffers,
240  const NvMediaBitstreamBuffer *bitstreams
241 );
242 
336  NvMediaIJPD *decoder,
337  NvMediaImage *output,
338  const NvMediaRect *srcRect,
339  const NvMediaRect *dstRect,
340  uint8_t downscaleLog2,
341  uint32_t numBitstreamBuffers,
342  const NvMediaBitstreamBuffer *bitstreams,
343  uint32_t flags
344 );
345 
393  NvMediaIJPD *decoder,
394  NvMediaImage *output,
395  uint8_t downscaleLog2,
396  uint32_t numBitstreamBuffers,
397  const NvMediaBitstreamBuffer *bitstreams,
398  uint32_t flags
399 );
400 
401 /*
402  * \defgroup history_nvmedia_ijpd History
403  * Provides change history for the NvMedia Image Jpeg Decode API.
404  *
405  * \section history_nvmedia_ijpd Version History
406  *
407  * <b> Version 1.0 </b> November 9, 2015
408  * - Initial release
409  *
410  * <b> Version 1.1 </b> May 11, 2016
411  * - Added \ref NvMediaIJPDCheckVersion API
412  *
413  * <b> Version 1.2 </b> May 15, 2017
414  * - Added \ref NvMediaIJPDGetVersion API to get the version of NvMedia IJPD library
415  * - NvMediaIJPDCheckVersion is deprecated. Use NvMediaIJPDGetVersion() instead
416  * - All NvMedia data types are moved to standard data types
417  */
418 
421 #ifdef __cplusplus
422 }; /* extern "C" */
423 #endif
424 
425 #endif /* _NVMEDIA_IJPD_H */
A handle representing image objects.
Definition: nvmedia_image.h:75
Holds an application data buffer containing compressed video data.
uint8_t partialAccel
Specifies whether partial acceleration is needed for the stream.
Definition: nvmedia_ijpd.h:105
uint16_t height
Specifies the stream-encoded height, in pixels.
Definition: nvmedia_ijpd.h:102
NvMediaStatus NvMediaIJPDGetVersion(NvMediaVersion *version)
Gets the version compatibility for the NvMedia IJPGD library.
NvMediaStatus NvMediaIJPDRenderYUV(NvMediaIJPD *decoder, NvMediaImage *output, uint8_t downscaleLog2, uint32_t numBitstreamBuffers, const NvMediaBitstreamBuffer *bitstreams, uint32_t flags)
Decodes a JPEG image into YUV format.
uint16_t maxHeight
Max height of decoded JPEG image supported.
Definition: nvmedia_ijpd.h:117
uint8_t supportPartialAccel
Flag indicates support partial acceleration or not.
Definition: nvmedia_ijpd.h:121
Holds NvMedia Version information.
Definition: nvmedia_core.h:231
NvMediaStatus NvMediaIJPDSetAttributes(NvMediaIJPD *decoder, uint32_t attributeMask, void *attributes)
Sets attributes of an existing image JPEG decoder.
void NvMediaIJPDDestroy(NvMediaIJPD *decoder)
Destroys an NvMedia image JPEG decoder.
NVIDIA Media Interface: Common Types for Video/Image Encode/Decode
NvMediaColorStandard
Defines color standards.
Definition: nvmedia_core.h:112
uint32_t maxBitstreamBytes
Max size in bytes of JPEG bitstream supported.
Definition: nvmedia_ijpd.h:119
NvMediaStatus
The set of all possible error codes.
Definition: nvmedia_core.h:178
NvMediaStatus NvMediaIJPDGetInfo(NVMEDIAJPEGDecInfo *info, uint32_t numBitstreamBuffers, const NvMediaBitstreamBuffer *bitstreams)
A helper function that determines whether the JPEG decoder HW engine can decode the input JPEG stream...
Holds image JPEG decoder stream information.
Definition: nvmedia_ijpd.h:96
Holds a rectangular region of a surface.
Definition: nvmedia_core.h:135
void NvMediaDevice
An opaque handle representing a NvMediaDevice object.
Definition: nvmedia_core.h:284
NvMediaIJPD * NvMediaIJPDCreate(NvMediaDevice *device, uint16_t maxWidth, uint16_t maxHeight, uint32_t maxBitstreamBytes, uint8_t supportPartialAccel)
Creates a JPEG decoder object capable of decoding a JPEG stream into an image surface.
Holds image JPEG decoder attributes.
Definition: nvmedia_ijpd.h:82
NvMediaColorStandard colorStandard
Specifies the color standard, defined in NvMediaColorStandard.
Definition: nvmedia_ijpd.h:86
NvMediaStatus NvMediaIJPDResize(NvMediaIJPD *decoder, uint16_t maxWidth, uint16_t maxHeight, uint32_t maxBitstreamBytes)
Resizes an existing image JPEG decoder.
uint16_t width
Specifies the stream-encoded width, in pixels.
Definition: nvmedia_ijpd.h:99
NvMediaStatus NvMediaIJPDRender(NvMediaIJPD *decoder, NvMediaImage *output, const NvMediaRect *srcRect, const NvMediaRect *dstRect, uint8_t downscaleLog2, uint32_t numBitstreamBuffers, const NvMediaBitstreamBuffer *bitstreams, uint32_t flags)
Decodes a JPEG image.
uint16_t maxWidth
Max width of decoded JPEG image supported.
Definition: nvmedia_ijpd.h:115
Holds information for decoding a JPEG stream into an image surface.
Definition: nvmedia_ijpd.h:113
uint32_t alphaValue
Specifies the alpha value.
Definition: nvmedia_ijpd.h:90