Libargus API
Libargus Camera API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ReprocessInfo.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2022, 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 
29 /**
30  * @file
31  * <b>Libargus Extension: Reprocessing Information API</b>
32  *
33  * @b Description: This file defines the ReprocessInfo.
34  */
35 
36 #ifndef _ARGUS_REPROCESS_INFO_H
37 #define _ARGUS_REPROCESS_INFO_H
38 
39 namespace Argus
40 {
41 
42 /**
43  * @class IReprocessInfo
44  *
45  * Interface used to access reprocess information.
46  * ReprocessInfo are used to set and access the reprocessing information to run
47  * camera using a user provided raw buffer instead of physical camera sensor.
48  *
49  * @ingroup ArgusCameraDevice ArgusExtReprocessInfo
50  */
51 DEFINE_UUID(InterfaceID, IID_REPROCESS_INFO, dbf2b0b0,7f71,11ec,bf44,08,00,20,0c,9a,66);
52 class IReprocessInfo : public Interface
53 {
54 public:
55  static const InterfaceID& id() { return IID_REPROCESS_INFO; }
56 
57  /**
58  * Enable the libargus to run in resprocessing mode.
59  * @param[in] enable The enable flag to set the reprocesisng mode.
60  *
61  * @returns success/status of the call.
62  */
63  virtual Status setReprocessingEnable(const bool enable) = 0;
64  virtual bool getReprocessingEnable() const = 0;
65 
66  /**
67  * Sets the resolution of reprocessing sensor mode.
68  * @param[in] resolution The resolution of reprocessing sensor mode.
69  *
70  * @returns success/status of the call.
71  */
72  virtual Status setReprocessingModeResolution(const Size2D<uint32_t>& resolution) = 0;
74 
75  /**
76  * Sets the scaling for reprocessing sensor mode.
77  * @param[in] scaling The scaling in x and y direction.
78  *
79  * @returns success/status of the call.
80  */
81  virtual Status setReprocessingModeScaling(const Point2D<float>& scaling) = 0;
82  virtual Point2D<float> getReprocessingModeScaling() const = 0;
83 
84  /**
85  * Sets the crop rectange for the reprocessing sensor mode.
86  * @param[in] crop The crop rectange for the sensor mode, describing top, left, bottom, down
87  * coordinates, origin is top left corner of the image.
88  *
89  * @returns success/status of the call.
90  */
91  virtual Status setReprocessingModeCrop(const Rectangle<float>& crop) = 0;
92  virtual Rectangle<float> getReprocessingModeCrop() const = 0;
93 
94  /**
95  * Sets the frame rate for the reprocessing sensor mode.
96  * @param[in] framerate The framerate value that will be utilized to decide the output stream
97  * framerate.
98  *
99  * @returns success/status of the call.
100  */
101  virtual Status setReprocessingModeFrameRate(const float framerate) = 0;
102  virtual float getReprocessingModeFrameRate() const = 0;
103 
104  /**
105  * Sets the bayer phase for the reprocessing sensor mode.
106  * @param[in] phase The phase of the raw input data (see Argus::BayerPhase).
107  *
108  * @returns success/status of the call.
109  */
110  virtual Status setReprocessingModeColorFormat(const BayerPhase& phase) = 0;
111  virtual BayerPhase getReprocessingModeColorFormat() const = 0;
112 
113  /**
114  * Sets the pixel bit depth for the reprocessing sensor mode. This is the bit depth of raw byaer
115  * data. For PWL HDR raw data it is the pixel bit depth of PWL companded raw data. For DOL raw
116  * data, it the pixel bit depth of individual exposure plane.
117  * @param[in] pixelBitDepth The pixelBitDepth is the number of bits used to represent a pixel.
118  *
119  * @returns success/status of the call.
120  */
121  virtual Status setReprocessingModePixelBitDepth(const uint32_t pixelBitDepth) = 0;
122  virtual uint32_t getReprocessingModePixelBitDepth() const = 0;
123 
124  /**
125  * Sets the total pixel total bit depth for the reprocessing sensor mode after
126  * decompanding or merging of individual exposure planes incase of PWL HDR or DOL HDR raw data
127  * respectively. In case of standard dynamic range raw data it will be equal to pixelBitDepth.
128  *
129  * @param[in] dynamicPixelBitDepth The dynamicPixelBitDepth of raw sensor data.
130  *
131  * @returns success/status of the call.
132  */
133  virtual Status setReprocessingModeDynamicPixelBitDepth(const uint32_t dynamicPixelBitDepth) = 0;
134  virtual uint32_t getReprocessingModeDynamicPixelBitDepth() const = 0;
135 
136 protected:
138 
139 };
140 
141 } // namespace Argus
142 
143 #endif // _ARGUS_REPROCESS_INFO_H
144