L4T Multimedia API Reference

32.1 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NvVideoConverter.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * * Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * * Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  * * Neither the name of NVIDIA CORPORATION nor the names of its
13  * contributors may be used to endorse or promote products derived
14  * from this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
17  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
24  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28 
46 #ifndef __NV_VIDEO_CONVERTER_H__
47 #define __NV_VIDEO_CONVERTER_H__
48 
49 #include "NvV4l2Element.h"
50 
65 {
66 public:
67 
82  static NvVideoConverter *createVideoConverter(const char *name, int flags = 0);
83 
97  int setCapturePlaneFormat(uint32_t pixfmt, uint32_t width, uint32_t height,
98  enum v4l2_nv_buffer_layout type);
111  int setOutputPlaneFormat(uint32_t pixfmt, uint32_t width, uint32_t height,
112  enum v4l2_nv_buffer_layout type);
113 
126 
139 
153 
165  int setFlipMethod(enum v4l2_flip_method method);
166 
179  int setTnrAlgorithm(enum v4l2_tnr_algorithm algorithm);
180 
193  int setYUVRescale(enum v4l2_yuv_rescale_method method);
194 
208  int setCropRect(uint32_t left, uint32_t top, uint32_t width,
209  uint32_t height);
210 
224  int setDestRect(uint32_t left, uint32_t top, uint32_t width,
225  uint32_t height);
226 
234  int waitForIdle(uint32_t max_wait_ms);
235 
236 private:
240  NvVideoConverter(const char *name, int flags);
241 
242  static const NvElementProfiler::ProfilerField valid_fields =
246 };
248 #endif
v4l2_nv_buffer_layout
Enum specifying types of buffer layouts.
int setDestRect(uint32_t left, uint32_t top, uint32_t width, uint32_t height)
Sets the destnation rectangle for the converter.
NVIDIA Multimedia API: V4L2 Helper Class
v4l2_tnr_algorithm
Specifies the types of TNR algorithms.
Defines a helper class for V4L2 based components.
Definition: NvV4l2Element.h:65
static const ProfilerField PROFILER_FIELD_FPS
static const ProfilerField PROFILER_FIELD_TOTAL_UNITS
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.
v4l2_yuv_rescale_method
Specifies the types of YUV rescale methods.
int setFlipMethod(enum v4l2_flip_method method)
Sets the flip method.
v4l2_interpolation_method
Specifies the types of interpolation methods.
Defines a helper class for V4L2 Video Converter.
int setCapturePlaneBufferLayout(enum v4l2_nv_buffer_layout type)
Sets the buffer layout of the capture plane buffers.
int waitForIdle(uint32_t max_wait_ms)
Waits until all buffers queued on the output plane are converted and dequeued from the capture plane...
static NvVideoConverter * createVideoConverter(const char *name, int flags=0)
Creates a new V4L2 Video Converter object named name.
v4l2_flip_method
Specifies the types of rotation/flip algorithms.
int setTnrAlgorithm(enum v4l2_tnr_algorithm algorithm)
Sets the TNR(Temporal Noise Reduction) algorithm to use.
int setYUVRescale(enum v4l2_yuv_rescale_method method)
Sets the YUV Rescale method to use.
int setCropRect(uint32_t left, uint32_t top, uint32_t width, uint32_t height)
Set the cropping rectangle for the converter.
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.
int setOutputPlaneBufferLayout(enum v4l2_nv_buffer_layout type)
Sets the buffer layout of the output plane buffers.
int setInterpolationMethod(enum v4l2_interpolation_method method)
Sets the interpolation(filter) method used for scaling.
static const ProfilerField PROFILER_FIELD_LATENCIES