-
Notifications
You must be signed in to change notification settings - Fork 151
PreProcessing and PreAnalysis
The information presented in this document is for informational purposes only and may contain technical inaccuracies, omissions, and typographical errors. The information contained herein is subject to change and may be rendered inaccurate for many reasons, including but not limited to product and roadmap changes, component and motherboard version changes, new model and/or product releases, product differences between differing manufacturers, software changes, BIOS flashes, firmware upgrades, or the like. Any computer system has risks of security vulnerabilities that cannot be completely prevented or mitigated. AMD assumes no obligation to update or otherwise correct or revise this information. However, AMD reserves the right to revise this information and to make changes from time to time to the content hereof without obligation of AMD to notify any person of such revisions or changes. THIS INFORMATION IS PROVIDED ‘AS IS.” AMD MAKES NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE CONTENTS HEREOF AND ASSUMES NO RESPONSIBILITY FOR ANY INACCURACIES, ERRORS, OR OMISSIONS THAT MAY APPEAR IN THIS INFORMATION. AMD SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR ANY PARTICULAR PURPOSE. IN NO EVENT WILL AMD BE LIABLE TO ANY PERSON FOR ANY RELIANCE, DIRECT, INDIRECT, SPECIAL, OR OTHER CONSEQUENTIAL DAMAGES ARISING FROM THE USE OF ANY INFORMATION CONTAINED HEREIN, EVEN IF AMD IS EXPRESSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
AMD, the AMD Arrow logo, and combinations thereof are trademarks of Advanced Micro Devices, Inc. Other product names used in this publication are for identification purposes only and may be trademarks of their respective companies.
© 2022 Advanced Micro Devices, Inc. All rights reserved.
AMF Video Encoder provides video pre-processing component (PP) and video pre-analysis component (PA) that are designed to improve video compression efficiency, and to boost video quality both objectively and subjectively.
The AMF Pre-Processing component is a Just Noticeable Difference (JND) based edge-preserving low pass filter whose filtering strength is adaptive to the bitrate at which the video is compressed. This filter works at the pre-encoding stage to improve the compression efficiency of the video encoder. It is designed to remove bit-expensive high frequency details in the video that are deemed insignificant to the human visual system (HVS). It contains three main techniques,
- Firstly, an edge detection algorithm is employed to differentiate edges from other areas such as flat regions or high texture regions. In the areas that contains edges, low pass filtering is only applied along the edge direction. In non-edge area, filtering is omni-directional.
- Secondly, the filtering strength is adjusted based on the JND threshold of the neighborhood in the frame. This is to make sure that only information that is not important to HVS will be subjected to filtering or removal.
- Thirdly, the strength of the low pass filter is adaptive to the bitrate at which the video is compressed, i.e., the filtering strength will be higher at lower bitrates, so more high frequency details could be removed. This helps to alleviate the blocking artifacts caused by high quantization parameters (QP) used in areas with high frequency details. On the other hand, low strength filtering will be used for high bitrate video coding.
There are two controls for this filter: strength and sensitivity. “Strength” controls the filtering strength (how much picture details will be removed), while “sensitivity” controls the edge detection sensitivity (what regions will be filtered, as regions detected as edges will not be filtered).
Note that the AMF PP component does change the source video by removing perceptually insignificant details. This could affect the objective quality metrics such as PSNR, VMAF or SSIM. However, it helps improve perceptual video quality, especially at low bitrate coding.
The AMF Pre-Analysis component calculates a metric for content activity of blocks in a frame, as well as other video properties such as scene cut, static scene, and sum of absolute difference (SAD) etc. In the current implementation, spatial complexity is used as a measure of block activity.
The analyzed results can be leveraged during an encode session targeting improved perceptual quality of the compressed video signal.
Note that the AMF PA component is codec-agnostic, and should work for AVC, HEVC, and AV1 video encoding, unless otherwise specified.
The following lists some advanced coding tools that have been implemented based on the AMF PA component.
- Scene content detection, including scene cut, still scene and screen content etc.
- Content adaptive quantization, which adjusts the block QP based on block complexity for better perceptual quality.
- Temporal adaptive quantization, which adjusts the block QP based on its relevance to other blocks in the following frames, resulting in better compression efficiency.
- Perceptual adaptive quantization, which adjusts the block QP based on the block complexity.
- Constant quality quantization, in which the block QP is decided to produce similar perceptual quality across entire stream with the given bit budget. Used when rate control methods such as QVBR/HQVBR/HQCBR are enabled.
- Adaptive miniGOP decision, which adaptively decides the number of B-frames to be inserted between P-frames. Note that in the current implementation, B-frames are only supported in AVC encoding.
- Search center map generation, which generates motion maps (typically with large search ranges) to improve the performance of the hardware motion estimation engine.
Please refer to the reference section to learn the details on how to enable the above coding tools.
Note that the AMF PA component does not change the source video but only understands the characteristics of the current frame and future frames for better coding decisions. Some of the PA based coding tools aim at improving perceptual video quality. This could affect the objective quality metrics such as PSNR, VMAF or SSIM in some cases.
Acronym | Definition |
---|---|
AMF | Advanced Media Framework |
AV1 | AOMedia Video 1 |
AVC | Advanced Video Coding |
HEVC | High Efficiency Video Coding |
HVS | human visual system |
JND | just noticeable difference |
PA | pre-analysis |
PP | pre-processing |
PSNR | peak signal-to-noise ratio |
QP | quantization parameters |
SSIM | structural similarity index measure |
VMAF | video multimethod assessment fusion |