VPC Restrictions

Resolution Restrictions

Input image resolution range

10 × 6 to 8192 × 8192

The APIs for implementing VPC functions have different resolution requirements. For details, see the API descriptions in VPC. When the input image format is YUV440SP or YUV440P, the maximum width of the image is 4096.

Output image resolution range

Model

Resolution Range

Atlas inference products

Atlas training products

10 × 6 to 4096 × 4096

Atlas A3 training products / Atlas A3 inference products

Atlas A2 training products / Atlas A2 inference products

Atlas 200I/500 A2 inference products

10 × 6 to 4096 × 8192

Restrictions on Image Formats, Width and Height Alignment, and Buffers

During image processing by VPC, acldvppMalloc and acldvppFree are called to allocate and free the input and output buffers on the device. The buffer lifetime is managed by the user.

For details about the image format definition, see acldvppPixelFormat. For details about the concepts such as width stride, height stride, and 8K, see Terminology.

For details about the restrictions on the image formats and width and height alignment, see Table 7 and Table 8. For details about the input image formats supported in the 8K scenario, see Table 9.

Table 1 Restrictions on input image formats, width and height alignment, and buffer size for Atlas A3 training products / Atlas A3 inference products and Atlas A2 training products / Atlas A2 inference products

Input Image Format

Input Width and Height Alignment

Input Width Stride, Height Stride, and Buffer Size

YUV400 8-bit

No alignment requirements.

Width stride: No alignment requirements. The value is the same as the width.

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride

YUV420SP NV12 8-bit

YUV420SP NV21 8-bit

Width: a multiple of 2

Height: a multiple of 2

Width stride: No alignment requirements. The value is the same as the width.

Height stride: Round up the height to the nearest multiple of 2.

Buffer size (in bytes) = Width stride × Height stride × 3/2

YUV422SP 8-bit

YVU422SP 8-bit

Width: a multiple of 2

Height: No alignment requirements.

Width stride: No alignment requirements. The value is the same as the width.

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride × 2

YUV444SP 8-bit

YVU444SP 8-bit

No alignment requirements.

Width stride: No alignment requirements. The value is the same as the width.

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride × 3

YUV422 Packed YUYV 8-bit

YUV422 Packed UYVY 8-bit

YUV422 Packed YVYU 8-bit

YUV422 Packed VYUY 8-bit

Width: a multiple of 2

Height: No alignment requirements.

Width stride = Width × 2

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride

YUV444 Packed 8-bit

RGB888

BGR888

No alignment requirements.

Width stride = Width × 3

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride

ARGB8888

ABGR8888

RGBA8888

BGRA8888

No alignment requirements.

Width stride = Width × 4

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride

YUV440SP 8-bit

YVU440SP 8-bit

Width: No alignment requirements.

Height: a multiple of 2

Width stride: No alignment requirements. The value is the same as the width.

Height stride: Round up the height to the nearest multiple of 2.

Buffer size (in bytes) = Width stride × Height stride × 2

YVU420 Planar

YUV420 Planar

Both width and height: a multiple of 2

Width stride: No alignment requirements. The value is the same as the width.

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride × 3/2

YVU422 Planar

YUV422 Planar

No alignment requirements.

Width stride: No alignment requirements. The value is the same as the width.

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride × 2

YVU444 Planar

YUV444 Planar

No alignment requirements.

Width stride: No alignment requirements. The value is the same as the width.

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride × 3

YVU444 Packed 8-bit

No alignment requirements.

Width stride: No alignment requirements. Width stride = Width × 3.

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride

YUV440 Planar

YVU440Planar

Width: No alignment requirements, but the width must be ≤ 4096.

Height: a multiple of 2

Width stride: No alignment requirements. The value is the same as the width.

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride × 2

RGB888 Planar

BGR888 Planar

No alignment requirements.

Width stride: No alignment requirements. The value is the same as the width.

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride × 3

YUV400 FP32

RGB888 FP32

BGR888 FP32

No alignment requirements.

Width stride: No alignment requirements, but the value must be the width × 3. Height stride: No alignment requirements, but the value must be the same as the height.

