Amf Video Encode Hevc API
Amf Video Encode Hevc API
Disclaimer
The information contained herein is for informational purposes only, and is subject to change without notice. While every
precaution has been taken in the preparation of this document, it may contain technical inaccuracies, omissions and
typographical errors, and AMD is under no obligation to update or otherwise correct this information.
Advanced Micro Devices, Inc. makes no representations or warranties with respect to the accuracy or completeness of the
contents of this document, and assumes no liability of any kind, including the implied warranties of noninfringement,
merchantability or fitness for particular purposes, with respect to the operation or use of AMD hardware, software or other
products described herein. No license, including implied or arising by estoppel, to any intellectual property rights is granted by
this document. Terms and limitations applicable to the purchase or use of AMD’s products are as set forth in a signed
agreement between the parties or in AMD's Standard Terms and Conditions of Sale.
AMD, the AMD Arrow logo, ATI Radeon™, CrossFireX™, LiquidVR™, TrueAudio™ 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.
Copyright Notice
© 2022 Advanced Micro Devices, Inc. All rights reserved
Notice Regarding Standards. AMD does not provide a license or sublicense to any Intellectual Property Rights relating to any
standards, including but not limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; AVC/H.264;
HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and MP3 (collectively, the “Media Technologies”). For clarity,
you will pay any royalties due for such third party technologies, which may include the Media Technologies that are owed as a
result of AMD providing the Software to you.
MIT license
Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Contents
Advanced Media Framework – HEVC Video Encoder - Programming Guide
Disclaimer
Copyright Notice
MIT license
Contents
1 Introduction
1.1 Scope
1.2 Pre-defined Encoder Usages
2 AMF Video Encoder UVD/VCN-HEVC Component
2.1 Input Submission and Output Retrieval
2.2 Encode Parameters
2.2.1 Static Properties
2.2.2 Dynamic Properties
2.2.3 Frame Per-Submission Properties
2.2.4 ROI Feature
2.2.5 Encoder Statistics Feedback
2.2.6 Picture Transfer Mode
2.2.7 SVC Properties
2.2.8 LTR Properties
2.2.9 SmartAccess Video
3 Sample Applications
3.1 List of Parameters
3.2 Command line example
3.2.1 Transcoding application (TranscodeHW.exe)
3.2.2 D3D application (VCEEncoderD3D.exe)
4 Annex A: Encoding & frame parameters description
Table A-1. Encoder parameters
Table A-2. Input frame and encoded data parameters
Table A-3. Encoder capabilities exposed in AMFCaps interface
Table A-4. Encoder statistics feedback
Table A-5. Encoder PSNR/SSIM feedback
Table A-6. Deprecated
1 Introduction
1.1 Scope
This document provides a complete description of the AMD Advanced Media Framework (AMF) Video Encoder Component. This
component exposes the AMD Video Compression Engine, which provides hardware accelerated HEVC video encoding
functionality.
The AMF Video Encoder Component compresses RAW uncompressed video to an HEVC elementary bitstream.
The component does not provide a mechanism to handle audio compression, or stream multiplexing.
The component provides four different sets of pre-defined usages, which provide a convenient way for developers to configure
the encoder to match the intended application use case. Advanced developers can also adjust encoding parameters to tailor the
behavior to their specific application requirements.
Transcoding Transcoding, video editing Favor compression efficiency and throughput over latency.
Ultra-low Optimize for extremely low latency use cases (e.g. cap the number of bits
Video game streaming
latency per frame), to enable high-interactivity applications.
Video collaboration, Optimize for low latency scenarios, but allow occasional bitrate overshoots
Low Latency
remote desktop to preserve quality.
To instantiate the AMF Video Encoder component, call the AMFFactory::CreateComponent method passing
AMFVideoEncoderHW_HEVC component IDs defined in the /include/components/VideoEncoderHEVC.h header.
Transcoding mode,
Ultra-low latency mode,
Low Latency mode,
Webcam mode,
HQ mode, and
HQLL mode.
All properties are accessed using the AMFPropertyStorage interface of the Encoder object.
Static properties (e.g., profile, tier, level, usage) must be defined before the Init() function is called, and will apply until the
end of the encoding session.
All dynamic properties have default values. Several properties can be changed subsequently and these changes will be flushed
to encoder only before the next Submit() call.
Per submission properties are applied on a per frame basis. They can be set optionally to force a certain behavior (e.g., force
frame type to IDR) by updating the properties of the AMFSurface object that is passed through the AMFComponent::Submit()
call.
Region of importance (ROI) feature provides a way to specify the relative importance of the macroblocks in the video frame.
Encoder will further adjust the bits allocation among code blocks based on the importance, on top of the base rate control
decisions. More important blocks will be encoded with relatively better quality.
The ROI map can be attached to the input frame on a per frame basis. Currently, the ROI map can only use system memory. The
ROI map includes the importance values of each 64x64 CTB, ranging from 0 (least important) to 10 (most important), stored in
32bit unsigned format. Refer to SimpleROI sample application for further implementation details.
If an application sets the AMF_VIDEO_ENCODER_HEVC_STATISTICS_FEEDBACK flag on for an input picture, the encoder will feedback to
the application statistics for this specific picture. After the encoding ends, the application can retrieve by name the specific
statistic(s) it is interested in. The supported encoder statistics are listed in Table A-3. This feature is supported by Radeon RX
5000 Series or newer GPUs as well as Ryzen 2000 U/H series or newer APUs.
If an application enables AMF_VIDEO_ENCODER_HEVC_PICTURE_TRANSFER_MODE for a specific input picture, it can dump out the
reconstructed picture after encoding and/or it can inject a picture to be used as the reference picture during the encoding. It is
worth noting that reference picture injection is a feature that is intended for advanced algorithm testing and exploration. It
needs to be used with care since the internal DPB in the current encoding session will be overridden by the injected reference
picture(s). The reader can refer to SimpleFrameInjection sample application for further implementation details. This feature is
supported by Radeon RX 5000 Series or newer GPUs as well as Ryzen 2000 U/H series or newer APUs.
2.2.7 SVC Properties
Scalable Video Coding (SVC) is enabled by setting AMF_VIDEO_ENCODER_HEVC_NUM_TEMPORAL_LAYERS to a value that is greater than
1 . AMF_VIDEO_ENCODER_HEVC_NUM_TEMPORAL_LAYERS is a dynamic property and can be changed at any time during an encoding
session. To ensure proper support, AMF_VIDEO_ENCODER_HEVC_MAX_NUM_TEMPORAL_LAYERS needs to be set before initializing the
encoder to a value that is not smaller than the number of temporal layers. As an example, the maximum number of temporal
layers shall be set to 4 if the number of temporal layers will be changed from 3 to 4 in an encoding session. The maximum
number of temporal layers supported by the encoder can be queried from the encoder capabilities before initializing the
encoder.
To define SVC parameters per layer, the following format must be used:
TL<Temporal_Layer_Number>.QL<Quality_Layer_Number>.<Parameter_name>
As an example with two temporal layers, to configure “Target bitrate” for the base/first temporal layer and first quality layer, the
following parameter should be used:
TL0.QL0.HevcTargetBitrate
To configure “Target bitrate” for the second temporal layer and first quality layer, the following parameter should be used:
TL1.QL0.HevcTargetBitrate
When setting per layer parameters, the equivalent non-SVC layer parameters should not be set for the encoder otherwise the
per layer configuration will be overwritten.
Remark: quality layers are not supported. “QL0” must be used for quality layers.
This feature is supported by Radeon RX 5000 Series or newer GPUs as well as Ryzen 2000 U/H series or newer APUs.
LTR (Long Term Reference) is to manually select a reference frame which can be far away to encode current frame. Normally, the
encoder selects last frame as reference or a frame at lower layer in the SVC case.
In HEVC, maximum of 16 reference frames are supported according to the spec. These 16 reference frames are shared by SVC
and LTR.
enum AMF_VIDEO_ENCODER_HEVC_LTR_MODE_ENUM
{
AMF_VIDEO_ENCODER_HEVC_LTR_MODE_RESET_UNUSED = 0,
AMF_VIDEO_ENCODER_HEVC_LTR_MODE_KEEP_UNUSED
};
Reset_unused: encoder will discard all other LTR frames stored once a LTR frame is used as reference.
Keep_unused: encoder will not change other LTR frames stored once any LTR frame is used as reference. When we enable auto
LTR mode in PA, this mode will be automatically selected internally and AMF_VIDEO_ENCODER_HEVC_MAX_LTR_FRAMES will be set to
4 no matter what users set. For details of “auto LTR mode”, please refer to AMF_Video_PreAnalysis_API document.
There are two Frame Per-Submission Properties need be set to use LTR:
AMF_VIDEO_ENCODER_HEVC_MARK_CURRENT_WITH_LTR_INDEX , Mark current frame with LTR index. -1 means don’t save current frame
into LTR slots. 0~N means save current frame into a LTR slot with index of 0~N . Here N should be <=
AMF_VIDEO_ENCODER_HEVC_MAX_LTR_FRAMES-1 .
When we use SVC encoding, only next base frame can be stored as LTR frame (i.e. only temporal layer number = 0 frames are
allowed to be saved into LTR slot.)
AMF_VIDEO_ENCODER_HEVC_FORCE_LTR_REFERENCE_BITFIELD , force LTR bit-field. This is a bit-field mask that indicate which LTR slot
can be used as reference for current frame. 0b1 means only slot 0 can be used as reference. 0b10 means only slot 1 can be
used as reference. 0b100 means only slot 2 can be used as reference...
0b0 means no LTR frame will be used as reference for current frame hence current frame will select short term reference frame
(usually last frame) as reference.
When there are multiple bits are enabled, for example: 0b1111 ( =decimal 15 ), that means LTR slots 0,1,2 and 3 are all allowed
to be selected as reference. In this case, the closest LTR frame to current frame will be selected.
When we encode a key frame or switch frame, all save LTR slots will be cleared.
Referring to a LTR frame not exiting in LTR slot will generate an Intra only frame.
On supported APU + GPU systems, there is an opportunity to use SmartAccess Video. SmartAccess Video - an optimization logic
which enables the parallelization of encode and decode streams across multiple Video Codec Engine (VCN) hardware instances –
empowers apps to process streams faster through seamless job distribution across available hardware. With a simple
enablement of the encoder and decoder control flags, the SmartAccess Video logic will optimally use hardware resources to
benefit media apps. Follow the SMART_ACCESS_VIDEO tag in the documentation to search for the property flags to set. On
systems without SmartAccess Video support, the SMART_ACCESS_VIDEO properties have no effect.
3 Sample Applications
The AMF Encoder Sample application show how to setup and use the AMF Video Encoder HEVC Component to encode video
frames that are loaded from disk or rendered by the DirectX 3D engine.
Name Type
CODEC string
OUTPUT string
INPUT string
WIDTH int
HEIGHT int
ADAPTERID int
ENGINE string
FRAMES int
THREADCOUNT int
Name Type
PREVIEWMODE bool
Name: CODEC
Name: OUTPUT
Name: INPUT
Name: WIDTH
Default Value: 0
Name: HEIGHT
Default Value: 0
Name: AdapterID
Values: Number
Default Value: 0
Name: FRAMES
Name: THREADCOUNT
Values: Number
Default Value: 1
Name: PREVIEWMODE
Name Category
CODEC string
OUTPUT string
RENDER string
WIDTH int
HEIGHT int
FRAMES int
ADAPTERID int
WINDOWMODE bool
FULLSCREEN bool
QueryInstanceCount bool
UseInstance int
Name Category
FRAMERATE int
Name: CODEC
Name: OUTPUT
Name: RENDER
Values: DX9 , DX9Ex , DX11 , OpenGL , OpenCL , Host , OpenCLDX9 , OpenCLDX11 , OpenGLDX9 , OpenGLDX11 , OpenCLOpenGLDX9 ,
OpenCLOpenGLDX11 , HostDX9 , HostDX11 , DX11DX9 , Vulkan
Name: WIDTH
Name: HEIGHT
Name: FRAMES
Name: ADAPTERID
Values: Number
Default Value: 0
Name: WINDOWMODE
Name: FULLSCREEN
Name: QueryInstanceCount
Description: If the flag is set, the number of independent VCE instances will be quried and printed.
Name: UseInstance
Description: If there are more than one VCE Instances, you can force which instance to use.
Name: FRAMERATE
Default Value: 0
TranscodeHW.exe -input input.h264 -output out.h265 –codec HEVC -width 1280 -height 720 -HevcUsage transcoding -
HevcRateControlMethod cbr -HevcTargetBitrate 100000
This command transcodes H264 elementary stream to H.265 video. Encoder is created with “Transcoding” usage.
VCEEncoderD3D.exe -output VideoSample_1024x768.h265 –codec HEVC -width 1024 -height 768 -HevcUsage transcoding -
HevcRateControlMethod cbr -HevcTargetBitrate 500000 -frames 400
This command encodes 400 frames through D3D renderer and creates an output file with the encoded data. Encoder is created
with “Transcoding” usage. Initial configuration sets bitrate to a value of 500 kbits/sec.
USAGE amf_int64
INSTANCE_INDEX amf_int64
PROFILE amf_int64
TIER amf_int64
PROFILE_LEVEL amf_int64
MAX_LTR_FRAMES amf_int64
LTR_MODE amf_int64
MAX_NUM_REFRAMES amf_int64
LOWLATENCY_MODE amf_bool
FRAMESIZE AMFSize
ASPECT_RATIO AMFRatio
PRE_ANALYSIS_ENABLE amf_bool
MAX_NUM_TEMPORAL_LAYERS amf_int64
NOMINAL_RANGE amf_bool
ENABLE_SMART_ACCESS_VIDEO amf_bool
Name: AMF_VIDEO_ENCODER_HEVC_USAGE
Name: AMF_VIDEO_ENCODER_HEVC_INSTANCE_INDEX
Values: 0 , 1
Default Value: 0
Name: AMF_VIDEO_ENCODER_HEVC_PROFILE
Name: AMF_VIDEO_ENCODER_HEVC_TIER
Name: AMF_VIDEO_ENCODER_HEVC_PROFILE_LEVEL
Name: AMF_VIDEO_ENCODER_HEVC_MAX_LTR_FRAMES
Values: 0 … 16
Default Value: 0
When == 0 , the encoder may or may not use LTRs during encoding.
When > 0 , the user has control over all LTR.
With user control of LTR, Intra-refresh features are not supported.
The actual maximum number of LTRs allowed depends on H.265 (HEVC) Annex A Table Level limits, which defines
dependencies between the H.265 Level number, encoding resolution, and DPB size. The DPB size limit impacts the
maximum number of LTR allowed.
Name: AMF_VIDEO_ENCODER_HEVC_LTR_MODE
Values: AMF_VIDEO_ENCODER_HEVC_LTR_MODE_ENUM : AMF_VIDEO_ENCODER_HEVC_LTR_MODE_RESET_UNUSED ,
AMF_VIDEO_ENCODER_HEVC_LTR_MODE_KEEP_UNUSED
Description: Remove/keep unused LTRs not specified inside the LTR reference bitfield.
Name: AMF_VIDEO_ENCODER_HEVC_MAX_NUM_REFRAMES
Values: 0 … 16
Default Value: 1
Name: AMF_VIDEO_ENCODER_HEVC_LOWLATENCY_MODE
Transcoding: false
Ultra low latency: true
Low latency: false
Webcam: false
HQ: false
HQLL: true
Name: AMF_VIDEO_ENCODER_HEVC_FRAMESIZE
Description: Frame width/Height in pixels, maximum value is hardware-specific, should be queried through AMFCaps .
Name: AMF_VIDEO_ENCODER_HEVC_ASPECT_RATIO
Name: AMF_VIDEO_ENCODER_HEVC_PRE_ANALYSIS_ENABLE
Transcoding: false
Ultra low latency: false
Low latency: false
Webcam: false
HQ: true
HQLL: false
Description: Some encoder properties require this property to be set. Enables the pre-analysis module. Refer to AMF Video
PreAnalysis API reference for more details on the pre-analysis module and its settings under different usages.
Name: AMF_VIDEO_ENCODER_HEVC_MAX_NUM_TEMPORAL_LAYERS
Default Value: 1
Description: Sets the maximum number of temporal layers. It shall not be exceeded by the number of temporal layers. The
maximum number of temporal layers supported is determined by the corresponding encoder capability.
Name: AMF_VIDEO_ENCODER_HEVC_NOMINAL_RANGE
Description: Sets the minimum and maximum pixel values that can be encoded. The nominal range refers to the range of pixel
values that represent the full dynamic range of a video signal.
Name: AMF_VIDEO_ENCODER_HEVC_ENABLE_SMART_ACCESS_VIDEO
Description: When set to true , enables the SmartAccess Video feature, which optimally allocates the encoding task on
supported APU/GPU pairings.
TARGET_BITRATE amf_int64
PEAK_BITRATE amf_int64
RATE_CONTROL_METHOD amf_int64
QVBR_QUALITY_LEVEL amf_int64
RATE_CONTROL_SKIP_FRAME_ENABLE amf_bool
MIN_QP_I amf_int64
MAX_QP_I amf_int64
MIN_QP_P amf_int64
MAX_QP_P amf_int64
Name (Prefix “AMF_VIDEO_ENCODER_HEVC_”) Type
QP_I amf_int64
QP_P amf_int64
FRAMERATE AMFRate
VBV_BUFFER_SIZE amf_int64
INITIAL_VBV_BUFFER_FULLNESS amf_int64
ENFORCE_HRD amf_bool
PREENCODE_ENABLE amf_bool
ENABLE_VBAQ amf_bool
FILLER_DATA_ENABLE amf_bool
HIGH_MOTION_QUALITY_BOOST_ENABLE amf_bool
Name: AMF_VIDEO_ENCODER_HEVC_TARGET_BITRATE
Values: >0
Name: AMF_VIDEO_ENCODER_HEVC_PEAK_BITRATE
Transcoding: 30 mbps
Ultra low latency: 20 mbps
Low latency: 20 mbps
Webcam: 20 mbps
HQ: 80 mbps
HQLL: 30 mbps
Name: AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD
Remarks:
When SVC encoding is enabled, some rate-control parameters can be configured differently for a particular SVC-layer. An
SVC-layer is denoted by an index pair [SVC-Temporal Layer index][SVC-Quality Layer index] . E.g. The bitrate may be
configured differently for SVC-layers [0][0] and [1][0] .
We restrict all SVC layers to have the same Rate Control method.
QVBR, HQVBR and HQCBR are only supported if PreAnalysis is enabled.
QVBR, HQVBR and HQCBR target improving subjective quality with the possible loss of objective quality (PSNR or VMAF).
Name: AMF_VIDEO_ENCODER_HEVC_QVBR_QUALITY_LEVEL
Values: 1 – 51
Default Value: 23
Description: Sets the quality level for QVBR rate control method. Remarks: Only available for QVBR rate control method.
Name: AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_SKIP_FRAME_ENABLE
Transcoding: false
Ultra low latency: true
Low latency: true
Webcam: true
HQ: false
HQLL: false
Name: AMF_VIDEO_ENCODER_HEVC_MIN_QP_I
Values: 0 – 51
Default Value: 0
Name: AMF_VIDEO_ENCODER_HEVC_MAX_QP_I
Values: 0 – 51
Default Value: 51
Name: AMF_VIDEO_ENCODER_HEVC_MIN_QP_P
Values: 0 – 51
Default Value: 0
Name: AMF_VIDEO_ENCODER_HEVC_MAX_QP_P
Values: 0 – 51
Default Value: 51
Name: AMF_VIDEO_ENCODER_HEVC_QP_I
Values: 0 – 51
Default Value: 26
Description: Sets the constant QP for I-pictures.Remarks: Only available for CQP rate control method.
Name: AMF_VIDEO_ENCODER_HEVC_QP_P
Values: 0 – 51
Default Value: 26
Description: Sets the constant QP for P-pictures. Remarks: Only available for CQP rate control method.
Name: AMF_VIDEO_ENCODER_HEVC_FRAMERATE
Values: >0
Transcoding: 20 mbits
Ultra low latency: 735 kbits
Low latency: 4 mbits
Webcam: 2 mbits
HQ: 40 mbits
HQLL: 10 mbits
Description: Sets the VBV buffer size in bits based on use case.
Name: AMF_VIDEO_ENCODER_HEVC_INITIAL_VBV_BUFFER_FULLNESS
Values: 0 - 64
Default Value: 64
Name: AMF_VIDEO_ENCODER_HEVC_ENFORCE_HRD
Transcoding: false
Ultra low latency: true
Low latency: false
Webcam: false
HQ: false
HQLL: false
Description: Disables/enables constraints on rate control to meet HRD model requirement(s) with peak_bitrate, VBV buffer size
and VBV buffer fullness settings.
Name: AMF_VIDEO_ENCODER_HEVC_PREENCODE_ENABLE
Transcoding: false
Ultra low latency: false
Low latency: false
Webcam: false
HQ: true
HQLL: false
Transcoding: false
Ultra low latency: false
Low latency: false
Webcam: false
HQ: true
HQLL: true
Name: AMF_VIDEO_ENCODER_HEVC_FILLER_DATA_ENABLE
Name: AMF_VIDEO_ENCODER_HEVC_HIGH_MOTION_QUALITY_BOOST_ENABLE
Transcoding: false
Ultra low latency: false
Low latency: false
Webcam: false
HQ: true
HQLL: true
Description: Enable high motion quality boost mode to pre-analyze the motion of the video and use this information to
improve encoding.
MAX_AU_SIZE amf_int64
HEADER_INSERTION_MODE amf_int64
GOP_SIZE amf_int64
Name (Prefix “AMF_VIDEO_ENCODER_HEVC_”) Type
NUM_GOPS_PER_IDR amf_int64
DE_BLOCKING_FILTER_DISABLE amf_bool
SLICES_PER_FRAME amf_int64
INTRA_REFRESH_NUM_CTBS_PER_SLOT amf_int64
Name: AMF_VIDEO_ENCODER_HEVC_MAX_AU_SIZE
Default Value: 0
Name: AMF_VIDEO_ENCODER_HEVC_HEADER_INSERTION_MODE
Name: AMF_VIDEO_ENCODER_HEVC_GOP_SIZE
Transcoding: 30
Ultra low latency: 300
Low latency: 300
Webcam: 30
HQ: 30
HQLL: 30
Description: The period to insert IDR/CRA in fixed size mode. 0 means only insert the first IDR/CRA (infinite GOP size).
Name: AMF_VIDEO_ENCODER_HEVC_NUM_GOPS_PER_IDR
Values: 1 – 65535
Default Value: 1
Description: Determines the frequency to insert IDR as start of a GOP. 0 means no IDR will be inserted except for the first
picture in the sequence.
Name: AMF_VIDEO_ENCODER_HEVC_DE_BLOCKING_FILTER_DISABLE
Name: AMF_VIDEO_ENCODER_HEVC_SLICES_PER_FRAME
Default Value: 1
Name: AMF_VIDEO_ENCODER_HEVC_INTRA_REFRESH_NUM_CTBS_PER_SLOT
Default Value: 0
QUALITY_PRESET amf_int64
EXTRADATA AMFBufferPtr
PICTURE_TRANSFER_MODE amf_int64
QUERY_TIMEOUT amf_int64
INPUT_QUEUE_SIZE amf_int64
OUTPUT_MODE amf_int64
Name: AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET
Transcoding: AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_BALANCED
Ultra low latency: AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_SPEED
Low latency: AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_SPEED
Webcam: AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_QUALITY
HQ: AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_QUALITY
HQLL: AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_QUALITY
Description: Selects the quality preset in HW to balance between encoding speed and video quality.
Name: AMF_VIDEO_ENCODER_HEVC_EXTRADATA
Values: AMFBufferPtr
Name: AMF_VIDEO_ENCODER_HEVC_PICTURE_TRANSFER_MODE
Description: The application can turn on this flag for a specific input picture to allow dumping the reconstructed picture and/or
injecting a reference picture.
Name: AMF_VIDEO_ENCODER_HEVC_QUERY_TIMEOUT
Description: Timeout for QueryOutput call in ms. Setting this to a nonzero value will reduce polling load when QueryOutput is
called; it will be blocked until the frame is ready or until the timeout is reached.
Name: AMF_VIDEO_ENCODER_HEVC_INPUT_QUEUE_SIZE
Values: 1 … 32
Default Value: 16
Description: Set encoder input queue size. For high-resolution sequence, recommend to set a smaller value to save storage. For
low-resolution sequence, recommend to set a larger value to improve encoding speed.
Name: AMF_VIDEO_ENCODER_HEVC_OUTPUT_MODE
MOTION_HALF_PIXEL amf_bool
MOTION_QUARTERPIXEL amf_bool
Name: AMF_VIDEO_ENCODER_HEVC_MOTION_HALF_PIXEL
Name: AMF_VIDEO_ENCODER_HEVC_MOTION_QUARTERPIXEL
COLOR_BIT_DEPTH amf_int64
INPUT_COLOR_PROFILE amf_int64
INPUT_TRANSFER_CHARACTERISTIC amf_int64
INPUT_COLOR_PRIMARIES amf_int64
OUTPUT_COLOR_PROFILE amf_int64
OUTPUT_TRANSFER_CHARACTERISTIC amf_int64
OUTPUT_COLOR_PRIMARIES amf_int64
Name: AMF_VIDEO_ENCODER_HEVC_COLOR_BIT_DEPTH
Description: Sets the number of bits in each pixel’s color component in the encoder’s compressed output bitstream.
Name: AMF_VIDEO_ENCODER_HEVC_INPUT_COLOR_PROFILE
Description: Color profile of the input surface. SDR - Setting this parameter ( COLOR_PROFILE ) can fully describe a surface for SDR
use case. HDR – For HDR use case the TRANSFER_CHARACTERISTIC , COLOR_PRIMARIES , and NOMINAL_RANGE parameters describe
the surface.
Name: AMF_VIDEO_ENCODER_HEVC_INPUT_TRANSFER_CHARACTERISTIC
Description: Characteristic transfer function of the input surface used to perform the mapping between linear light components
(tristimulus values) and a nonlinear RGB signal.Used (alongside COLOR_PRIMARIES and NOMINAL_RANGE parameters) to describe
surface in HDR use case.
Name: AMF_VIDEO_ENCODER_HEVC_INPUT_COLOR_PRIMARIES
Description: Color space primaries for the input surface which are the maximum red, green, and blue value permitted within the
color space. Used (alongside TRANSFER_CHARACTERISTIC and NOMINAL_RANGE parameters) to describe surface in HDR use case.
Name: AMF_VIDEO_ENCODER_HEVC_OUTPUT_COLOR_PROFILE
Description: Color profile of the compressed output stream. SDR - Setting this parameter ( COLOR_PROFILE ) can fully describe a
surface for SDR use case. HDR – For HDR use case the TRANSFER_CHARACTERISTIC , COLOR_PRIMARIES , and NOMINAL_RANGE
parameters describe the surface. Determines the optional VUI parameter matrix_coefficients .
Name: AMF_VIDEO_ENCODER_HEVC_OUTPUT_TRANSFER_CHARACTERISTIC
Description: Characteristic transfer function of the compressed output stream used to perform the mapping between linear light
components (tristimulus values) and a nonlinear RGB signal. Used (alongside COLOR_PRIMARIES and NOMINAL_RANGE parameters)
to describe surface in HDR use case.
Name: AMF_VIDEO_ENCODER_HEVC_OUTPUT_COLOR_PRIMARIES
Description: Color space primaries for the compressed output surface which are the maximum red, green, and blue value
permitted within the color space. Used (alongside TRANSFER_CHARACTERISTIC and NOMINAL_RANGE parameters) to describe
surface in HDR use case.
NUM_TEMPORAL_LAYERS amf_int64
Name: AMF_VIDEO_ENCODER_HEVC_NUM_TEMPORAL_LAYERS
Default Value: 1
Description: Sets the number of temporal layers. SVC with temporal scalability is enabled when the number of layers is greater
than 1 . The maximum number of temporal layers supported is determined by the corresponding encoder capability. Remarks:
Actual modification of the number of temporal layers will be delayed until the start of the next temporal GOP. Intra-refresh
feature is not supported with SVC.
Name (Prefix “AMF_VIDEO_ENCODER_HEVC_”) Type
TL<TL_Num>.QL<QL_Num>.<Parameter_name>
Name: TL<TL_Num>.QL<QL_Num>.<Parameter_name>
Remarks: Quality layers are not supported. “QL0” must be used for quality layers.
INSERT_HEADER amf_bool
INSERT_AUD amf_bool
FORCE_PICTURE_TYPE amf_int64
END_OF_SEQUENCE amf_bool
MARK_CURRENT_WITH_LTR_INDEX amf_int64
FORCE_LTR_REFERENCE_BITFIELD amf_int64
ROI_DATA AMF_SURFACE_GRAY32
STATISTICS_FEEDBACK amf_bool
PSNR_FEEDBACK amf_bool
Name (prefix “AMF_VIDEO_ENCODER_HEVC_”) Type
SSIM_FEEDBACK amf_bool
BLOCK_QP_FEEDBACK amf_bool
REFERENCE_PICTURE AMFInterfacePtr
Name: AMF_VIDEO_ENCODER_HEVC_INSERT_HEADER
Name: AMF_VIDEO_ENCODER_HEVC_INSERT_AUD
Name: AMF_VIDEO_ENCODER_HEVC_FORCE_PICTURE_TYPE
Name: AMF_VIDEO_ENCODER_HEVC_END_OF_SEQUENCE
Name: AMF_VIDEO_ENCODER_HEVC_MARK_CURRENT_WITH_LTR_INDEX
Values: -1 … MaxOfLTRFrames - 1
Description: If != -1 , the current picture is coded as a long-term reference with the given index. Remarks:
When the user controls N LTRs (using the corresponding Create parameter), then the LTR Index the user can assign to a
reference picture varies from 0 to N-1 . By default, the encoder will “use up” available LTR Indices (i.e. assign them to
references) even if the user does not request them to be used.
When LTR is used with SVC encoding, only base temporal layer pictures can be coded as LTR. In this case, the request to
mark the current picture as LTR would be delayed to the next base temporal layer picture if the current picture is in an
enhancement layer. If the user submits multiple requests to mark current as LTR between base temporal layer pictures, then
only the last request is applied.
Name: AMF_VIDEO_ENCODER_HEVC_FORCE_LTR_REFERENCE_BITFIELD
Default Value: 0
Description: Force LTR Reference allowed bitfield. If == 0 , the current picture should predict from the default reference. If !=
0 , the current picture should predict from one of the LTRs allowed by the bitfield (bit# = LTR Index#). Remarks:
E.g. if Bit#0 = 1 , then the existing LTR with LTR Index = 0 may be used for reference. The bitfield may allow more than
one LTR for reference, in which case the encoder is free to choose which one to use. This bitfield also disallows existing LTRs
not enabled by it from current/future reference.
E.g. if Bit#1 = 0 , and there is an existing reference with LTR Index = 1 , then this LTR Index will not be used for reference
until it is replaced with a newer reference with the same LTR Index.
Name: AMF_VIDEO_ENCODER_HEVC_ROI_DATA
Description: Importance value for each 64x64 block ranges from 0 (least important) to 10 (most important), stored in 32bit
unsigned format.
Name: AMF_VIDEO_ENCODER_HEVC_STATISTICS_FEEDBACK
Name: AMF_VIDEO_ENCODER_HEVC_PSNR_FEEDBACK
Name: AMF_VIDEO_ENCODER_HEVC_SSIM_FEEDBACK
Name: AMF_VIDEO_ENCODER_HEVC_REFERENCE_PICTURE
Values: AMFSurface
OUTPUT_DATA_TYPE amf_int64
OUTPUT_MARKED_LTR_INDEX amf_int64
OUTPUT_REFERENCED_LTR_INDEX_BITFIELD amf_int64
OUTPUT_TEMPORAL_LAYER amf_int64
OUTPUT_BUFFER_TYPE amf_int64
RECONSTRUCTED_PICTURE AMFSurface
Name: AMF_VIDEO_ENCODER_HEVC_OUTPUT_DATA_TYPE
Name: AMF_VIDEO_ENCODER_HEVC_OUTPUT_MARKED_LTR_INDEX
Values: -1 … MaxOfLTRFrames -1
Default Value: -1
Description: Marked as LTR Index. If != -1 , then this picture was coded as a long-term reference with this LTR Index.
Name: AMF_VIDEO_ENCODER_HEVC_OUTPUT_REFERENCED_LTR_INDEX_BITFIELD
Default Value: 0
Description: Referenced LTR Index bitfield. If != 0 , this picture was coded to reference long-term references. The enabled bits
identify the LTR Indices of the referenced pictures (e.g. if Bit #0 = 1 , then LTR Index 0 was used as a reference when coding this
picture).
Name: AMF_VIDEO_ENCODER_HEVC_OUTPUT_TEMPORAL_LAYER
Name: AMF_VIDEO_ENCODER_HEVC_OUTPUT_BUFFER_TYPE
Values: AMF_VIDEO_ENCODER_HEVC_OUTPUT_BUFFER_TYPE_ENUM :
AMF_VIDEO_ENCODER_HEVC_OUTPUT_BUFFER_TYPE_FRAME , AMF_VIDEO_ENCODER_HEVC_OUTPUT_BUFFER_TYPE_TILE ,
AMF_VIDEO_ENCODER_HEVC_OUTPUT_BUFFER_TYPE_TILE_LAST
Name: AMF_VIDEO_ENCODER_HEVC_RECONSTRUCTED_PICTURE
Values: AMFSurface
MAX_BITRATE amf_int64
NUM_OF_STREAMS amf_int64
MAX_PROFILE amf_int64
MAX_TIER amf_int64
MAX_LEVEL amf_int64
MIN_REFERENCE_FRAMES amf_int64
MAX_REFERENCE_FRAMES amf_int64
MAX_TEMPORAL_LAYERS amf_int64
NUM_OF_HW_INSTANCES amf_int64
COLOR_CONVERSION amf_int64
PRE_ANALYSIS amf_bool
ROI amf_bool
Name (prefix with AMF_VIDEO_ENCODER_HEVC_CAP_) Type
MAX_THROUGHPUT amf_int64
REQUESTED_THROUGHPUT amf_int64
QUERY_TIMEOUT_SUPPORT amf_bool
SUPPORT_SLICE_OUTPUT amf_bool
Name: AMF_VIDEO_ENCODER_HEVC_CAP_MAX_BITRATE
Name: AMF_VIDEO_ENCODER_HEVC_CAP_NUM_OF_STREAMS
Name: AMF_VIDEO_ENCODER_HEVC_CAP_MAX_PROFILE
Name: AMF_VIDEO_ENCODER_HEVC_CAP_MAX_TIER
Name: AMF_VIDEO_ENCODER_HEVC_CAP_MAX_LEVEL
Name: AMF_VIDEO_ENCODER_HEVC_CAP_MIN_REFERENCE_FRAMES
Name: AMF_VIDEO_ENCODER_HEVC_CAP_MAX_REFERENCE_FRAMES
Name: AMF_VIDEO_ENCODER_HEVC_CAP_NUM_OF_HW_INSTANCES
Name: AMF_VIDEO_ENCODER_HEVC_CAP_COLOR_CONVERSION
Values: AMF_ACCELERATION_TYPE
Name: AMF_VIDEO_ENCODER_HEVC_CAP_PRE_ANALYSIS
Name: AMF_VIDEO_ENCODER_HEVC_CAP_ROI
Name: AMF_VIDEO_ENCODER_HEVC_CAP_MAX_THROUGHPUT
Name: AMF_VIDEO_ENCODER_HEVC_CAP_REQUESTED_THROUGHPUT
Name: AMF_VIDEO_ENCODER_HEVC_CAP_QUERY_TIMEOUT_SUPPORT
Name: AMF_VIDEO_ENCODER_HEVC_CAP_SUPPORT_SLICE_OUTPUT
Values: true , false
STATISTIC_FRAME_QP amf_int64
STATISTIC_AVERAGE_QP amf_int64
STATISTIC_MAX_QP amf_int64
STATISTIC_MIN_QP amf_int64
STATISTIC_PIX_NUM_INTRA amf_int64
STATISTIC_PIX_NUM_INTER amf_int64
STATISTIC_PIX_NUM_SKIP amf_int64
STATISTIC_BITCOUNT_RESIDUAL amf_int64
STATISTIC_BITCOUNT_MOTION amf_int64
STATISTIC_BITCOUNT_INTER amf_int64
STATISTIC_BITCOUNT_INTRA amf_int64
STATISTIC_BITCOUNT_ALL_MINUS_HEADER amf_int64
STATISTIC_MV_X amf_int64
STATISTIC_MV_Y amf_int64
STATISTIC_RD_COST_FINAL amf_int64
STATISTIC_RD_COST_INTRA amf_int64
STATISTIC_RD_COST_INTER amf_int64
STATISTIC_SATD_FINAL amf_int64
STATISTIC_SATD_INTRA amf_int64
STATISTIC_SATD_INTER amf_int64
STATISTIC_VARIANCE amf_int64
Name: AMF_VIDEO_ENCODER_HEVC_STATISTIC_FRAME_QP
Name: AMF_VIDEO_ENCODER_HEVC_STATISTIC_AVERAGE_QP
Name: AMF_VIDEO_ENCODER_HEVC_STATISTIC_MIN_QP
Name: AMF_VIDEO_ENCODER_HEVC_STATISTIC_PIX_NUM_INTRA
Name: AMF_VIDEO_ENCODER_HEVC_STATISTIC_PIX_NUM_INTER
Name: AMF_VIDEO_ENCODER_HEVC_STATISTIC_PIX_NUM_SKIP
Name: AMF_VIDEO_ENCODER_HEVC_STATISTIC_BITCOUNT_RESIDUAL
Name: AMF_VIDEO_ENCODER_HEVC_STATISTIC_BITCOUNT_MOTION
Name: AMF_VIDEO_ENCODER_HEVC_STATISTIC_BITCOUNT_INTER
Name: AMF_VIDEO_ENCODER_HEVC_STATISTIC_BITCOUNT_INTRA
Name: AMF_VIDEO_ENCODER_HEVC_STATISTIC_BITCOUNT_ALL_MINUS_HEADER
Name: AMF_VIDEO_ENCODER_HEVC_STATISTIC_MV_X
Name: AMF_VIDEO_ENCODER_HEVC_STATISTIC_MV_Y
Description: Accumulated absolute values of MVY for full encoding.
Name: AMF_VIDEO_ENCODER_HEVC_STATISTIC_RD_COST_FINAL
Name: AMF_VIDEO_ENCODER_HEVC_STATISTIC_RD_COST_INTRA
Name: AMF_VIDEO_ENCODER_HEVC_STATISTIC_RD_COST_INTER
Name: AMF_VIDEO_ENCODER_HEVC_STATISTIC_SATD_FINAL
Name: AMF_VIDEO_ENCODER_HEVC_STATISTIC_SATD_INTRA
Name: AMF_VIDEO_ENCODER_HEVC_STATISTIC_SATD_INTER
Name: AMF_VIDEO_ENCODER_HEVC_STATISTIC_VARIANCE
STATISTIC_PSNR_Y amf_double
STATISTIC_PSNR_U amf_double
STATISTIC_PSNR_V amf_double
STATISTIC_PSNR_ALL amf_double
STATISTIC_SSIM_Y amf_double
STATISTIC_SSIM_U amf_double
STATISTIC_SSIM_V amf_double
STATISTIC_SSIM_ALL amf_double
Description: PSNR Y.
Name: AMF_VIDEO_ENCODER_HEVC_STATISTIC_PSNR_U
Description: PSNY U.
Name: AMF_VIDEO_ENCODER_HEVC_STATISTIC_PSNR_V
Description: PSNR V.
Name: AMF_VIDEO_ENCODER_HEVC_STATISTIC_PSNR_ALL
Name: AMF_VIDEO_ENCODER_HEVC_STATISTIC_SSIM_Y
Description: SSIM Y.
Name: AMF_VIDEO_ENCODER_HEVC_STATISTIC_SSIM_U
Description: SSIM U.
Name: AMF_VIDEO_ENCODER_HEVC_STATISTIC_SSIM_V
Description: SSIM V.
Name: AMF_VIDEO_ENCODER_HEVC_STATISTIC_SSIM_ALL
Name: AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_PREANALYSIS_ENABLE
Name: AMF_VIDEO_ENCODER_CAPS_HEVC_QUERY_TIMEOUT_SUPPORT