Jetson Linux API Reference

35.1 Release
NvVideoConverter.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
3  * NVIDIA CORPORATION and its licensors retain all intellectual property
4  * and proprietary rights in and to this software, related documentation
5  * and any modifications thereto. Any use, reproduction, disclosure or
6  * distribution of this software and related documentation without an express
7  * license agreement from NVIDIA CORPORATION is strictly prohibited.
8  */
9 
27 #ifndef __NV_VIDEO_CONVERTER_H__
28 #define __NV_VIDEO_CONVERTER_H__
29 
30 #include "NvV4l2Element.h"
31 
46 {
47 public:
62  static NvVideoConverter *createVideoConverter(const char *name, int flags = 0);
63 
77  int setCapturePlaneFormat(uint32_t pixfmt, uint32_t width, uint32_t height,
78  enum v4l2_nv_buffer_layout type);
91  int setOutputPlaneFormat(uint32_t pixfmt, uint32_t width, uint32_t height,
92  enum v4l2_nv_buffer_layout type);
93 
106 
119 
133 
145  int setFlipMethod(enum v4l2_flip_method method);
146 
159  int setTnrAlgorithm(enum v4l2_tnr_algorithm algorithm);
160 
173  int setYUVRescale(enum v4l2_yuv_rescale_method method);
174 
188  int setCropRect(uint32_t left, uint32_t top, uint32_t width,
189  uint32_t height);
190 
204  int setDestRect(uint32_t left, uint32_t top, uint32_t width,
205  uint32_t height);
206 
214  int waitForIdle(uint32_t max_wait_ms);
215 
216 private:
220  NvVideoConverter(const char *name, int flags);
221 
222  static const NvElementProfiler::ProfilerField valid_fields =
226 };
228 #endif
NvV4l2Element
Defines a helper class for V4L2 based components.
Definition: NvV4l2Element.h:65
v4l2_nv_buffer_layout
v4l2_nv_buffer_layout
Enum specifying types of buffer layouts.
Definition: v4l2_nv_extensions.h:2557
NvVideoConverter::setCropRect
int setCropRect(uint32_t left, uint32_t top, uint32_t width, uint32_t height)
Set the cropping rectangle for the converter.
NvVideoConverter::setInterpolationMethod
int setInterpolationMethod(enum v4l2_interpolation_method method)
Sets the interpolation(filter) method used for scaling.
v4l2_tnr_algorithm
v4l2_tnr_algorithm
Specifies the types of TNR algorithms.
Definition: v4l2_nv_extensions.h:2591
NvVideoConverter::setFlipMethod
int setFlipMethod(enum v4l2_flip_method method)
Sets the flip method.
NvVideoConverter::~NvVideoConverter
~NvVideoConverter()
NvVideoConverter::setDestRect
int setDestRect(uint32_t left, uint32_t top, uint32_t width, uint32_t height)
Sets the destnation rectangle for the converter.
NvElementProfiler::ProfilerField
int ProfilerField
Definition: NvElementProfiler.h:79
NvVideoConverter::setTnrAlgorithm
int setTnrAlgorithm(enum v4l2_tnr_algorithm algorithm)
Sets the TNR(Temporal Noise Reduction) algorithm to use.
NvVideoConverter::createVideoConverter
static NvVideoConverter * createVideoConverter(const char *name, int flags=0)
Creates a new V4L2 Video Converter object named name.
NvVideoConverter
Defines a helper class for V4L2 Video Converter.
Definition: NvVideoConverter.h:45
NvVideoConverter::waitForIdle
int waitForIdle(uint32_t max_wait_ms)
Waits until all buffers queued on the output plane are converted and dequeued from the capture plane.
NvVideoConverter::setOutputPlaneFormat
int setOutputPlaneFormat(uint32_t pixfmt, uint32_t width, uint32_t height, enum v4l2_nv_buffer_layout type)
Sets the format on the converter output plane.
NvVideoConverter::setCapturePlaneBufferLayout
int setCapturePlaneBufferLayout(enum v4l2_nv_buffer_layout type)
Sets the buffer layout of the capture plane buffers.
NvVideoConverter::setOutputPlaneBufferLayout
int setOutputPlaneBufferLayout(enum v4l2_nv_buffer_layout type)
Sets the buffer layout of the output plane buffers.
v4l2_yuv_rescale_method
v4l2_yuv_rescale_method
Specifies the types of YUV rescale methods.
Definition: v4l2_nv_extensions.h:2604
NvElementProfiler::PROFILER_FIELD_LATENCIES
static const ProfilerField PROFILER_FIELD_LATENCIES
Definition: NvElementProfiler.h:83
v4l2_interpolation_method
v4l2_interpolation_method
Specifies the types of interpolation methods.
Definition: v4l2_nv_extensions.h:2579
NvElementProfiler::PROFILER_FIELD_FPS
static const ProfilerField PROFILER_FIELD_FPS
Definition: NvElementProfiler.h:84
NvVideoConverter::setYUVRescale
int setYUVRescale(enum v4l2_yuv_rescale_method method)
Sets the YUV Rescale method to use.
NvV4l2Element.h
NvElementProfiler::PROFILER_FIELD_TOTAL_UNITS
static const ProfilerField PROFILER_FIELD_TOTAL_UNITS
Definition: NvElementProfiler.h:81
v4l2_flip_method
v4l2_flip_method
Specifies the types of rotation/flip algorithms.
Definition: v4l2_nv_extensions.h:2565
NvVideoConverter::setCapturePlaneFormat
int setCapturePlaneFormat(uint32_t pixfmt, uint32_t width, uint32_t height, enum v4l2_nv_buffer_layout type)
Sets the format on the converter output plane.