TIOVX User Guide
tivx_ext_raw_image.h
Go to the documentation of this file.
1 /*
2 *
3 * Copyright (c) 2018 Texas Instruments Incorporated
4 *
5 * All rights reserved not granted herein.
6 *
7 * Limited License.
8 *
9 * Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive
10 * license under copyrights and patents it now or hereafter owns or controls to make,
11 * have made, use, import, offer to sell and sell ("Utilize") this software subject to the
12 * terms herein. With respect to the foregoing patent license, such license is granted
13 * solely to the extent that any such patent is necessary to Utilize the software alone.
14 * The patent license shall not apply to any combinations which include this software,
15 * other than combinations with devices manufactured by or for TI ("TI Devices").
16 * No hardware patent is licensed hereunder.
17 *
18 * Redistributions must preserve existing copyright notices and reproduce this license
19 * (including the above copyright notice and the disclaimer and (if applicable) source
20 * code license limitations below) in the documentation and/or other materials provided
21 * with the distribution
22 *
23 * Redistribution and use in binary form, without modification, are permitted provided
24 * that the following conditions are met:
25 *
26 * * No reverse engineering, decompilation, or disassembly of this software is
27 * permitted with respect to any software provided in binary form.
28 *
29 * * any redistribution and use are licensed by TI for use only with TI Devices.
30 *
31 * * Nothing shall obligate TI to provide you with source code for the software
32 * licensed and provided to you in object code.
33 *
34 * If software source code is provided to you, modification and redistribution of the
35 * source code are permitted provided that the following conditions are met:
36 *
37 * * any redistribution and use of the source code, including any resulting derivative
38 * works, are licensed by TI for use only with TI Devices.
39 *
40 * * any redistribution and use of any object code compiled from the source code
41 * and any resulting derivative works, are licensed by TI for use only with TI Devices.
42 *
43 * Neither the name of Texas Instruments Incorporated nor the names of its suppliers
44 *
45 * may be used to endorse or promote products derived from this software without
46 * specific prior written permission.
47 *
48 * DISCLAIMER.
49 *
50 * THIS SOFTWARE IS PROVIDED BY TI AND TI'S LICENSORS "AS IS" AND ANY EXPRESS
51 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
52 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
53 * IN NO EVENT SHALL TI AND TI'S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT,
54 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
55 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
56 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
57 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
58 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
59 * OF THE POSSIBILITY OF SUCH DAMAGE.
60 *
61 */
62 #ifndef TIVX_EXT_RAW_IMAGE_H_
63 #define TIVX_EXT_RAW_IMAGE_H_
64 
76 #define TIVX_RAW_IMAGE "tivx_raw_image"
77 
78 #include <VX/vx.h>
79 
80 #ifdef __cplusplus
81 extern "C" {
82 #endif
83 
87 #define TIVX_TYPE_RAW_IMAGE 0x817
93 #define TIVX_ENUM_RAW_IMAGE_BUFFER_ACCESS (vx_enum)0x0
94 #define TIVX_ENUM_RAW_IMAGE_PIXEL_CONTAINER (vx_enum)0x1
99 #define TIVX_RAW_IMAGE_MAX_EXPOSURES 3
100 
104 typedef struct _tivx_raw_image * tivx_raw_image;
105 
109 typedef struct _tivx_raw_image_format_t {
111  volatile vx_uint32 msb;
113 
117 typedef struct _tivx_raw_image_create_params_t {
118  volatile vx_uint32 width;
119  volatile vx_uint32 height;
134 
155 };
156 
169 };
170 
181 };
182 
198 
210 
227 VX_API_ENTRY vx_status VX_API_CALL tivxQueryRawImage (tivx_raw_image raw_image,
228  vx_enum attribute,
229  volatile void *ptr,
230  vx_size size);
231 
275  const vx_rectangle_t *rect,
276  vx_uint32 exposure_index,
277  const vx_imagepatch_addressing_t *user_addr,
278  void * user_ptr,
279  vx_enum usage,
280  vx_enum mem_type,
281  vx_enum buffer_select);
282 
340  const vx_rectangle_t *rect,
341  vx_uint32 exposure_index,
342  vx_map_id *map_id,
344  void **user_ptr,
345  vx_enum usage,
346  vx_enum mem_type,
347  vx_enum buffer_select);
348 
349 
366  vx_map_id map_id);
367 
368 #ifdef __cplusplus
369 }
370 #endif
371 
372 #endif
For accessing pointer to meta buffer only.
vx_bool
Queries an image for its width. Read-only. Use a vx_uint32 parameter.
Queries an image for its format (see tivx_raw_image_format_t). Read-only. Use a pointer to a tivx_raw...
#define TIVX_TYPE_RAW_IMAGE
The object type enumeration for raw images.
VX_API_ENTRY vx_status VX_API_CALL tivxCopyRawImagePatch(tivx_raw_image raw_image, const vx_rectangle_t *rect, vx_uint32 exposure_index, const vx_imagepatch_addressing_t *user_addr, void *user_ptr, vx_enum usage, vx_enum mem_type, vx_enum buffer_select)
Allows the application to copy a rectangular patch from/into a raw image object exposure.
size_t vx_size
volatile vx_uint32 msb
Most significant bit in pixel container.
int32_t vx_enum
volatile vx_uint32 num_exposures
The number of exposures contained in the sensor readout for a given timestamp. Max supported is TIVX_...
For accessing pointer to full allocated buffer (pixel buffer + meta buffer).
Queries an image for if its exposures are line interleaved in memory. Read-only. Use a vx_bool parame...
struct _tivx_raw_image * tivx_raw_image
The Raw Image Object. Raw Image is a strongly-typed container for RAW sensor images.
volatile vx_uint32 meta_height_after
Number of lines of meta data at bottom of sensor readout (after pixel data) (uses the same width as o...
VX_API_ENTRY vx_status VX_API_CALL tivxQueryRawImage(tivx_raw_image raw_image, vx_enum attribute, volatile void *ptr, vx_size size)
Queries the raw image for some specific information.
For accessing pointer to meta buffer only.
tivx_raw_image_pixel_container_e
The raw image pixel container enum.
VX_ID_TI
vx_enum vx_status
#define VX_ENUM_BASE(vendor, id)
volatile vx_bool line_interleaved
A value of vx_true_e indicates that the exposures are line interleaved in a single contiguous buffer...
struct _vx_context * vx_context
Packed 12 bit mode; Three bytes per two pixels in memory.
tivx_raw_image_attribute_e
The raw image attributes.
The raw image format structure that is given to the tivxCreateRawImage function.
volatile vx_uint32 pixel_container
Pixel Container, see tivx_raw_image_pixel_container_e.
Two bytes per pixel in memory.
#define VX_ATTRIBUTE_BASE(vendor, object)
volatile vx_uint32 meta_height_before
Number of lines of meta data at top of sensor readout (before pixel data) (uses the same width as ori...
Queries an image for its number of exposures. Read-only. Use a vx_uint32 parameter.
volatile vx_uint32 height
The image height in lines (not including meta rows).
Queries an image for its meta height at bottom of readout. Read-only. Use a vx_uint32 parameter...
#define TIVX_ENUM_RAW_IMAGE_PIXEL_CONTAINER
A tivx_raw_image_pixel_container_e.
VX_API_ENTRY vx_status VX_API_CALL tivxMapRawImagePatch(tivx_raw_image raw_image, const vx_rectangle_t *rect, vx_uint32 exposure_index, vx_map_id *map_id, vx_imagepatch_addressing_t *addr, void **user_ptr, vx_enum usage, vx_enum mem_type, vx_enum buffer_select)
Allows the application to get direct access to a rectangular patch of a raw image object exposure...
Queries an image for its meta height at top of readout. Read-only. Use a vx_uint32 parameter...
#define TIVX_RAW_IMAGE_MAX_EXPOSURES
Maximum number of RAW image exposures that can be contained in a raw image object.
Queries an image for its addressing structure. Read-only. Use a vx_imagepatch_addressing_t[TIVX_RAW_I...
VX_API_ENTRY vx_status VX_API_CALL tivxUnmapRawImagePatch(tivx_raw_image raw_image, vx_map_id map_id)
Unmap and commit potential changes to a raw image object patch that were previously mapped...
uint32_t vx_uint32
tivx_raw_image_buffer_access_e
The raw image buffer access enum.
VX_API_ENTRY vx_status VX_API_CALL tivxReleaseRawImage(tivx_raw_image *raw_image)
Releases a reference of a raw image. The object may not be garbage collected until its total referenc...
volatile vx_uint32 width
The image width in pixels.
#define TIVX_ENUM_RAW_IMAGE_BUFFER_ACCESS
The enum type enumeration for raw images.
The raw image create params structure that is given to the tivxCreateRawImage function.
uintptr_t vx_map_id
Queries an image for its height. Read-only. Use a vx_uint32 parameter.
vx_status(* VX_API_CALL)(vx_reference *ref)
Callback type used to register release callbacks from object derived from references.
Definition: vx_reference.h:56
For accessing pointer to pixel buffer only.
One byte per pixel in memory.
VX_API_ENTRY tivx_raw_image VX_API_CALL tivxCreateRawImage(vx_context context, tivx_raw_image_create_params_t *params)
Creates an opaque reference to a raw sensor image (including multi-exposure and metadata).