Skip to content

Commit

Permalink
update-2023-12-11
Browse files Browse the repository at this point in the history
  • Loading branch information
LizardByte-bot committed Dec 11, 2023
1 parent 65817d1 commit 19930e7
Show file tree
Hide file tree
Showing 11 changed files with 98 additions and 8 deletions.
75 changes: 75 additions & 0 deletions include/AMF/components/FRC.h
Original file line number Diff line number Diff line change
@@ -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
12 changes: 6 additions & 6 deletions include/AMF/components/VideoEncoderAV1.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
1 change: 1 addition & 0 deletions include/AMF/core/Buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
//----------------------------------------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions include/AMF/core/D3D12AMF.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions include/AMF/core/Result.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion include/AMF/core/Surface.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
//----------------------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion include/AMF/core/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 8 additions & 0 deletions include/AMF/core/VulkanAMF.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Binary file modified lib/libSvtAv1Enc.a
Binary file not shown.
Binary file modified lib/libavcodec.a
Binary file not shown.
Binary file modified lib/libx265.a
Binary file not shown.

0 comments on commit 19930e7

Please sign in to comment.