Jetson Linux API 参考文档

32.7.4 版本
NvJpegDecoder.h
前往此文件的文档。
1 /*
2  * 版权所有 (c) 2016-2018, NVIDIA CORPORATION。保留所有权利。
3  *
4  * 只要满足以下条件,就允许以源代码和二进制形式重新分发和使用,无论是否
5  * 进行修改:
6  * 是满足:
7  * * 源代码的重新分发必须保留上述版权
8  * 声明、此条件列表以及以下免责声明。
9  * * 二进制形式的重新分发必须在上述版权
10  * 声明、此条件列表以及以下免责声明中再现
11  * 文档和/或随发行版提供的其他材料。
12  * * 未经事先书面许可,不得使用 NVIDIA CORPORATION 的名称或其
13  * 贡献者的姓名来认可或推广衍生产品
14  * 来自本软件。
15  *
16  * 本软件由版权所有者“按原样”提供,并且任何明示或暗示的
17  * 保修,包括但不限于
18  * 对适销性和特定用途适用性的默示保证
19  * 均不承担责任。在任何情况下,版权所有者或
20  * 贡献者均不对任何直接、间接、附带、特殊、
21  * 惩戒性或后果性损害(包括但不限于
22  * 采购替代商品或服务;使用、数据或
23  * 利润损失;或业务中断)承担任何责任,无论因何种原因以及基于何种理论
24  * 的责任,无论是合同、严格责任还是侵权行为
25  * (包括疏忽或其他原因)以任何方式因使用而引起
26  * 本软件,即使已被告知可能发生此类损害。
27  */
28 
36 #ifndef __NV_JPEG_DECODER_H__
37 #define __NV_JPEG_DECODER_H__
38 
50 #ifndef TEGRA_ACCELERATE
51 
55 #define TEGRA_ACCELERATE
56 #endif
57 
58 #include <stdio.h>
59 #include "jpeglib.h"
60 #include "NvElement.h"
61 #include "NvBuffer.h"
62 
63 #ifndef MAX_CHANNELS
64 
68 #define MAX_CHANNELS 3
69 #endif
70 
87 {
88 public
95  static NvJPEGDecoder *createJPEGDecoder(const char *comp_name);
97 
117  int decodeToFd(int &fd,
118  unsigned char *in_buf, unsigned long in_buf_size,
119  uint32_t &pixfmt, uint32_t &width, uint32_t &height);
146  int decodeToBuffer(NvBuffer ** buffer,
147  unsigned char *in_buf, unsigned long in_buf_size,
148  uint32_t *pixfmt, uint32_t *width, uint32_t *height);
149 
150 private
151 
152  NvJPEGDecoder(const char *comp_name);
153  void decodeIndirect(NvBuffer *out_buf, uint32_t pixel_format);
154  void decodeDirect(NvBuffer *out_buf, uint32_t pixel_format);
155  struct jpeg_decompress_struct cinfo;
156  struct jpeg_error_mgr jerr;
157 
158  static const NvElementProfiler::ProfilerField valid_fields =
161 };
163 #endif
NvJPEGDecoder::createJPEGDecoder
static NvJPEGDecoder * createJPEGDecoder(const char *comp_name)
创建一个名为 comp_name 的新 JPEG 解码器。
NvJPEGDecoder
使用 libjpeg API 解码 JPEG 图像的辅助类。
Definition: NvJpegDecoder.h:86
NvElement::comp_name
const char * comp_name
指定组件的名称,用于调试。
Definition: NvElement.h:122
NvElementProfiler::ProfilerField
int ProfilerField
Definition: NvElementProfiler.h:79
NvJPEGDecoder::decodeToFd
int decodeToFd(int &fd, unsigned char *in_buf, unsigned long in_buf_size, uint32_t &pixfmt, uint32_t &width, uint32_t &height)
将 JPEG 图像解码到硬件缓冲区内存。
NvElementProfiler::PROFILER_FIELD_LATENCIES
static const ProfilerField PROFILER_FIELD_LATENCIES
Definition: NvElementProfiler.h:83
NvJPEGDecoder::decodeToBuffer
int decodeToBuffer(NvBuffer **buffer, unsigned char *in_buf, unsigned long in_buf_size, uint32_t *pixfmt, uint32_t *width, uint32_t *height)
将 JPEG 图像解码到软件缓冲区内存。
NvElement
每个元素都有一个唯一的名称,可用于在调试日志中识别元素。
Definition: NvElement.h:63
NvElementProfiler::PROFILER_FIELD_TOTAL_UNITS
static const ProfilerField PROFILER_FIELD_TOTAL_UNITS
Definition: NvElementProfiler.h:81
NvBuffer.h
NvJPEGDecoder::~NvJPEGDecoder
~NvJPEGDecoder()
NvElement.h
NvBuffer
表示缓冲区的类。
Definition: NvBuffer.h:85
. All rights reserved.