hi_tde_pattern_fill

The Atlas 200/300/500 Inference Product does not support this API.

The Atlas Training Series Product does not support this API.

Description

Adds the mode filling command to a specified TDE job. Currently, only the Alpha Blending operation is supported.

Mode filling: After the foreground bitmap and background bitmap are input, the operation areas of the foreground bitmap and background bitmap are tiled in the operation area of the background bitmap after additional computation. If the operation area of the foreground bitmap is larger than that of the background bitmap, the foreground bitmap is automatically cropped.

Alpha Blending: Combines the foreground color and background color to obtain a new mixed color by computing the mixed color after the foreground color and background color overlap. The transparency of the foreground color is not limited. If the foreground color is completely transparent, the blended color is the background color. If the foreground color is completely opaque, the blended color is the foreground color. If the transparency is between (0, 1), the blended color needs to be calculated by using the weighting formula of the foreground color and background color. The blending calculation must use the straight Alpha color value. The following shows blending examples of the foreground color and background color.

Restrictions

  • Before calling this API, call hi_tde_open to open the TDE device and call hi_tde_begin_job to obtain a valid job handle.
  • The area size, length, and width range is [1, 4096]. The width range of the foreground bitmap is [1, 256], and the height range is [1, 4096].
  • If the operation area of the foreground bitmap is larger than that of the destination bitmap, the foreground bitmap is automatically cropped. If the operation area of the foreground bitmap is larger than that of the background bitmap, the foreground bitmap is automatically cropped.
  • The length and width of the operation area of the background bitmap must be the same as those of the operation area of the destination bitmap.
  • Scaling is not supported for this operation.
  • The operation area must have a common area with the specified bitmap. Otherwise, an error code is returned.
  • Currently, only the ARGB8888 format is supported.
  • This API does not support multiple processes.

Prototype

hi_s32 hi_tde_pattern_fill(hi_s32 handle, const hi_tde_double_src *double_src, const hi_tde_pattern_fill_opt *fill_opt)

Parameters

Parameter

Input/Output

Description

handle

Input

Handle to a TDE job.

double_src

Input

Defines the information about the dual-source bitmap area and destination bitmap area.

fill_opt

Input

Additional operation. Only Alpha Bending is supported now.

Returns