From ca3ff9aced2b4e58ce69718d014228e01069c196 Mon Sep 17 00:00:00 2001 From: Song Ruo Jing Date: Fri, 17 Oct 2025 19:10:48 +0800 Subject: [PATCH] docs(ppa): add a note about bilinear scaling algorithm in PPA SRM Closes https://github.com/espressif/esp-idf/issues/17531 --- docs/en/api-reference/peripherals/ppa.rst | 4 ++++ docs/zh_CN/api-reference/peripherals/ppa.rst | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docs/en/api-reference/peripherals/ppa.rst b/docs/en/api-reference/peripherals/ppa.rst index 74998a03b2..3a6f64fe55 100644 --- a/docs/en/api-reference/peripherals/ppa.rst +++ b/docs/en/api-reference/peripherals/ppa.rst @@ -93,6 +93,10 @@ Some notes to avoid confusion in configuring :cpp:type:`ppa_srm_oper_config_t`: - Output block's width/height is totally determined by the input block's width/height, scaling factor, and rotation angle, so output block's width/height does not need to be configured. However, please make sure the output block can fit at the offset location in the output picture. - If the color mode of the input or output picture is ``PPA_SRM_COLOR_MODE_YUV420``, then its ``pic_w``, ``pic_h``, ``block_w``, ``block_h``, ``block_offset_x``, ``block_offset_y`` fields must be even. +.. note:: + + The PPA SRM internally uses bilinear scaling algorithm to process. Therefore, it may cause chromatic aberration and loss of contrast at the edges in a scaled picture. + Blend ~~~~~ diff --git a/docs/zh_CN/api-reference/peripherals/ppa.rst b/docs/zh_CN/api-reference/peripherals/ppa.rst index 053908b71a..c9b4841413 100644 --- a/docs/zh_CN/api-reference/peripherals/ppa.rst +++ b/docs/zh_CN/api-reference/peripherals/ppa.rst @@ -93,6 +93,10 @@ PPA 操作包括: - 输出块的宽度/高度完全由输入块的宽度/高度、缩放因子和旋转角度决定,因此无需配置输出块的宽度/高度。但请确保输出块可以适应输出图片中的偏移位置。 - 如果输入或输出图片的色彩模式为 ``PPA_SRM_COLOR_MODE_YUV420``,那么其 ``pic_w``、``pic_h``、``block_w``、``block_h``、``block_offset_x`` 以及 ``block_offset_y`` 字段必须为偶数。 +.. note:: + + PPA SRM 内部使用双线性缩放算法进行处理。因此,缩放后的图片边缘可能会出现色差和对比度损失。 + 叠加 ~~~~