Buffer size (in bytes) = Width stride × Height stride

RGB888 Planar FP32

BGR888 Planar FP32

No alignment requirements.

Width stride: No alignment requirements, but the value must be the same as the width. Height stride: No alignment requirements, but the value must be the same as the height.

Buffer size (in bytes) = Width stride × Height stride × 3

Table 2 Restrictions on output image formats, width and height alignment, and buffer size for Atlas A3 training products / Atlas A3 inference products and Atlas A2 training products / Atlas A2 inference products

Output Image Format

Output Width and Height Alignment

Output Width Stride, Height Stride, and Buffer Size

YUV420SP NV12 8-bit

YUV420SP NV21 8-bit

Width: a multiple of 2

Height: a multiple of 2

Width stride: No alignment requirements. The value is the same as the width.

Height stride: Round up the height to the nearest multiple of 2.

Buffer size (in bytes) = Width stride × Height stride × 3/2

YUV400 8-bit

No alignment requirements.

Width stride: No alignment requirements, but the value must be the same as the width. Height stride: No alignment requirements, but the value must be the same as the height.

Buffer size (in bytes) = Width stride × Height stride

YUV422SP 8-bit

YVU422SP 8-bit

Width: a multiple of 2

Height: No alignment requirements.

Width stride: No alignment requirements, but the value must be the same as the width. Height stride: No alignment requirements, but the value must be the same as the height.

Buffer size (in bytes) = Width stride × Height stride × 2

YUV444 Packed 8-bit

RGB888

BGR888

No alignment requirements.

Width stride: Multiply the width by 3. Height stride: Has no alignment requirements but must be the same as height.

Buffer size (in bytes) = Width stride × Height stride

ARGB8888

ABGR8888

RGBA8888

BGRA8888

No alignment requirements.

Width stride: Multiply the width by 4. Height stride: Has no alignment requirements but must be the same as height.

Buffer size (in bytes) = Width stride × Height stride

YVU444 Packed

No alignment requirements.

Width stride: Multiply the width by 3. Height stride: Has no alignment requirements but must be the same as height.

Buffer size (in bytes) = Width stride × Height stride

RGB888 Planar

BGR888 Planar

No alignment requirements.

Width stride: No alignment requirements, but the value must be the same as the width. Height stride: No alignment requirements, but the value must be the same as the height.

Buffer size (in bytes) = Width stride × Height stride × 3

YUV400 FP32

RGB888 FP32

BGR888 FP32

No alignment requirements.

Width stride: No alignment requirements, but the value must be the width × 3. Height stride: No alignment requirements, but the value must be the same as the height.

Buffer size (in bytes) = Width stride × Height stride

RGB888 Planar FP32

BGR888 Planar FP32

No alignment requirements.

Width stride: No alignment requirements, but the value must be the same as the width. Height stride: No alignment requirements, but the value must be the same as the height.

Buffer size (in bytes) = Width stride × Height stride × 3

Table 3 Restrictions on input image formats, width and height alignment, and buffer size for Atlas 200I/500 A2 inference products

Input Image Format

Input Width and Height Alignment

Input Width Stride, Height Stride, and Buffer Size

YUV400 8-bit

No alignment requirements.

Width stride: No alignment requirements. The value is the same as the width.

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride

YUV420SP NV12 8-bit

YUV420SP NV21 8-bit

Width: a multiple of 2

Height: a multiple of 2

Width stride: No alignment requirements. The value is the same as the width.

Height stride: Round up the height to the nearest multiple of 2.

Buffer size (in bytes) = Width stride × Height stride × 3/2

YUV422SP 8-bit

YVU422SP 8-bit

Width: a multiple of 2

Height: No alignment requirements.

Width stride: No alignment requirements. The value is the same as the width.

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride × 2

YUV444SP 8-bit

YVU444SP 8-bit

No alignment requirements.

Width stride: No alignment requirements. The value is the same as the width.

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride × 3

YUV422 Packed YUYV 8-bit

YUV422 Packed UYVY 8-bit

YUV422 Packed YVYU 8-bit

YUV422 Packed VYUY 8-bit

