hbVPStitch
A data structure describing the position of a point. hbVPStitch needs to prepare hbVPPoint describing the position of the src source map on the target map for the execution of the stitch task before the creation of the task is performed on it.
-
Member
The API for calling the alpha-blend lut table for creating a Stitch.
- Parameter
- [out]
alphaBlendLutHandle pointing to lut table information with stitch alpha-blend lut table information, the parameter must be initialized to nullptr. - [in]
alphaDatasMemory for the lut table, passed in by the user. - [in]
alphaBlendRegionsArea coordinates for alpha-blend are needed in the dst layer. A single roi is supported to the maximum width of 2000 and the maximum height of 2000. - [in]
alphaBlendRegionNumThe number of regions that need to be alpha-blended in the dst layer.
- [out]
- Return Value
- Return
0means the API was successfully executed, otherwise the execution failed.
- Return
- The alpha-blend lut table is a coefficient that operates on each pixel, and by configuring the lut table, arbitrary blending effects can be realized for two pictures;
- The alpha value in the alpha-blend lut table will be assigned to the specified src map according to the order in which src is given into it. src order is: src0, src1; then the alpha value in the blend-reg region belongs to src0 and (255-alpha) belongs to src1; as follows:
The API for calling to release Stitch's alpha-blend lut table.
- Parameter
- [in]
alphaBlendLutA handle to the lut table information.
- [in]
- Return Value
- Return
0means the API was successfully executed, otherwise the execution failed.
- Return
The API for calling to Stitch.
- In the operator, the position of the source graph on the target graph is only needed to provide the x and y coordinates, and the values of w and h will be obtained from the src.
- Call once hbVPStitch interface can not achieve the results of the overlapping region of the fusion of the three maps (for example, you want to overlap the region to achieve the effect of src0 20%, src1 30%, src2 50% splicing), you need to execute the hbVPStitch interface many times.
- Stitch interface, the call supports maximum four input src maps at a time, internally it will first stitch the src maps to the specified region.
- If the stitched image is in nv12 format, the x and y coordinates specified by the dstPoses parameter, as well as the width and height of the stitched image, must be even numbers.
- The overlapping area cannot exceed the range of the dst layer.
- Parameter
- [out]
taskHandleTask handles are responsible for the interaction of the operator with the UCP architecture. - [out]
dstImgOutput picture. - [in]
srcImgsInput picture array. - [in]
dstPosesAn array of coordinates of the input picture on the output picture starting point, the number and order of the points need to be the same as the input picture. - [in]
srcImgCountThe number of input pictures. - [in]
alphaBlendLutThe lut table information used for splicing.
- [out]
- Return Value
- Return
0means the API was successfully executed, otherwise the execution failed.
- Return
- Description of interface limitations
dstImg: type supports U8C1, format supports Y and nv12. dst picture's width supports 3840 at maximum, 16 at minimum; height supports 3840 at maximum, 2 at minimum. The width and stride must be aligned to 16 bytes, and the stride must be within the range of [ALIGNED_16(width), 3840].srcImgs: type supports U8C1, format supports Y and nv12, and the type and format need to be the same as the output picture, support the maximum four input pictures src. The width of the image supports the maximum of 2000 and the minimum of 16; the height of the image supports the maximum of 2000 and the minimum of 2. The width and stride must be aligned to 16 bytes, and the stride must be within the range of [ALIGNED_16(width), 2000].
- Instructions for use
When using less than or equal to two src graphs to do stitching:
- pipline process (src0—copy,src1-copy).
1). First, it will paste src0 onto the dst layer.
2). Then paste src1 onto the dst layer.
3). Since the overlapping regions do not need to be blended, the overlapping regions are covered by the region of src1 in pipline order.

- pipline process (src0—copy,src1-copy ,src0-src1-blend).
1). First, it will paste src0 onto the dst layer.
2). Then paste src1 onto the dst layer.
3). Since there are overlapping areas and the overlapping areas require a blend operation, overwrite the overlapped area as the result of blending the area specified by src0 and src1.

When using greater than two src graphs to do stitching:
- pipline process (src0—copy, src1-copy, src2-copy, src0-src1-blend).
1). First, it will paste src0 onto the dst layer.。
2). Next, paste src1 onto the dst layer.
3). Then paste src2 onto the dst layer.
4). Finally, since there are overlapping regions and the overlapping regions need to perform a blend operation to overwrite the overlapping regions as the result of blending the regions specified by src0 and src1.

- pipline process (src0—copy,src1-copy,src2-copy,src0-src1-blend,src0-src2-blend).
Call once the interface does not support, because the stitch is according to the pipline process order refresh mechanism, can not be done at once pipline to complete the fusion of the three map results show ( for example, if you want to overlap the region to achieve the effect of src0 20%, src1 30%, src2 50% splicing). There are internal judgment mechanisms that will intercept and report errors for the above scenarios.
Correct approach (split into two pipline executions):
pipline0 process (src0—copy,src1-copy, src0-src1-blend).
1). First, it will paste src0 onto the dst layer.
2). Next, paste src1 onto the dst layer.
3). Finally, since there are overlapping regions and the overlapping regions need to perform a blend operation to overwrite the overlapping regions as the result of blending the regions specified by src0 and src1.

pipline1 process (src3-copy,src2-copy,src3-src2-blend).
1). First, it will paste src3 onto the dst layer.。
2). Next, paste src2 onto the dst layer.
3). src3 and src2 have overlapping areas, and the overlapping areas need to perform a blend operation to overwrite the overlapping areas as the result of blending the specified areas of src3 and src2.

