diff --git a/include/AMF/components/FRC.h b/include/AMF/components/FRC.h new file mode 100644 index 00000000..026a17f9 --- /dev/null +++ b/include/AMF/components/FRC.h @@ -0,0 +1,75 @@ +// +// 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) 2021 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. +// + +#ifndef AMFFRC_h +#define AMFFRC_h + +#pragma once + +#define AMFFRC L"AMFFRC" + +// Select rendering API for FRC +enum AMF_FRC_ENGINE +{ + FRC_ENGINE_OFF = 0, + FRC_ENGINE_DX12 = 1, + FRC_ENGINE_OPENCL = 2, +}; + +// Select present mode for FRC +enum AMF_FRC_MODE_TYPE +{ + FRC_OFF = 0, + FRC_ON, + FRC_ONLY_INTERPOLATED, + FRC_x2_PRESENT, + TOTAL_FRC_MODES +}; + +enum AMF_FRC_SNAPSHOT_MODE_TYPE { + FRC_SNAPSHOT_OFF = 0, + FRC_SNAPSHOT_LOAD, + FRC_SNAPSHOT_STORE, + FRC_SNAPSHOT_REGRESSION_TEST, + FRC_SNAPSHOT_STORE_NO_PADDING, + TOTAL_FRC_SNAPSHOT_MODES +}; + +#define AMF_FRC_ENGINE_TYPE L"FRCEngineType" // AMF_MEMORY_TYPE (DX12, OPENCL, default : DX12)" - determines how the object is initialized and what kernels to use +#define AMF_FRC_OUTPUT_SIZE L"FRCSOutputSize" // AMFSize - output scaling width/hieight +#define AMF_FRC_KEEP_ASPECT_RATIO L"KeepAspectRatio" // bool (default=false) Keep aspect ratio if scaling. +#define AMF_FRC_FROM_SRGB L"FromSRGB" // bool (default=true) Convert to SRGB. +#define AMF_FRC_MODE L"FRCMode" // FRC mode (0-off, 1-on (call at x2 source FPS), 2-only interpolated, 3-x2 Present) +#define AMF_FRC_ENABLE_FALLBACK L"FRCEnableFallback" // FRC enable fallback mode +#define AMF_FRC_INDICATOR L"FRCIndicator" // bool (default : false) + +#endif //#ifndef AMFFRC_h diff --git a/include/AMF/components/VideoEncoderAV1.h b/include/AMF/components/VideoEncoderAV1.h index c1082f18..26f3df7d 100644 --- a/include/AMF/components/VideoEncoderAV1.h +++ b/include/AMF/components/VideoEncoderAV1.h @@ -257,13 +257,13 @@ enum AMF_VIDEO_ENCODER_AV1_OUTPUT_BUFFER_TYPE_ENUM #define AMF_VIDEO_ENCODER_AV1_PEAK_BITRATE L"Av1PeakBitrate" // amf_int64; default = depends on USAGE; Peak bit rate in bits #define AMF_VIDEO_ENCODER_AV1_MAX_COMPRESSED_FRAME_SIZE L"Av1MaxCompressedFrameSize" // amf_int64; default = 0; Max compressed frame Size in bits. 0 - no limit -#define AMF_VIDEO_ENCODER_AV1_MIN_Q_INDEX_INTRA L"Av1MinQIndex_Intra" // amf_int64; default = depends on USAGE; Min QIndex for intra frames; range = 0-255 -#define AMF_VIDEO_ENCODER_AV1_MAX_Q_INDEX_INTRA L"Av1MaxQIndex_Intra" // amf_int64; default = depends on USAGE; Max QIndex for intra frames; range = 0-255 -#define AMF_VIDEO_ENCODER_AV1_MIN_Q_INDEX_INTER L"Av1MinQIndex_Inter" // amf_int64; default = depends on USAGE; Min QIndex for inter frames; range = 0-255 -#define AMF_VIDEO_ENCODER_AV1_MAX_Q_INDEX_INTER L"Av1MaxQIndex_Inter" // amf_int64; default = depends on USAGE; Max QIndex for inter frames; range = 0-255 +#define AMF_VIDEO_ENCODER_AV1_MIN_Q_INDEX_INTRA L"Av1MinQIndex_Intra" // amf_int64; default = depends on USAGE; Min QIndex for intra frames; range = 1-255 +#define AMF_VIDEO_ENCODER_AV1_MAX_Q_INDEX_INTRA L"Av1MaxQIndex_Intra" // amf_int64; default = depends on USAGE; Max QIndex for intra frames; range = 1-255 +#define AMF_VIDEO_ENCODER_AV1_MIN_Q_INDEX_INTER L"Av1MinQIndex_Inter" // amf_int64; default = depends on USAGE; Min QIndex for inter frames; range = 1-255 +#define AMF_VIDEO_ENCODER_AV1_MAX_Q_INDEX_INTER L"Av1MaxQIndex_Inter" // amf_int64; default = depends on USAGE; Max QIndex for inter frames; range = 1-255 -#define AMF_VIDEO_ENCODER_AV1_Q_INDEX_INTRA L"Av1QIndex_Intra" // amf_int64; default = depends on USAGE; intra-frame QIndex; range = 0-255 -#define AMF_VIDEO_ENCODER_AV1_Q_INDEX_INTER L"Av1QIndex_Inter" // amf_int64; default = depends on USAGE; inter-frame QIndex; range = 0-255 +#define AMF_VIDEO_ENCODER_AV1_Q_INDEX_INTRA L"Av1QIndex_Intra" // amf_int64; default = depends on USAGE; intra-frame QIndex; range = 1-255 +#define AMF_VIDEO_ENCODER_AV1_Q_INDEX_INTER L"Av1QIndex_Inter" // amf_int64; default = depends on USAGE; inter-frame QIndex; range = 1-255 #define AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_SKIP_FRAME L"Av1RateControlSkipFrameEnable" // bool; default = depends on USAGE; If true, rate control may code skip frame when needed; if false, rate control will not code skip frame. diff --git a/include/AMF/core/Buffer.h b/include/AMF/core/Buffer.h index 15c29078..a5b22158 100644 --- a/include/AMF/core/Buffer.h +++ b/include/AMF/core/Buffer.h @@ -59,6 +59,7 @@ namespace amf AMF_BUFFER_USAGE_UNORDERED_ACCESS = 0x00000004, // D3D11_BIND_UNORDERED_ACCESS, D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS, VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT AMF_BUFFER_USAGE_TRANSFER_SRC = 0x00000008, // VK_BUFFER_USAGE_TRANSFER_SRC_BIT AMF_BUFFER_USAGE_TRANSFER_DST = 0x00000010, // VK_BUFFER_USAGE_TRANSFER_DST_BIT + AMF_BUFFER_USAGE_NOSYNC = 0x00000020, // no fence (AMFFenceGUID) created no semaphore (AMFVulkanSync::hSemaphore) created } AMF_BUFFER_USAGE_BITS; typedef amf_flags AMF_BUFFER_USAGE; //---------------------------------------------------------------------------------------------- diff --git a/include/AMF/core/D3D12AMF.h b/include/AMF/core/D3D12AMF.h index 37956b4c..78285977 100644 --- a/include/AMF/core/D3D12AMF.h +++ b/include/AMF/core/D3D12AMF.h @@ -35,6 +35,8 @@ #pragma once #include "Platform.h" #if defined(_WIN32)||(defined(__linux) && defined(AMF_WSL)) + +#define AMFDX12_NUMBER_OF_DESCRYPTOR_HEAPS L"NumberOfDescryptorHeaps" // amf_int64, default is 4, to be set on AMFContext // syncronization properties set via SetPrivateData() AMF_WEAK GUID AMFResourceStateGUID = { 0x452da9bf, 0x4ad7, 0x47a5, { 0xa6, 0x9b, 0x96, 0xd3, 0x23, 0x76, 0xf2, 0xf3 } }; // Current resource state value (D3D12_RESOURCE_STATES ), sizeof(UINT), set on ID3D12Resource AMF_WEAK GUID AMFFenceGUID = { 0x910a7928, 0x57bd, 0x4b04, { 0x91, 0xa3, 0xe7, 0xb8, 0x04, 0x12, 0xcd, 0xa5 } }; // IUnknown (ID3D12Fence), set on ID3D12Resource syncronization fence for this resource diff --git a/include/AMF/core/Result.h b/include/AMF/core/Result.h index cf84bed7..350b72f6 100644 --- a/include/AMF/core/Result.h +++ b/include/AMF/core/Result.h @@ -122,6 +122,9 @@ typedef enum AMF_RESULT AMF_TAN_UNSUPPORTED_VERSION , // Not supported version requested, solely for TANCreateContext(). AMF_NEED_MORE_INPUT ,//returned by AMFComponent::SubmitInput did not produce a buffer because more input submissions are required. + + // device vulkan + AMF_VULKAN_FAILED , } AMF_RESULT; #endif //#ifndef AMF_Result_h diff --git a/include/AMF/core/Surface.h b/include/AMF/core/Surface.h index 3013af04..e803214f 100644 --- a/include/AMF/core/Surface.h +++ b/include/AMF/core/Surface.h @@ -87,7 +87,8 @@ namespace amf AMF_SURFACE_USAGE_UNORDERED_ACCESS = 0x00000004, // D3D11_BIND_UNORDERED_ACCESS, D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS, VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_STORAGE_BIT | VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT AMF_SURFACE_USAGE_TRANSFER_SRC = 0x00000008, // D3D12_RESOURCE_FLAG_NONE VK_IMAGE_USAGE_TRANSFER_SRC_BIT AMF_SURFACE_USAGE_TRANSFER_DST = 0x00000010, // D3D12_RESOURCE_FLAG_NONE VK_IMAGE_USAGE_TRANSFER_DST_BIT - AMF_SURFACE_USAGE_LINEAR = 0x00000020 + AMF_SURFACE_USAGE_LINEAR = 0x00000020, // + AMF_SURFACE_USAGE_NOSYNC = 0x00000040, // no fence (AMFFenceGUID) created no semaphore (AMFVulkanSync::hSemaphore) created } AMF_SURFACE_USAGE_BITS; typedef amf_flags AMF_SURFACE_USAGE; //---------------------------------------------------------------------------------------------- diff --git a/include/AMF/core/Version.h b/include/AMF/core/Version.h index 6bec0155..a6f177ce 100644 --- a/include/AMF/core/Version.h +++ b/include/AMF/core/Version.h @@ -51,7 +51,7 @@ #define AMF_VERSION_MAJOR 1 #define AMF_VERSION_MINOR 4 -#define AMF_VERSION_RELEASE 30 +#define AMF_VERSION_RELEASE 32 #define AMF_VERSION_BUILD_NUM 0 #define AMF_FULL_VERSION AMF_MAKE_FULL_VERSION(AMF_VERSION_MAJOR, AMF_VERSION_MINOR, AMF_VERSION_RELEASE, AMF_VERSION_BUILD_NUM) diff --git a/include/AMF/core/VulkanAMF.h b/include/AMF/core/VulkanAMF.h index e402bb12..5813ae8a 100644 --- a/include/AMF/core/VulkanAMF.h +++ b/include/AMF/core/VulkanAMF.h @@ -90,6 +90,14 @@ namespace amf AMFVulkanSync Sync; // To sync on GPU } AMFVulkanSurface; + typedef struct AMFVulkanSurface1 + { + amf_size cbSizeof; // sizeof(AMFVulkanSurface) + void* pNext; // reserved for extensions + // surface properties + amf_uint32 eTiling; // VkImageTiling + } AMFVulkanSurface1; + typedef struct AMFVulkanView { amf_size cbSizeof; // sizeof(AMFVulkanView) diff --git a/lib/libSvtAv1Enc.a b/lib/libSvtAv1Enc.a index 5a24e788..98621efa 100644 Binary files a/lib/libSvtAv1Enc.a and b/lib/libSvtAv1Enc.a differ diff --git a/lib/libavcodec.a b/lib/libavcodec.a index 1cab83b8..46e75d9a 100644 Binary files a/lib/libavcodec.a and b/lib/libavcodec.a differ diff --git a/lib/libx265.a b/lib/libx265.a index b1a78d2c..96cc7a67 100644 Binary files a/lib/libx265.a and b/lib/libx265.a differ