Width: a multiple of 2

Height: No alignment requirements.

Width stride = Width × 2

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride

YUV444 Packed 8-bit

RGB888

BGR888

No alignment requirements.

Width stride = Width × 3

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride

ARGB8888

ABGR8888

RGBA8888

BGRA8888

No alignment requirements.

Width stride = Width × 4

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride

YUV440SP 8-bit

YVU440SP 8-bit

Width: No alignment requirements.

Height: a multiple of 2

Width stride: No alignment requirements. The value is the same as the width.

Height stride: Round up the height to the nearest multiple of 2.

Buffer size (in bytes) = Width stride × Height stride × 2

YVU420 Planar

YUV420 Planar

Both width and height: a multiple of 2

Width stride: No alignment requirements. The value is the same as the width.

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride × 3/2

YVU422 Planar

YUV422 Planar

No alignment requirements.

Width stride: No alignment requirements. The value is the same as the width.

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride × 2

YVU444 Planar

YUV444 Planar

No alignment requirements.

Width stride: No alignment requirements. The value is the same as the width.

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride × 3

YVU444 Packed 8-bit

No alignment requirements.

Width stride: No alignment requirements. Width stride = Width × 3.

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride

YUV440 Planar

YVU440Planar

Width: No alignment requirements, but the width must be ≤ 4096.

Height: a multiple of 2

Width stride: No alignment requirements. The value is the same as the width.

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride × 2

RGB888 Planar

BGR888 Planar

No alignment requirements.

Width stride: No alignment requirements. The value is the same as the width.

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride × 3

Table 4 Restrictions on output image formats, width and height alignment, and buffer size for Atlas 200I/500 A2 inference products

Output Image Format

Output Width and Height Alignment

Output Width Stride, Height Stride, and Buffer Size

YUV420SP NV12 8-bit

YUV420SP NV21 8-bit

Width: a multiple of 2

Height: a multiple of 2

Width stride: No alignment requirements. The value is the same as the width.

Height stride: Round up the height to the nearest multiple of 2.

Buffer size (in bytes) = Width stride × Height stride × 3/2

YUV400 8-bit

No alignment requirements.

Width stride: No alignment requirements, but the value must be the same as the width. Height stride: No alignment requirements, but the value must be the same as the height.

Buffer size (in bytes) = Width stride × Height stride

YUV422SP 8-bit

YVU422SP 8-bit

Width: a multiple of 2

Height: No alignment requirements.

Width stride: No alignment requirements, but the value must be the same as the width. Height stride: No alignment requirements, but the value must be the same as the height.

Buffer size (in bytes) = Width stride × Height stride × 2

YUV444 Packed 8-bit

RGB888

BGR888

No alignment requirements.

Width stride: Multiply the width by 3. Height stride: Has no alignment requirements but must be the same as height.

Buffer size (in bytes) = Width stride × Height stride

ARGB8888

ABGR8888

RGBA8888

BGRA8888

No alignment requirements.

Width stride: Multiply the width by 4. Height stride: Has no alignment requirements but must be the same as height.

Buffer size (in bytes) = Width stride × Height stride

YVU444 Packed

No alignment requirements.

Width stride: Multiply the width by 3. Height stride: Has no alignment requirements but must be the same as height.

Buffer size (in bytes) = Width stride × Height stride

RGB888 Planar

BGR888 Planar

No alignment requirements.

Width stride: No alignment requirements, but the value must be the same as the width. Height stride: No alignment requirements, but the value must be the same as the height.

Buffer size (in bytes) = Width stride × Height stride × 3

Table 5 Restrictions on input image formats, width and height alignment, and buffer size for Atlas inference products

Input Image Format

Input Width and Height Alignment

Input Width Stride, Height Stride, and Buffer Size

YUV400 8-bit

No alignment requirements.

Width stride: Round up the width to the nearest multiple of 16.

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride

YUV420SP NV12 8-bit

YUV420SP NV21 8-bit

Width: a multiple of 2

Height: a multiple of 2

Width stride: Round up the width to the nearest multiple of 16.

Height stride: Round up the height to the nearest multiple of 2.

