NVIDIA DRIVE OS Linux API Reference

5.1.3.0 Release

 All Data Structures Namespaces 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 3
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 #define NVMEDIA_MAX_JPEG_APP_MARKERS 16
83 
87 typedef struct {
95  uint32_t alphaValue;
97 
101 typedef struct {
104  uint16_t marker;
107  uint16_t len;
110  void *pMarker;
112 
116 typedef struct {
119  uint16_t width;
122  uint16_t height;
125  uint8_t partialAccel;
133 
139 typedef struct {
141  uint16_t maxWidth;
143  uint16_t maxHeight;
148 } NvMediaIJPD;
149 
161  NvMediaVersion *version
162 );
163 
180 NvMediaIJPD *
182  NvMediaDevice *device,
183  uint16_t maxWidth,
184  uint16_t maxHeight,
185  uint32_t maxBitstreamBytes,
186  uint8_t supportPartialAccel
187 );
188 
193 void NvMediaIJPDDestroy(NvMediaIJPD *decoder);
194 
209  NvMediaIJPD *decoder,
210  uint16_t maxWidth,
211  uint16_t maxHeight,
212  uint32_t maxBitstreamBytes
213 );
214 
233  NvMediaIJPD *decoder,
234  uint32_t attributeMask,
235  void *attributes
236 );
237 
264  NVMEDIAJPEGDecInfo *info,
265  uint32_t numBitstreamBuffers,
266  const NvMediaBitstreamBuffer *bitstreams
267 );
268 
362  NvMediaIJPD *decoder,
363  NvMediaImage *output,
364  const NvMediaRect *srcRect,
365  const NvMediaRect *dstRect,
366  uint8_t downscaleLog2,
367  uint32_t numBitstreamBuffers,
368  const NvMediaBitstreamBuffer *bitstreams,
369  uint32_t flags
370 );
371 
419  NvMediaIJPD *decoder,
420  NvMediaImage *output,
421  uint8_t downscaleLog2,
422  uint32_t numBitstreamBuffers,
423  const NvMediaBitstreamBuffer *bitstreams,
424  uint32_t flags
425 );
426 
427 /*
428  * \defgroup history_nvmedia_ijpd History
429  * Provides change history for the NvMedia Image Jpeg Decode API.
430  *
431  * \section history_nvmedia_ijpd Version History
432  *
433  * <b> Version 1.0 </b> November 9, 2015
434  * - Initial release
435  *
436  * <b> Version 1.1 </b> May 11, 2016
437  * - Added \ref NvMediaIJPDCheckVersion API
438  *
439  * <b> Version 1.2 </b> May 15, 2017
440  * - Added \ref NvMediaIJPDGetVersion API to get the version of NvMedia IJPD library
441  * - NvMediaIJPDCheckVersion is deprecated. Use NvMediaIJPDGetVersion() instead
442  * - All NvMedia data types are moved to standard data types
443  *
444  * <b> Version 1.3 </b> October 5, 2017
445  * - Added \ref NvMediaJPEGAppMarkerInfo to store the App info.
446  */
447 
450 #ifdef __cplusplus
451 }; /* extern "C" */
452 #endif
453 
454 #endif /* _NVMEDIA_IJPD_H */
A handle representing image objects.
Definition: nvmedia_image.h:75
Holds image JPEG decoder marker Info.
Definition: nvmedia_ijpd.h:101
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:125
uint16_t height
Specifies the stream-encoded height, in pixels.
Definition: nvmedia_ijpd.h:122
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:143
uint8_t supportPartialAccel
Flag indicates support partial acceleration or not.
Definition: nvmedia_ijpd.h:147
Holds NvMedia Version information.
Definition: nvmedia_core.h:252
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:123
uint32_t maxBitstreamBytes
Max size in bytes of JPEG bitstream supported.
Definition: nvmedia_ijpd.h:145
NvMediaStatus
The set of all possible error codes.
Definition: nvmedia_core.h:199
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:116
uint8_t num_app_markers
Specifies the number of App merkers in the stream.
Definition: nvmedia_ijpd.h:128
void * pMarker
Specifies the App info marker data.
Definition: nvmedia_ijpd.h:110
int uint32_t uint32_t uint32_t const uint32_t const uint32_t const uint32_t const uint64_t uint32_t uint32_t flags
Holds a rectangular region of a surface.
Definition: nvmedia_core.h:146
#define NVMEDIA_MAX_JPEG_APP_MARKERS
JPEG decode max number of app markers supported.
Definition: nvmedia_ijpd.h:82
uint16_t marker
Specifies the App info marker.
Definition: nvmedia_ijpd.h:104
void NvMediaDevice
An opaque handle representing a NvMediaDevice object.
Definition: nvmedia_core.h:305
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:87
uint16_t len
Specifies the App info marker length.
Definition: nvmedia_ijpd.h:107
NvMediaColorStandard colorStandard
Specifies the color standard, defined in NvMediaColorStandard.
Definition: nvmedia_ijpd.h:91
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:119
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:141
Holds information for decoding a JPEG stream into an image surface.
Definition: nvmedia_ijpd.h:139
uint32_t alphaValue
Specifies the alpha value.
Definition: nvmedia_ijpd.h:95