-
Notifications
You must be signed in to change notification settings - Fork 151
AV1 Encoder
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 AV1 video encoder provides the hardware acceleration to encode up to 8k HDR video in 60fps.
AV1 is an open, royalty-free video coding format developed by Alliance of Open Media (AOM). AV1 standard work started in 2015 and the official specification was finalized in 2018. AMD is a promoter member of AOM. The latest AMD Radeon RX 7900 XT and Radeon RX 7900 XTX graphics cards have the built-in hardware accelerated AV1 encoder that can encode digital video signals up to 8k HDR at 60 FPS.
AMD has updated its Advanced Media Framework (AMF) SDK[1]. AV1 encoding will be available from version 1.4.28. The detailed description of AMF AV1 video encoding and its hardware accelerated functionality can be found in the AMF AV1 video encoder programming guide.
AMD has also worked with various ISVs to enable AV1 encoding and decoding accelerated by RX 7900 GPU. They will be available at the time when version 1.4.28 is released.
AMF AV1 inherited all the coding features and rate control (RC) methods from the exiting AMF AVC/HEVC video encoding. Besides this, newly developed pre-analysis features and RC methods have been introduced to enhance the objective and subjective video quality.
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.
- Constant quality quantization, in which the block QP is decided to produce similar perceptual quality across entire stream with the given bit budget.
- 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 document “Pre-Processing and Pre-Analysis”[2] in AMF Video Encoder for a detailed description.
AMF Video Encoder provides several rate control (RC) methods that are designed to better fit to different use cases.
- Constant QP
- Constant bitrate (CBR)
- Peak Constraint Variable bitrate (PCVBR)
- Latency Constraint Variable bitrate (LCVBR)
- Quality Based Variable Bitrate (QVBR)
- High Quality Variable Bitrate (HQ-VBR)
- High Quality Variable Bitrate (HQ-CBR)
Please refer to the document “Rate Control Methods”[3] for a detailed description.
Different from AVC and HEVC, AV1 bitstream specification does not contain the cropping information for decoders to display the specific, pixel accurate resolution. It is expected that the proper cropping information should be presented in the container instead.
AMF AV1 Encoder introduces a new API called AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE
to address the hardware alignment requirement such that the encoded bitstream could be decoded and presented properly.
Values for setting AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE
:
-
AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE_64X16_ONLY
, input videos whose resolution is aligned to 64x16 will be coded; input videos whose resolution is not aligned to 64x16 will not be coded. Instead, an error messageAMF_NOT_SUPPORTED
will be returned. -
AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE_64X16_1080P_CODED_1082
, input videos whose resolution is aligned to 64x16, as well as 1920x1080 video, will be coded; All other resolution videos will not be coded with the error messageAMF_NOT_SUPPORTED
. Note that for resolution of 1920x1080, the output video would have a resolution of 1920x1082. Two extra lines are padded at the bottom of the frame, filled with black pixels. -
AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE_NO_RESTRICTIONS
, videos with any resolution can be coded. However, for those videos whose resolution is not 64x16 aligned, their output resolution will be extrapolated to be 64x16 aligned and padded with black pixels. The exception is for resolution of 1080p, which will be padded to 1082p, as in the case of MODE 2.
[1] https://github.com/GPUOpen-LibrariesAndSDKs/AMF
[2] https://github.com/GPUOpen-LibrariesAndSDKs/AMF/wiki/PreProcessing%20and%20PreAnalysis
[3] https://github.com/GPUOpen-LibrariesAndSDKs/AMF/wiki/Rate%20Control%20Methods
Acronym | Definition |
---|---|
AMF | Advanced Media Framework |
AV1 | AOMedia Video 1 |
AVC | Advanced Video Coding |
CBR | constant bitrate |
CPB | coded picture buffer |
CTB | coding tree block |
CQP | constant QP |
HEVC | High Efficiency Video Coding |
HQ-CBR | high quality constant bitrate |
HQ-VBR | high quality variable bitrate |
HVS | human visual system |
HRD | hypothetical reference decoder |
PA | pre-analysis |
PCVBR | peak constraint variable bitrate |
PP | pre-processing |
PSNR | peak signal-to-noise ratio |
RC | rate control |
QP | quantization parameters |
QVBR | quality based variable bitrate |
RC | rate control |
SDK | Software Development Kit |
VBV | video buffer verifier |
VMAF | video multimethod assessment fusion |