Buffer size (in bytes) = Width stride × Height stride × 3/2

YUV422SP 8-bit

YVU422SP 8-bit

Width: a multiple of 2

Height: No alignment requirements.

Width stride: Round up the width to the nearest multiple of 16.

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride × 2

YUV444SP 8-bit

YVU444SP 8-bit

No alignment requirements.

Width stride: Round up the width to the nearest multiple of 16.

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride × 3

YUV422 Packed YUYV 8-bit

YUV422 Packed UYVY 8-bit

YUV422 Packed YVYU 8-bit

YUV422 Packed VYUY 8-bit

Width: a multiple of 2

Height: No alignment requirements.

Width stride: Round up the width to the nearest multiple of 16 and multiply the result by 2.

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride

YUV444 Packed 8-bit

RGB888

BGR888

No alignment requirements.

Width stride: Round up the width to the nearest multiple of 16 and multiply the result by 3.

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride

ARGB8888

ABGR8888

RGBA8888

BGRA8888

No alignment requirements.

Width stride: Round up the width to the nearest multiple of 16 and multiply the result by 4.

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride

YUV440SP 8-bit

YVU440SP 8-bit

Width: No alignment requirements.

Height: a multiple of 2

Width stride: Round up the width to the nearest multiple of 16.

Height stride: Round up the height to the nearest multiple of 2.

Buffer size (in bytes) = Width stride × Height stride × 2

Table 6 Restrictions on output image formats, width and height alignment, and buffer size for Atlas inference products

Output Image Format

Output Width and Height Alignment

Output Width Stride, Height Stride, and Buffer Size

YUV420SP NV12 8-bit

YUV420SP NV21 8-bit

Width: a multiple of 2

Height: a multiple of 2

Width stride: Round up the width to the nearest multiple of 16.

Height stride: Round up the height to the nearest multiple of 2.

Buffer size (in bytes) = Width stride × Height stride × 3/2

YUV400 8-bit

No alignment requirements.

Width stride: Round up the width to the nearest multiple of 16.

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride

YUV422SP 8-bit

YVU422SP 8-bit

Width: a multiple of 2

Height: No alignment requirements.

Width stride: Round up the width to the nearest multiple of 16.

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride × 2

YUV444 Packed 8-bit

RGB888

BGR888

No alignment requirements.

Width stride: Round up the width to the nearest multiple of 16 and multiply the result by 3.

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride

ARGB8888

ABGR8888

RGBA8888

BGRA8888

No alignment requirements.

Width stride: Round up the width to the nearest multiple of 16 and multiply the result by 4.

Height stride: No alignment requirements. The value is the same as the height.

Buffer size (in bytes) = Width stride × Height stride

Table 7 Restrictions on input image formats, width and height alignment, and buffer size for Atlas training products

Input Image Format

Input Width and Height Alignment

Input Width Stride, Height Stride, and Buffer Size

YUV400 8-bit

No alignment requirements.

Width stride: Round up the width to the nearest multiple of 16.

Height stride: Round up the height to the nearest multiple of 2.

Buffer size (in bytes) = Width stride × Height stride × 3/2

YUV420SP NV12 8-bit

YUV420SP NV21 8-bit

Width: a multiple of 2

Height: a multiple of 2

Width stride: Round up the width to the nearest multiple of 16.

Height stride: Round up the height to the nearest multiple of 2.

Buffer size (in bytes) = Width stride × Height stride × 3/2

YUV422SP 8-bit

YVU422SP 8-bit

Width: a multiple of 2

Height: No alignment requirements.

Width stride: Round up the width to the nearest multiple of 16.

Height stride: Round up the height to the nearest multiple of 2.

Buffer size (in bytes) = Width stride × Height stride × 2

YUV444SP 8-bit

YVU444SP 8-bit

No alignment requirements.

Width stride: Round up the width to the nearest multiple of 16.

Height stride: Round up the height to the nearest multiple of 2.

Buffer size (in bytes) = Width stride × Height stride × 3

YUV422 Packed YUYV 8-bit

YUV422 Packed UYVY 8-bit

YUV422 Packed YVYU 8-bit

YUV422 Packed VYUY 8-bit

Width: a multiple of 2

Height: No alignment requirements.

Width stride: Round up the width to the nearest multiple of 16 and multiply the result by 2.

Height stride: Round up the height to the nearest multiple of 2.

Buffer size (in bytes) = Width stride × Height stride

YUV444 Packed 8-bit

RGB888

BGR888

No alignment requirements.

Width stride: Round up the width to the nearest multiple of 16 and multiply the result by 3.

Height stride: Round up the height to the nearest multiple of 2.

Buffer size (in bytes) = Width stride × Height stride

ARGB8888

ABGR8888

RGBA8888

BGRA8888

No alignment requirements.

Width stride: Round up the width to the nearest multiple of 16 and multiply the result by 4.

Height stride: Round up the height to the nearest multiple of 2.

Buffer size (in bytes) = Width stride × Height stride

Table 8 Restrictions on output image formats, width and height alignment, and buffer size for Atlas training products

Output Image Format

Output Width and Height Alignment

Output Width Stride, Height Stride, and Buffer Size

YUV420SP NV12 8-bit

Width: a multiple of 2

Height: a multiple of 2

Width stride: Round up the width to the nearest multiple of 16.

Height stride: Round up the height to the nearest multiple of 2.

Buffer size (in bytes) = Width stride × Height stride × 3/2

YUV420SP NV21 8-bit

In the 8K scenario, the input image formats supported by each model are different, as listed in the following table.

Table 9 Input image formats supported by each model in the 8K scenario

Model

Supported Input Image Formats

Atlas training products

YUV420SP NV12 8-bit, YUV420SP NV21 8-bit

Atlas A3 training products / Atlas A3 inference products

Atlas A2 training products / Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

  • YUV400 8-bit
  • YUV420SP NV12 8-bit, YUV420SP NV21 8-bit
  • YUV422SP 8-bit, YVU422SP 8-bit
  • YUV444SP 8-bit, YVU444SP 8-bit
  • YUV422P YUYV 8-bit, YUV422P UYVY 8-bit, YUV422P YVYU 8-bit, YUV422P VYUY 8-bit

The minimum and maximum values of the width stride and height stride vary with product models.

  • The width stride ranges from 10 to 16384 (4096 × 4). For a 4096-pixel ARGB image, one pixel occupies four bytes, and a line of pixels occupies 4096 × 4. The height stride ranges from 6 to 16384. This applies to the following product models:

    Atlas A3 training products / Atlas A3 inference products

    Atlas A2 training products / Atlas A2 inference products

    Atlas 200I/500 A2 inference products

  • The width stride ranges from 32 to 16384 (4096 × 4). For a 4096-pixel ARGB image, one pixel occupies four bytes, and a line of pixels occupies 4096 × 4. The height stride ranges from 6 to 16384. This applies to the following product models:

    Atlas inference products

    Atlas training products

Restrictions on Image Cropping and Pasting

Product Version

Restrictions on Image Cropping and Pasting

Atlas training products

  • The crop ROI must not be larger than the input image.
  • The paste ROI must not be larger than the output image. A maximum of 256 paste ROIs are supported.
  • Round up the left offset of the paste ROI to the nearest multiple of 16.
    • The paste ROI can locate on the leftmost side of the output image. That means the left offset relative to the output image is 0, which also meets the 16-pixel alignment requirement.
    • It is recommended that the paste ROI width be rounded up to the nearest multiple of 16. Otherwise, invalid extra data will be padded to meet the alignment requirement. As shown in Figure 4 and Figure 5, the green region indicates invalid data.
    • For resizing with the aspect ratio preserved, the left offset for pasting must be a multiple of 16. Therefore, the acldvppVpcCropResizePasteAsync call may result in paste ROI deviation from the center of the output image. In this case, you can add the acldvppVpcBatchCropResizeMakeBorderAsync call to implementing the cropping, resizing, and padding functions together.
  • The restrictions on the odd and even numbers of the crop and paste ROIs are as follows:

    The output image can only be in YUV420SP format. The left offset and top offset of the paste ROI must be even numbers, and the right offset and bottom offset must be odd numbers.

  • For image resizing, the aspect ratio ranges of the paste and crop ROIs are [1/32, 16].
  • In inference scenarios, when the VPC output is used as the input of model inference, width × height of the valid paste ROI must be a multiple of 16 × 2. If this requirement is not met, the paste ROI may contain invalid data for padding. In this case, you need to use AIPP to crop the valid ROI and remove invalid data to ensure inference accuracy.

Atlas inference products

  • The crop ROI must not be larger than the input image.
  • The paste ROI must not be larger than the output image. A maximum of 256 paste ROIs are supported.
  • Round up the left offset of the paste ROI to the nearest multiple of 16.
    • The paste ROI can locate on the leftmost side of the output image. That means the left offset relative to the output image is 0, which also meets the 16-pixel alignment requirement.
    • It is recommended that the paste ROI width be rounded up to the nearest multiple of 16. Otherwise, invalid extra data will be padded to meet the alignment requirement. As shown in Figure 4 and Figure 5, the green region indicates invalid data.
    • For resizing with the aspect ratio preserved, the left offset for pasting must be a multiple of 16. Therefore, the acldvppVpcCropResizePasteAsync call may result in paste ROI deviation from the center of the output image. In this case, you can add the acldvppVpcBatchCropResizeMakeBorderAsync call to implementing the cropping, resizing, and padding functions together.
  • The restrictions on the odd and even numbers of the crop and paste ROIs are as follows:

    If the output image is in YUV420SP format, the left offset and top offset of the paste ROI must be even numbers, and the right offset and bottom offset must be odd numbers.

    If the output image is in YUV422SP format, the left offset of the paste ROI must be an even number, and the right offset must be an odd number.

    For other formats, there are no such limits.

Atlas 200I/500 A2 inference products

  • The crop ROI must not be larger than the input image.
  • The paste ROI must not be larger than the output image. A maximum of 256 paste ROIs are supported.
  • The restrictions on the odd and even numbers of the crop and paste ROIs are as follows:

    The cropping start coordinates are not restricted to odd or even numbers.

    If the output image is in YUV420 format, the left offset and top offset of the paste ROI must be even numbers, and the right offset and bottom offset must be odd numbers.

    If the output image is in YUV422 format, the left offset must be an even number and the right offset an odd number.

Atlas A2 training products / Atlas A2 inference products

  • The crop ROI must not be larger than the input image.
  • The paste ROI must not be larger than the output image. A maximum of 256 paste ROIs are supported.
  • The restrictions on the odd and even numbers of the crop and paste ROIs are as follows:

    The cropping start coordinates are not restricted to odd or even numbers.

    If the output image is in YUV420 format, the left offset and top offset of the paste ROI must be even numbers, and the right offset and bottom offset must be odd numbers.

    If the output image is in YUV422 format, the left offset must be an even number and the right offset an odd number.

Atlas A3 training products / Atlas A3 inference products

  • The crop ROI must not be larger than the input image.
  • The paste ROI must not be larger than the output image. A maximum of 256 paste ROIs are supported.
  • The restrictions on the odd and even numbers of the crop and paste ROIs are as follows:

    The cropping start coordinates are not restricted to odd or even numbers.

    If the output image is in YUV420 format, the left offset and top offset of the paste ROI must be even numbers, and the right offset and bottom offset must be odd numbers.

    If the output image is in YUV422 format, the left offset must be an even number and the right offset an odd number.

Restrictions on Downsampling of YUV Images

VPC converts the input image format to YUV444 or RGB for internal processing based on the input or output image format. YUV444 or RGB output format has no restriction on the odd and even numbers of the width and height, while the YUV420SP or YUV422SP output format, which is downsampled, has such restrictions due to the data format. Therefore, abnormal data may exist on the output image borders.

Figure 1 Example of abnormal images

The root cause is that during the computation, when the output image is at an odd start point, the image is correct for the YUV444 format. However, when the YUV420SP format is downsampled, the odd and even lines share the same UV. In this case, the Y of the start line and the UV of the previous line form a new pixel and abnormal data is generated.