mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 02:30:35 +00:00
amfcodec: Update AMF headers to version 1.4.29
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3904>
This commit is contained in:
parent
7cb9cea2b5
commit
38c3de565b
14 changed files with 158 additions and 67 deletions
|
@ -1,4 +1,4 @@
|
|||
//
|
||||
//
|
||||
// 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;
|
||||
|
@ -6,9 +6,9 @@
|
|||
// (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
|
||||
//
|
||||
//
|
||||
// MIT license
|
||||
//
|
||||
// Copyright (c) 2018 Advanced Micro Devices, Inc. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
|
@ -41,9 +41,9 @@
|
|||
typedef enum AMF_VIDEO_CONVERTER_COLOR_PROFILE_ENUM
|
||||
{
|
||||
AMF_VIDEO_CONVERTER_COLOR_PROFILE_UNKNOWN =-1,
|
||||
AMF_VIDEO_CONVERTER_COLOR_PROFILE_601 = 0, // studio range
|
||||
AMF_VIDEO_CONVERTER_COLOR_PROFILE_709 = 1, // studio range
|
||||
AMF_VIDEO_CONVERTER_COLOR_PROFILE_2020 = 2, // studio range
|
||||
AMF_VIDEO_CONVERTER_COLOR_PROFILE_601 = 0, // studio range
|
||||
AMF_VIDEO_CONVERTER_COLOR_PROFILE_709 = 1, // studio range
|
||||
AMF_VIDEO_CONVERTER_COLOR_PROFILE_2020 = 2, // studio range
|
||||
AMF_VIDEO_CONVERTER_COLOR_PROFILE_JPEG = 3, // full range 601
|
||||
// AMF_VIDEO_CONVERTER_COLOR_PROFILE_G22_BT709 = AMF_VIDEO_CONVERTER_COLOR_PROFILE_709,
|
||||
// AMF_VIDEO_CONVERTER_COLOR_PROFILE_G10_SCRGB = 4,
|
||||
|
@ -113,8 +113,8 @@ typedef struct AMFHDRMetadata
|
|||
amf_uint16 whitePoint[2]; // normalized to 50000
|
||||
amf_uint32 maxMasteringLuminance; // normalized to 10000
|
||||
amf_uint32 minMasteringLuminance; // normalized to 10000
|
||||
amf_uint16 maxContentLightLevel; // nit value
|
||||
amf_uint16 maxFrameAverageLightLevel; // nit value
|
||||
amf_uint16 maxContentLightLevel; // nit value
|
||||
amf_uint16 maxFrameAverageLightLevel; // nit value
|
||||
} AMFHDRMetadata;
|
||||
|
||||
|
||||
|
@ -130,8 +130,8 @@ typedef enum AMF_COLOR_RANGE_ENUM
|
|||
// IDs are the same as in decoder properties
|
||||
// can be used to dynamically pass color data between components:
|
||||
// Decoder, Capture, Encoder. Presenter etc.
|
||||
#define AMF_VIDEO_COLOR_TRANSFER_CHARACTERISTIC L"ColorTransferChar" // amf_int64(AMF_COLOR_TRANSFER_CHARACTERISTIC_ENUM); default = AMF_COLOR_TRANSFER_CHARACTERISTIC_UNDEFINED, ISO/IEC 23001-8_2013 Section 7.2 See ColorSpace.h for enum
|
||||
#define AMF_VIDEO_COLOR_PRIMARIES L"ColorPrimaries" // amf_int64(AMF_COLOR_PRIMARIES_ENUM); default = AMF_COLOR_PRIMARIES_UNDEFINED, ISO/IEC 23001-8_2013 Section 7.1 See ColorSpace.h for enum
|
||||
#define AMF_VIDEO_COLOR_TRANSFER_CHARACTERISTIC L"ColorTransferChar" // amf_int64(AMF_COLOR_TRANSFER_CHARACTERISTIC_ENUM); default = AMF_COLOR_TRANSFER_CHARACTERISTIC_UNDEFINED, ISO/IEC 23001-8_2013 Section 7.2 See ColorSpace.h for enum
|
||||
#define AMF_VIDEO_COLOR_PRIMARIES L"ColorPrimaries" // amf_int64(AMF_COLOR_PRIMARIES_ENUM); default = AMF_COLOR_PRIMARIES_UNDEFINED, ISO/IEC 23001-8_2013 Section 7.1 See ColorSpace.h for enum
|
||||
#define AMF_VIDEO_COLOR_RANGE L"ColorRange" // amf_int64(AMF_COLOR_RANGE_ENUM) default = AMF_COLOR_RANGE_UNDEFINED
|
||||
#define AMF_VIDEO_COLOR_HDR_METADATA L"HdrMetadata" // AMFBuffer containing AMFHDRMetadata; default NULL
|
||||
|
||||
|
|
|
@ -414,6 +414,7 @@ typedef enum AMF_STREAM_CODEC_ID_ENUM // matched codecs from VideoDecoxcderU
|
|||
AMF_STREAM_CODEC_ID_VP9 = 11, // AMFVideoDecoderHW_VP9
|
||||
AMF_STREAM_CODEC_ID_VP9_10BIT = 12, // AMFVideoDecoderHW_VP9_10BIT
|
||||
AMF_STREAM_CODEC_ID_AV1 = 13, // AMFVideoDecoderHW_AV1
|
||||
AMF_STREAM_CODEC_ID_AV1_12BIT = 14, // AMFVideoDecoderHW_AV1_12BIT
|
||||
} AMF_STREAM_CODEC_ID_ENUM;
|
||||
|
||||
// common stream properties
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//
|
||||
//
|
||||
// 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;
|
||||
|
@ -6,9 +6,9 @@
|
|||
// (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
|
||||
//
|
||||
//
|
||||
// MIT license
|
||||
//
|
||||
// Copyright (c) 2019 Advanced Micro Devices, Inc. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
|
@ -48,7 +48,7 @@ enum AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY_ENUM
|
|||
|
||||
|
||||
enum AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_ENUM
|
||||
{
|
||||
{
|
||||
AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_LOW = 0,
|
||||
AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_MEDIUM = 1,
|
||||
AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_HIGH = 2
|
||||
|
@ -69,6 +69,26 @@ enum AMF_PA_CAQ_STRENGTH_ENUM
|
|||
AMF_PA_CAQ_STRENGTH_HIGH = 2
|
||||
};
|
||||
|
||||
// Perceptual adaptive quantization mode
|
||||
enum AMF_PA_PAQ_MODE_ENUM
|
||||
{
|
||||
AMF_PA_PAQ_MODE_NONE = 0,
|
||||
AMF_PA_PAQ_MODE_CAQ = 1
|
||||
};
|
||||
|
||||
// Temporal adaptive quantization mode
|
||||
enum AMF_PA_TAQ_MODE_ENUM
|
||||
{
|
||||
AMF_PA_TAQ_MODE_NONE = 0,
|
||||
AMF_PA_TAQ_MODE_1 = 1,
|
||||
AMF_PA_TAQ_MODE_2 = 2
|
||||
};
|
||||
|
||||
enum AMF_PA_HIGH_MOTION_QUALITY_BOOST_MODE_ENUM
|
||||
{
|
||||
AMF_PA_HIGH_MOTION_QUALITY_BOOST_MODE_NONE = 0, //default
|
||||
AMF_PA_HIGH_MOTION_QUALITY_BOOST_MODE_AUTO = 1
|
||||
};
|
||||
|
||||
|
||||
// PA object properties
|
||||
|
@ -77,17 +97,19 @@ enum AMF_PA_CAQ_STRENGTH_ENUM
|
|||
|
||||
#define AMF_PA_SCENE_CHANGE_DETECTION_ENABLE L"PASceneChangeDetectionEnable" // bool (default : True) - Enable Scene Change Detection GPU algorithm
|
||||
#define AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY L"PASceneChangeDetectionSensitivity" // AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY_ENUM (default : Medium) - Scene Change Detection Sensitivity
|
||||
#define AMF_PA_STATIC_SCENE_DETECTION_ENABLE L"PAStaticSceneDetectionEnable" // bool (default : True) - Enable Skip Detection GPU algorithm
|
||||
#define AMF_PA_STATIC_SCENE_DETECTION_ENABLE L"PAStaticSceneDetectionEnable" // bool (default : False) - Enable Skip Detection GPU algorithm
|
||||
#define AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY L"PAStaticSceneDetectionSensitivity" // AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_ENUM (default : High) - Allowable absolute difference between pixels (sample counts)
|
||||
#define AMF_PA_FRAME_SAD_ENABLE L"PAFrameSadEnable" // bool (default : True) - Enable Frame SAD algorithm
|
||||
#define AMF_PA_ACTIVITY_TYPE L"PAActivityType" // AMF_PA_ACTIVITY_TYPE_ENUM (default : Calculate on Y) - Block activity calculation mode
|
||||
#define AMF_PA_LTR_ENABLE L"PALongTermReferenceEnable" // bool (default : True) - Enable Automatic Long Term Reference frame management
|
||||
|
||||
|
||||
#define AMF_PA_LTR_ENABLE L"PALongTermReferenceEnable" // bool (default : False) - Enable Automatic Long Term Reference frame management
|
||||
#define AMF_PA_LOOKAHEAD_BUFFER_DEPTH L"PALookAheadBufferDepth" // amf_uint64 (default : 0) Values: [0, MAX_LOOKAHEAD_DEPTH] - PA lookahead buffer size
|
||||
#define AMF_PA_PAQ_MODE L"PAPerceptualAQMode" // AMF_PA_PAQ_MODE_ENUM (default : AMF_PA_PAQ_MODE_NONE) - Perceptual AQ mode
|
||||
#define AMF_PA_TAQ_MODE L"PATemporalAQMode" // AMF_PA_TAQ_MODE_ENUM (default: AMF_PA_TAQ_MODE_NONE) - Temporal AQ mode
|
||||
#define AMF_PA_HIGH_MOTION_QUALITY_BOOST_MODE L"PAHighMotionQualityBoostMode" // AMF_PA_HIGH_MOTION_QUALITY_BOOST_MODE_ENUM (default: None) - High motion quality boost mode
|
||||
|
||||
///////////////////////////////////////////
|
||||
// the following properties are available
|
||||
// only through the Encoder - trying to
|
||||
// the following properties are available
|
||||
// only through the Encoder - trying to
|
||||
// access/set them when PA is standalone
|
||||
// will fail
|
||||
|
||||
|
@ -107,4 +129,5 @@ enum AMF_PA_CAQ_STRENGTH_ENUM
|
|||
#define AMF_PA_SCENE_CHANGE_DETECT L"PASceneChangeDetect" // bool - True/False - available if AMF_PA_SCENE_CHANGE_DETECTION_ENABLE was set to True
|
||||
#define AMF_PA_STATIC_SCENE_DETECT L"PAStaticSceneDetect" // bool - True/False - available if AMF_PA_STATIC_SCENE_DETECTION_ENABLE was set to True
|
||||
|
||||
|
||||
#endif //#ifndef AMFPreAnalysis_h
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
#define AMFVideoDecoderHW_VP9 L"AMFVideoDecoderHW_VP9"
|
||||
#define AMFVideoDecoderHW_VP9_10BIT L"AMFVideoDecoderHW_VP9_10BIT"
|
||||
#define AMFVideoDecoderHW_AV1 L"AMFVideoDecoderHW_AV1"
|
||||
#define AMFVideoDecoderHW_AV1_12BIT L"AMFVideoDecoderHW_AV1_12BIT"
|
||||
|
||||
enum AMF_VIDEO_DECODER_MODE_ENUM
|
||||
{
|
||||
|
@ -105,9 +106,10 @@ enum AMF_TIMESTAMP_MODE_ENUM
|
|||
|
||||
// properties to be set on decoder if internal converter is used
|
||||
#define AMF_VIDEO_DECODER_OUTPUT_TRANSFER_CHARACTERISTIC L"OutColorTransferChar" // amf_int64(AMF_COLOR_TRANSFER_CHARACTERISTIC_ENUM); default = AMF_COLOR_TRANSFER_CHARACTERISTIC_UNDEFINED, ISO/IEC 23001-8_2013 7.2 See VideoDecoderUVD.h for enum
|
||||
#define AMF_VIDEO_DECODER_OUTPUT_COLOR_PRIMARIES L"OutputColorPrimaries" // amf_int64(AMF_COLOR_PRIMARIES_ENUM); default = AMF_COLOR_PRIMARIES_UNDEFINED, ISO/IEC 23001-8_2013 7.1 See ColorSpace.h for enum
|
||||
#define AMF_VIDEO_DECODER_OUTPUT_COLOR_PRIMARIES L"OutputColorPrimaries" // amf_int64(AMF_COLOR_PRIMARIES_ENUM); default = AMF_COLOR_PRIMARIES_UNDEFINED, ISO/IEC 23001-8_2013 7.1 See ColorSpace.h for enum
|
||||
#define AMF_VIDEO_DECODER_OUTPUT_HDR_METADATA L"OutHDRMetadata" // AMFBuffer containing AMFHDRMetadata; default NULL
|
||||
|
||||
#define AMF_VIDEO_DECODER_LOW_LATENCY L"LowLatencyDecode" // amf_bool; default = false; true = low latency decode, false = regular decode
|
||||
|
||||
#if defined(__ANDROID__)
|
||||
#define AMF_VIDEO_DECODER_NATIVEWINDOW L"AndroidNativeWindow" // amf_int64; default = 0; pointer to native window
|
||||
|
@ -118,5 +120,7 @@ enum AMF_TIMESTAMP_MODE_ENUM
|
|||
#define AMF_VIDEO_DECODER_NATIVEWINDOW L"AppleNativeWindow" // amf_int64; default = 0; pointer to native window
|
||||
#endif //__APPLE__
|
||||
|
||||
#define AMF_VIDEO_DECODER_ENABLE_SMART_ACCESS_VIDEO L"EnableDecoderSmartAccessVideo" // amf_bool; default = false; true = enables smart access video feature
|
||||
#define AMF_VIDEO_DECODER_SKIP_TRANSFER_SMART_ACCESS_VIDEO L"SkipTransferSmartAccessVideo" // amf_bool; default = false; true = keeps output on GPU where it ran
|
||||
|
||||
#endif //#ifndef AMF_VideoDecoderUVD_h
|
||||
|
|
|
@ -163,6 +163,11 @@ enum AMF_VIDEO_ENCODER_AV1_INTRA_REFRESH_MODE_ENUM
|
|||
AMF_VIDEO_ENCODER_AV1_INTRA_REFRESH_MODE__GOP_ALIGNED = 1,
|
||||
AMF_VIDEO_ENCODER_AV1_INTRA_REFRESH_MODE__CONTINUOUS = 2
|
||||
};
|
||||
enum AMF_VIDEO_ENCODER_AV1_LTR_MODE_ENUM
|
||||
{
|
||||
AMF_VIDEO_ENCODER_AV1_LTR_MODE_RESET_UNUSED = 0,
|
||||
AMF_VIDEO_ENCODER_AV1_LTR_MODE_KEEP_UNUSED = 1
|
||||
};
|
||||
|
||||
|
||||
// *** Static properties - can be set only before Init() ***
|
||||
|
@ -207,6 +212,7 @@ enum AMF_VIDEO_ENCODER_AV1_INTRA_REFRESH_MODE_ENUM
|
|||
// Picture Management Configuration
|
||||
#define AMF_VIDEO_ENCODER_AV1_MAX_NUM_TEMPORAL_LAYERS L"Av1MaxNumOfTemporalLayers" // amf_int64; default = depends on USAGE; Max number of temporal layers might be enabled. The maximum value can be queried from AMF_VIDEO_ENCODER_AV1_CAP_MAX_NUM_TEMPORAL_LAYERS
|
||||
#define AMF_VIDEO_ENCODER_AV1_MAX_LTR_FRAMES L"Av1MaxNumLTRFrames" // amf_int64; default = depends on USAGE; Max number of LTR frames. The maximum value can be queried from AMF_VIDEO_ENCODER_AV1_CAP_MAX_NUM_LTR_FRAMES
|
||||
#define AMF_VIDEO_ENCODER_AV1_LTR_MODE L"Av1LTRMode" // amf_int64(AMF_VIDEO_ENCODER_AV1_LTR_MODE_ENUM); default = AMF_VIDEO_ENCODER_AV1_LTR_MODE_RESET_UNUSED; remove/keep unused LTRs (not specified in property AMF_VIDEO_ENCODER_AV1_FORCE_LTR_REFERENCE_BITFIELD)
|
||||
#define AMF_VIDEO_ENCODER_AV1_MAX_NUM_REFRAMES L"Av1MaxNumRefFrames" // amf_int64; default = 1; Maximum number of reference frames
|
||||
|
||||
// color conversion
|
||||
|
@ -281,7 +287,7 @@ enum AMF_VIDEO_ENCODER_AV1_INTRA_REFRESH_MODE_ENUM
|
|||
#define AMF_VIDEO_ENCODER_AV1_CAP_NUM_OF_HW_INSTANCES L"Av1CapNumOfHwInstances" // amf_int64; default = N/A; number of HW encoder instances
|
||||
#define AMF_VIDEO_ENCODER_AV1_CAP_MAX_THROUGHPUT L"Av1CapMaxThroughput" // amf_int64; default = N/A; MAX throughput for AV1 encoder in MB (16 x 16 pixel)
|
||||
#define AMF_VIDEO_ENCODER_AV1_CAP_REQUESTED_THROUGHPUT L"Av1CapRequestedThroughput" // amf_int64; default = N/A; Currently total requested throughput for AV1 encode in MB (16 x 16 pixel)
|
||||
#define AMF_VIDEO_ENCODER_AV1_CAP_COLOR_CONVERSION L"Av1CapColorConversion" // amf_int64(AMF_ACCELERATION_TYPE); default = N/A; type of supported color conversion.
|
||||
#define AMF_VIDEO_ENCODER_AV1_CAP_COLOR_CONVERSION L"Av1CapColorConversion" // amf_int64(AMF_ACCELERATION_TYPE); default = N/A; type of supported color conversion. default AMF_ACCEL_GPU
|
||||
#define AMF_VIDEO_ENCODER_AV1_CAP_PRE_ANALYSIS L"Av1PreAnalysis" // amf_bool - pre analysis module is available for AV1 UVE encoder, n/a for the other encoders
|
||||
#define AMF_VIDEO_ENCODER_AV1_CAP_MAX_BITRATE L"Av1MaxBitrate" // amf_int64; default = N/A; Maximum bit rate in bits
|
||||
#define AMF_VIDEO_ENCODER_AV1_CAP_MAX_PROFILE L"Av1MaxProfile" // amf_int64(AMF_VIDEO_ENCODER_AV1_PROFILE_ENUM); default = N/A; max value of code profile
|
||||
|
@ -289,4 +295,6 @@ enum AMF_VIDEO_ENCODER_AV1_INTRA_REFRESH_MODE_ENUM
|
|||
#define AMF_VIDEO_ENCODER_AV1_CAP_MAX_NUM_TEMPORAL_LAYERS L"Av1CapMaxNumTemporalLayers" // amf_int64; default = N/A; The cap of maximum number of temporal layers
|
||||
#define AMF_VIDEO_ENCODER_AV1_CAP_MAX_NUM_LTR_FRAMES L"Av1CapMaxNumLTRFrames" // amf_int64; default = N/A; The cap of maximum number of LTR frames. This value is calculated based on current value of AMF_VIDEO_ENCODER_AV1_MAX_NUM_TEMPORAL_LAYERS.
|
||||
|
||||
#define AMF_VIDEO_ENCODER_AV1_ENABLE_SMART_ACCESS_VIDEO L"Av1EnableEncoderSmartAccessVideo" // amf_bool; default = false; true = enables smart access video feature
|
||||
|
||||
#endif //#ifndef AMF_VideoEncoderAV1_h
|
||||
|
|
|
@ -80,7 +80,10 @@ enum AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_ENUM
|
|||
AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_CONSTANT_QP = 0,
|
||||
AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_LATENCY_CONSTRAINED_VBR,
|
||||
AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VBR,
|
||||
AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_CBR
|
||||
AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_CBR,
|
||||
AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_QUALITY_VBR,
|
||||
AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_HIGH_QUALITY_VBR,
|
||||
AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_HIGH_QUALITY_CBR
|
||||
};
|
||||
|
||||
enum AMF_VIDEO_ENCODER_HEVC_PICTURE_TYPE_ENUM
|
||||
|
@ -145,9 +148,10 @@ enum AMF_VIDEO_ENCODER_HEVC_LTR_MODE_ENUM
|
|||
#define AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET L"HevcQualityPreset" // amf_int64(AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_ENUM); default = depends on USAGE; Quality Preset
|
||||
#define AMF_VIDEO_ENCODER_HEVC_EXTRADATA L"HevcExtraData" // AMFInterface* - > AMFBuffer*; SPS/PPS buffer - read-only
|
||||
#define AMF_VIDEO_ENCODER_HEVC_ASPECT_RATIO L"HevcAspectRatio" // AMFRatio; default = 1, 1
|
||||
#define AMF_VIDEO_ENCODER_HEVC_LOWLATENCY_MODE L"LowLatencyInternal" // bool; default = false, enables low latency mode
|
||||
#define AMF_VIDEO_ENCODER_HEVC_LOWLATENCY_MODE L"LowLatencyInternal" // bool; default = false, enables low latency mode
|
||||
#define AMF_VIDEO_ENCODER_HEVC_PRE_ANALYSIS_ENABLE L"HevcEnablePreAnalysis" // bool; default = false; enables the pre-analysis module. Currently only works in AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VBR mode. Refer to AMF Video PreAnalysis API reference for more details.
|
||||
#define AMF_VIDEO_ENCODER_HEVC_NOMINAL_RANGE L"HevcNominalRange" // amf_int64(AMF_VIDEO_ENCODER_HEVC_NOMINAL_RANGE); default = amf_int64(AMF_VIDEO_ENCODER_HEVC_NOMINAL_RANGE_STUDIO); property is bool but amf_int64 also works for backward compatibility.
|
||||
#define AMF_VIDEO_ENCODER_HEVC_NOMINAL_RANGE L"HevcNominalRange" // amf_int64(AMF_VIDEO_ENCODER_HEVC_NOMINAL_RANGE); default = amf_int64(AMF_VIDEO_ENCODER_HEVC_NOMINAL_RANGE_STUDIO); property is bool but amf_int64 also works for backward compatibility.
|
||||
#define AMF_VIDEO_ENCODER_HEVC_MAX_NUM_TEMPORAL_LAYERS L"HevcMaxNumOfTemporalLayers" // amf_int64; default = 1; Max number of temporal layers.
|
||||
|
||||
// Picture control properties
|
||||
#define AMF_VIDEO_ENCODER_HEVC_NUM_GOPS_PER_IDR L"HevcGOPSPerIDR" // amf_int64; default = 1; The frequency to insert IDR as start of a GOP. 0 means no IDR will be inserted.
|
||||
|
@ -159,6 +163,7 @@ enum AMF_VIDEO_ENCODER_HEVC_LTR_MODE_ENUM
|
|||
|
||||
// Rate control properties
|
||||
#define AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD L"HevcRateControlMethod" // amf_int64(AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_ENUM); default = depends on USAGE; Rate Control Method
|
||||
#define AMF_VIDEO_ENCODER_HEVC_QVBR_QUALITY_LEVEL L"HevcQvbrQualityLevel" // amf_int64; default = 23; QVBR quality level; range = 1-51
|
||||
#define AMF_VIDEO_ENCODER_HEVC_VBV_BUFFER_SIZE L"HevcVBVBufferSize" // amf_int64; default = depends on USAGE; VBV Buffer Size in bits
|
||||
#define AMF_VIDEO_ENCODER_HEVC_INITIAL_VBV_BUFFER_FULLNESS L"HevcInitialVBVBufferFullness" // amf_int64; default = 64; Initial VBV Buffer Fullness 0=0% 64=100%
|
||||
#define AMF_VIDEO_ENCODER_HEVC_ENABLE_VBAQ L"HevcEnableVBAQ" // // bool; default = depends on USAGE; Enable auto VBAQ
|
||||
|
@ -213,6 +218,9 @@ enum AMF_VIDEO_ENCODER_HEVC_LTR_MODE_ENUM
|
|||
#define AMF_VIDEO_ENCODER_HEVC_INPUT_HDR_METADATA L"HevcInHDRMetadata" // AMFBuffer containing AMFHDRMetadata; default NULL
|
||||
//#define AMF_VIDEO_ENCODER_HEVC_OUTPUT_HDR_METADATA L"HevcOutHDRMetadata" // AMFBuffer containing AMFHDRMetadata; default NULL
|
||||
|
||||
// SVC
|
||||
#define AMF_VIDEO_ENCODER_HEVC_NUM_TEMPORAL_LAYERS L"HevcNumOfTemporalLayers" // amf_int64; default = 1; Number of temporal layers. Can be changed at any time but the change is only applied when encoding next base layer frame.
|
||||
|
||||
// DPB management
|
||||
#define AMF_VIDEO_ENCODER_HEVC_PICTURE_TRANSFER_MODE L"HevcPicTransferMode" // amf_int64(AMF_VIDEO_ENCODER_HEVC_PICTURE_TRANSFER_MODE_ENUM); default = AMF_VIDEO_ENCODER_HEVC_PICTURE_TRANSFER_MODE_OFF - whether to exchange reference/reconstructed pic between encoder and application
|
||||
|
||||
|
@ -282,6 +290,7 @@ enum AMF_VIDEO_ENCODER_HEVC_LTR_MODE_ENUM
|
|||
#define AMF_VIDEO_ENCODER_HEVC_CAP_MAX_LEVEL L"HevcMaxLevel" // amf_int64 maximum profile level
|
||||
#define AMF_VIDEO_ENCODER_HEVC_CAP_MIN_REFERENCE_FRAMES L"HevcMinReferenceFrames" // amf_int64 minimum number of reference frames
|
||||
#define AMF_VIDEO_ENCODER_HEVC_CAP_MAX_REFERENCE_FRAMES L"HevcMaxReferenceFrames" // amf_int64 maximum number of reference frames
|
||||
#define AMF_VIDEO_ENCODER_HEVC_CAP_MAX_TEMPORAL_LAYERS L"HevcMaxTemporalLayers" // amf_int64 maximum number of temporal layers
|
||||
#define AMF_VIDEO_ENCODER_HEVC_CAP_NUM_OF_HW_INSTANCES L"HevcNumOfHwInstances" // amf_int64 number of HW encoder instances
|
||||
#define AMF_VIDEO_ENCODER_HEVC_CAP_COLOR_CONVERSION L"HevcColorConversion" // amf_int64(AMF_ACCELERATION_TYPE) - type of supported color conversion. default AMF_ACCEL_GPU
|
||||
#define AMF_VIDEO_ENCODER_HEVC_CAP_PRE_ANALYSIS L"HevcPreAnalysis" // amf_bool - pre analysis module is available for HEVC UVE encoder, n/a for the other encoders
|
||||
|
@ -293,4 +302,6 @@ enum AMF_VIDEO_ENCODER_HEVC_LTR_MODE_ENUM
|
|||
// properties set on AMFComponent to control component creation
|
||||
#define AMF_VIDEO_ENCODER_HEVC_MEMORY_TYPE L"HevcEncoderMemoryType" // amf_int64(AMF_MEMORY_TYPE) , default is AMF_MEMORY_UNKNOWN, Values : AMF_MEMORY_DX11, AMF_MEMORY_DX9, AMF_MEMORY_UNKNOWN (auto)
|
||||
|
||||
#define AMF_VIDEO_ENCODER_HEVC_ENABLE_SMART_ACCESS_VIDEO L"HevcEnableEncoderSmartAccessVideo" // amf_bool; default = false; true = enables smart access video feature
|
||||
|
||||
#endif //#ifndef AMF_VideoEncoderHEVC_h
|
||||
|
|
|
@ -66,6 +66,29 @@ enum AMF_VIDEO_ENCODER_PROFILE_ENUM
|
|||
AMF_VIDEO_ENCODER_PROFILE_CONSTRAINED_HIGH = 257
|
||||
};
|
||||
|
||||
enum AMF_VIDEO_ENCODER_H264_LEVEL_ENUM
|
||||
{
|
||||
AMF_H264_LEVEL__1 = 10,
|
||||
AMF_H264_LEVEL__1_1 = 11,
|
||||
AMF_H264_LEVEL__1_2 = 12,
|
||||
AMF_H264_LEVEL__1_3 = 13,
|
||||
AMF_H264_LEVEL__2 = 20,
|
||||
AMF_H264_LEVEL__2_1 = 21,
|
||||
AMF_H264_LEVEL__2_2 = 22,
|
||||
AMF_H264_LEVEL__3 = 30,
|
||||
AMF_H264_LEVEL__3_1 = 31,
|
||||
AMF_H264_LEVEL__3_2 = 32,
|
||||
AMF_H264_LEVEL__4 = 40,
|
||||
AMF_H264_LEVEL__4_1 = 41,
|
||||
AMF_H264_LEVEL__4_2 = 42,
|
||||
AMF_H264_LEVEL__5 = 50,
|
||||
AMF_H264_LEVEL__5_1 = 51,
|
||||
AMF_H264_LEVEL__5_2 = 52,
|
||||
AMF_H264_LEVEL__6 = 60,
|
||||
AMF_H264_LEVEL__6_1 = 61,
|
||||
AMF_H264_LEVEL__6_2 = 62
|
||||
};
|
||||
|
||||
enum AMF_VIDEO_ENCODER_SCANTYPE_ENUM
|
||||
{
|
||||
AMF_VIDEO_ENCODER_SCANTYPE_PROGRESSIVE = 0,
|
||||
|
@ -79,7 +102,9 @@ enum AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_ENUM
|
|||
AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CBR,
|
||||
AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VBR,
|
||||
AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_LATENCY_CONSTRAINED_VBR,
|
||||
AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_QUALITY_VBR
|
||||
AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_QUALITY_VBR,
|
||||
AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_HIGH_QUALITY_VBR,
|
||||
AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_HIGH_QUALITY_CBR
|
||||
};
|
||||
|
||||
enum AMF_VIDEO_ENCODER_QUALITY_PRESET_ENUM
|
||||
|
@ -149,7 +174,7 @@ enum AMF_VIDEO_ENCODER_LTR_MODE_ENUM
|
|||
#define AMF_VIDEO_ENCODER_EXTRADATA L"ExtraData" // AMFInterface* - > AMFBuffer*; SPS/PPS buffer in Annex B format - read-only
|
||||
#define AMF_VIDEO_ENCODER_USAGE L"Usage" // amf_int64(AMF_VIDEO_ENCODER_USAGE_ENUM); default = N/A; Encoder usage type. fully configures parameter set.
|
||||
#define AMF_VIDEO_ENCODER_PROFILE L"Profile" // amf_int64(AMF_VIDEO_ENCODER_PROFILE_ENUM) ; default = AMF_VIDEO_ENCODER_PROFILE_MAIN; H264 profile
|
||||
#define AMF_VIDEO_ENCODER_PROFILE_LEVEL L"ProfileLevel" // amf_int64; default = 42; H264 profile level
|
||||
#define AMF_VIDEO_ENCODER_PROFILE_LEVEL L"ProfileLevel" // amf_int64(AMF_VIDEO_ENCODER_H264_LEVEL_ENUM); default = AMF_H264_LEVEL__4_2; H264 level
|
||||
#define AMF_VIDEO_ENCODER_MAX_LTR_FRAMES L"MaxOfLTRFrames" // amf_int64; default = 0; Max number of LTR frames
|
||||
#define AMF_VIDEO_ENCODER_LTR_MODE L"LTRMode" // amf_int64(AMF_VIDEO_ENCODER_LTR_MODE_ENUM); default = AMF_VIDEO_ENCODER_LTR_MODE_RESET_UNUSED; remove/keep unused LTRs (not specified in property AMF_VIDEO_ENCODER_FORCE_LTR_REFERENCE_BITFIELD)
|
||||
#define AMF_VIDEO_ENCODER_SCANTYPE L"ScanType" // amf_int64(AMF_VIDEO_ENCODER_SCANTYPE_ENUM); default = AMF_VIDEO_ENCODER_SCANTYPE_PROGRESSIVE; indicates input stream type
|
||||
|
@ -164,6 +189,7 @@ enum AMF_VIDEO_ENCODER_LTR_MODE_ENUM
|
|||
#define AMF_VIDEO_ENCODER_RATE_CONTROL_PREANALYSIS_ENABLE L"RateControlPreanalysisEnable" // amf_int64(AMF_VIDEO_ENCODER_PREENCODE_MODE_ENUM); default = AMF_VIDEO_ENCODER_PREENCODE_DISABLED; enables pre-encode assisted rate control. Deprecated, please use AMF_VIDEO_ENCODER_PREENCODE_ENABLE instead.
|
||||
#define AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD L"RateControlMethod" // amf_int64(AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_ENUM); default = depends on USAGE; Rate Control Method
|
||||
#define AMF_VIDEO_ENCODER_QVBR_QUALITY_LEVEL L"QvbrQualityLevel" // amf_int64; default = 23; QVBR quality level; range = 1-51
|
||||
#define AMF_VIDEO_ENCODER_MAX_NUM_TEMPORAL_LAYERS L"MaxNumOfTemporalLayers" // amf_int64; default = 1; Max number of temporal layers.
|
||||
#if !defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma deprecated("AMF_VIDEO_ENCODER_RATE_CONTROL_PREANALYSIS_ENABLE")
|
||||
#endif
|
||||
|
@ -323,4 +349,6 @@ enum AMF_VIDEO_ENCODER_LTR_MODE_ENUM
|
|||
// properties set on AMFComponent to control component creation
|
||||
#define AMF_VIDEO_ENCODER_MEMORY_TYPE L"EncoderMemoryType" // amf_int64(AMF_MEMORY_TYPE) , default is AMF_MEMORY_UNKNOWN, Values : AMF_MEMORY_DX11, AMF_MEMORY_DX9, AMF_MEMORY_VULKAN or AMF_MEMORY_UNKNOWN (auto)
|
||||
|
||||
#define AMF_VIDEO_ENCODER_ENABLE_SMART_ACCESS_VIDEO L"EnableEncoderSmartAccessVideo" // amf_bool; default = false; true = enables smart access video feature
|
||||
|
||||
#endif //#ifndef AMF_VideoEncoderVCE_h
|
||||
|
|
|
@ -39,6 +39,11 @@
|
|||
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
|
||||
AMF_WEAK GUID AMFFenceValueGUID = { 0x62a693d3, 0xbb4a, 0x46c9, { 0xa5, 0x04, 0x9a, 0x8e, 0x97, 0xbf, 0xf0, 0x56 } }; // The last value to wait on the fence from AMFFenceGUID; sizeof(UINT64), set on ID3D12Fence
|
||||
|
||||
AMF_WEAK GUID AMFFenceD3D11GUID = { 0xdffdf6e0, 0x85e0, 0x4645, { 0x9d, 0x7, 0xe6, 0x4a, 0x19, 0x6b, 0xc9, 0xbf } }; // IUnknown (ID3D11Fence) OpenSharedFence for interop
|
||||
AMF_WEAK GUID AMFFenceValueD3D11GUID = { 0x86581b71, 0x699f, 0x484b, { 0xb8, 0x75, 0x24, 0xda, 0x49, 0x8a, 0x74, 0xcf } }; // last value to wait on in d3d11
|
||||
AMF_WEAK GUID AMFSharedHandleFenceGUID = { 0xca60dcc8, 0x76d1, 0x4088, 0xad, 0xd, 0x97, 0x71, 0xe7, 0xb0, 0x92, 0x49 }; // ID3D12Fence shared handle for D3D11 interop
|
||||
|
||||
#endif
|
||||
|
||||
#endif // __D3D12AMF_h__
|
|
@ -114,7 +114,7 @@ extern "C"
|
|||
#define AMF_DLL_NAME L"amfrt32.dll"
|
||||
#define AMF_DLL_NAMEA "amfrt32.dll"
|
||||
#endif
|
||||
#elif defined(__ANDROID__)
|
||||
#elif defined(__ANDROID__) && !defined(AMF_ANDROID_ENCODER)
|
||||
#define AMF_DLL_NAME L"libamf.so"
|
||||
#define AMF_DLL_NAMEA "libamf.so"
|
||||
#elif defined(__APPLE__)
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
// #error Need to define AMF_ALIGN
|
||||
#endif
|
||||
|
||||
#if defined(__linux) || (__clang__)
|
||||
#ifndef _WIN32
|
||||
typedef signed int HRESULT;
|
||||
#define SUCCEEDED(hr) (((HRESULT)(hr)) >= 0)
|
||||
#define FAILED(hr) (((HRESULT)(hr)) < 0)
|
||||
|
@ -184,9 +184,11 @@ typedef amf_uint32 amf_flags;
|
|||
|
||||
#define AMF_SECOND 10000000L // 1 second in 100 nanoseconds
|
||||
#define AMF_MILLISECOND (AMF_SECOND / 1000)
|
||||
#define AMF_MICROSECOND (AMF_MILLISECOND / 1000)
|
||||
|
||||
#define AMF_MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
#define AMF_MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
#define AMF_CLAMP(x, a, b) (AMF_MIN(AMF_MAX(x, a), b))
|
||||
|
||||
#define AMF_BITS_PER_BYTE 8
|
||||
|
||||
|
@ -380,13 +382,10 @@ static AMF_INLINE struct AMFRatio AMFConstructRatio(amf_uint32 num, amf_uint32 d
|
|||
#pragma pack(push, 1)
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning( push )
|
||||
#endif
|
||||
#if defined(WIN32)
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(disable : 4200)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef struct AMFColor
|
||||
{
|
||||
union
|
||||
|
|
|
@ -68,9 +68,11 @@ namespace amf
|
|||
AMF_SURFACE_Y410, ///< 16 - packed 4:4:4 - 10 bit per YUV component, 2 bits per A, AVYU
|
||||
AMF_SURFACE_Y416, ///< 16 - packed 4:4:4 - 16 bit per component 4 bytes, AVYU
|
||||
AMF_SURFACE_GRAY32, ///< 17 - single component - 32 bit
|
||||
AMF_SURFACE_P012, ///< 18 - planar 4:2:0 Y width x height + packed UV width/2 x height/2 - 12 bit per component (16 allocated, upper 12 bits are used)
|
||||
AMF_SURFACE_P016, ///< 19 - planar 4:2:0 Y width x height + packed UV width/2 x height/2 - 16 bit per component (16 allocated, all bits are used)
|
||||
|
||||
AMF_SURFACE_FIRST = AMF_SURFACE_NV12,
|
||||
AMF_SURFACE_LAST = AMF_SURFACE_GRAY32
|
||||
AMF_SURFACE_LAST = AMF_SURFACE_P016
|
||||
} AMF_SURFACE_FORMAT;
|
||||
//----------------------------------------------------------------------------------------------
|
||||
// AMF_SURFACE_USAGE translates to D3D11_BIND_FLAG or VkImageUsageFlags
|
||||
|
|
|
@ -366,6 +366,8 @@ namespace amf
|
|||
}
|
||||
|
||||
#if (__cplusplus == 201103L) || defined(__GXX_EXPERIMENTAL_CXX0X) || (_MSC_VER >= 1600)
|
||||
#pragma warning (push)
|
||||
#pragma warning (disable : 26439) //This kind of function may not throw. Declare it 'noexcept'.
|
||||
String(String&& p_other) : m_Str(NULL)
|
||||
{
|
||||
operator=(p_other);
|
||||
|
@ -498,6 +500,7 @@ namespace amf
|
|||
p_other.m_Str = NULL; // Transfer the ownership
|
||||
return *this;
|
||||
}
|
||||
#pragma warning (pop)
|
||||
#endif
|
||||
wchar_t& operator[](size_t index)
|
||||
{
|
||||
|
@ -755,7 +758,7 @@ namespace amf
|
|||
switch(AMFVariantGetType(pSrc))
|
||||
{
|
||||
case AMF_VARIANT_EMPTY:
|
||||
errRet = AMFVariantClear(pDest);
|
||||
errRet = AMFVariantInit(pDest);
|
||||
break;
|
||||
case AMF_VARIANT_BOOL:
|
||||
errRet = AMFVariantAssignBool(pDest, AMFVariantBool(pSrc));
|
||||
|
@ -1201,21 +1204,21 @@ namespace amf
|
|||
{
|
||||
res = AMF_OK;
|
||||
char buff[0xFF];
|
||||
sprintf(buff, "%d,%d", value.num, value.den);
|
||||
sprintf(buff, "%u,%u", value.num, value.den);
|
||||
return buff;
|
||||
}
|
||||
static AMF_INLINE AMFVariant::String AMF_STD_CALL AMFConvertRatioToString(const AMFRatio& value, AMF_RESULT& res)
|
||||
{
|
||||
res = AMF_OK;
|
||||
char buff[0xFF];
|
||||
sprintf(buff, "%d,%d", value.num, value.den);
|
||||
sprintf(buff, "%u,%u", value.num, value.den);
|
||||
return buff;
|
||||
}
|
||||
static AMF_INLINE AMFVariant::String AMF_STD_CALL AMFConvertColorToString(const AMFColor& value, AMF_RESULT& res)
|
||||
{
|
||||
res = AMF_OK;
|
||||
char buff[0xFF];
|
||||
sprintf(buff, "%d,%d,%d,%d", value.r, value.g, value.b, value.a);
|
||||
sprintf(buff, "%u,%u,%u,%u", value.r, value.g, value.b, value.a);
|
||||
return buff;
|
||||
}
|
||||
|
||||
|
@ -1346,7 +1349,7 @@ namespace amf
|
|||
int readElements = 0;
|
||||
if(value.size() > 0)
|
||||
{
|
||||
readElements = sscanf(value.c_str(), "%d,%d", &tmp.num, &tmp.den);
|
||||
readElements = sscanf(value.c_str(), "%u,%u", &tmp.num, &tmp.den);
|
||||
}
|
||||
if(readElements)
|
||||
{
|
||||
|
@ -1362,7 +1365,7 @@ namespace amf
|
|||
int readElements = 0;
|
||||
if(value.size() > 0)
|
||||
{
|
||||
readElements = sscanf(value.c_str(), "%d,%d", &tmp.num, &tmp.den);
|
||||
readElements = sscanf(value.c_str(), "%u,%u", &tmp.num, &tmp.den);
|
||||
}
|
||||
if(readElements)
|
||||
{
|
||||
|
@ -1581,7 +1584,7 @@ namespace amf
|
|||
AMF_RESULT errRet = AMF_OK;
|
||||
AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);
|
||||
|
||||
errRet = AMFVariantClear(pDest);
|
||||
errRet = AMFVariantInit(pDest);
|
||||
if(errRet == AMF_OK)
|
||||
{
|
||||
pDest->type = AMF_VARIANT_BOOL;
|
||||
|
@ -1595,7 +1598,7 @@ namespace amf
|
|||
AMF_RESULT errRet = AMF_OK;
|
||||
AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);
|
||||
|
||||
errRet = AMFVariantClear(pDest);
|
||||
errRet = AMFVariantInit(pDest);
|
||||
if(errRet == AMF_OK)
|
||||
{
|
||||
pDest->type = AMF_VARIANT_INT64;
|
||||
|
@ -1609,7 +1612,7 @@ namespace amf
|
|||
AMF_RESULT errRet = AMF_OK;
|
||||
AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);
|
||||
|
||||
errRet = AMFVariantClear(pDest);
|
||||
errRet = AMFVariantInit(pDest);
|
||||
if(errRet == AMF_OK)
|
||||
{
|
||||
pDest->type = AMF_VARIANT_DOUBLE;
|
||||
|
@ -1623,7 +1626,7 @@ namespace amf
|
|||
AMF_RESULT errRet = AMF_OK;
|
||||
AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);
|
||||
|
||||
errRet = AMFVariantClear(pDest);
|
||||
errRet = AMFVariantInit(pDest);
|
||||
if (errRet == AMF_OK)
|
||||
{
|
||||
pDest->type = AMF_VARIANT_FLOAT;
|
||||
|
@ -1638,7 +1641,7 @@ namespace amf
|
|||
AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);
|
||||
AMF_VARIANT_RETURN_IF_INVALID_POINTER(pValue);
|
||||
|
||||
errRet = AMFVariantClear(pDest);
|
||||
errRet = AMFVariantInit(pDest);
|
||||
if(errRet == AMF_OK)
|
||||
{
|
||||
const size_t size = (strlen(pValue) + 1);
|
||||
|
@ -1662,7 +1665,7 @@ namespace amf
|
|||
AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);
|
||||
AMF_VARIANT_RETURN_IF_INVALID_POINTER(pValue);
|
||||
|
||||
errRet = AMFVariantClear(pDest);
|
||||
errRet = AMFVariantInit(pDest);
|
||||
if(errRet == AMF_OK)
|
||||
{
|
||||
const size_t size = (wcslen(pValue) + 1);
|
||||
|
@ -1686,7 +1689,7 @@ namespace amf
|
|||
AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);
|
||||
//AMF_VARIANT_RETURN_IF_INVALID_POINTER(pValue);//can be NULL
|
||||
|
||||
errRet = AMFVariantClear(pDest);
|
||||
errRet = AMFVariantInit(pDest);
|
||||
if(errRet == AMF_OK)
|
||||
{
|
||||
pDest->type = AMF_VARIANT_INTERFACE;
|
||||
|
@ -1715,7 +1718,7 @@ namespace amf
|
|||
AMF_RESULT errRet = AMF_OK;
|
||||
AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);
|
||||
|
||||
errRet = AMFVariantClear(pDest);
|
||||
errRet = AMFVariantInit(pDest);
|
||||
if(errRet == AMF_OK)
|
||||
{
|
||||
pDest->type = AMF_VARIANT_RECT;
|
||||
|
@ -1736,7 +1739,7 @@ namespace amf
|
|||
AMF_RESULT errRet = AMF_OK;
|
||||
AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);
|
||||
|
||||
errRet = AMFVariantClear(pDest);
|
||||
errRet = AMFVariantInit(pDest);
|
||||
if(errRet == AMF_OK)
|
||||
{
|
||||
pDest->type = AMF_VARIANT_SIZE;
|
||||
|
@ -1773,7 +1776,7 @@ namespace amf
|
|||
AMF_RESULT errRet = AMF_OK;
|
||||
AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);
|
||||
|
||||
errRet = AMFVariantClear(pDest);
|
||||
errRet = AMFVariantInit(pDest);
|
||||
if(errRet == AMF_OK)
|
||||
{
|
||||
pDest->type = AMF_VARIANT_POINT;
|
||||
|
@ -1787,7 +1790,7 @@ namespace amf
|
|||
AMF_RESULT errRet = AMF_OK;
|
||||
AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);
|
||||
|
||||
errRet = AMFVariantClear(pDest);
|
||||
errRet = AMFVariantInit(pDest);
|
||||
if (errRet == AMF_OK)
|
||||
{
|
||||
pDest->type = AMF_VARIANT_FLOAT_SIZE;
|
||||
|
@ -1801,7 +1804,7 @@ namespace amf
|
|||
AMF_RESULT errRet = AMF_OK;
|
||||
AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);
|
||||
|
||||
errRet = AMFVariantClear(pDest);
|
||||
errRet = AMFVariantInit(pDest);
|
||||
if (errRet == AMF_OK)
|
||||
{
|
||||
pDest->type = AMF_VARIANT_FLOAT_POINT2D;
|
||||
|
@ -1815,7 +1818,7 @@ namespace amf
|
|||
AMF_RESULT errRet = AMF_OK;
|
||||
AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);
|
||||
|
||||
errRet = AMFVariantClear(pDest);
|
||||
errRet = AMFVariantInit(pDest);
|
||||
if (errRet == AMF_OK)
|
||||
{
|
||||
pDest->type = AMF_VARIANT_FLOAT_POINT3D;
|
||||
|
@ -1829,7 +1832,7 @@ namespace amf
|
|||
AMF_RESULT errRet = AMF_OK;
|
||||
AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);
|
||||
|
||||
errRet = AMFVariantClear(pDest);
|
||||
errRet = AMFVariantInit(pDest);
|
||||
if (errRet == AMF_OK)
|
||||
{
|
||||
pDest->type = AMF_VARIANT_FLOAT_VECTOR4D;
|
||||
|
@ -1850,7 +1853,7 @@ namespace amf
|
|||
AMF_RESULT errRet = AMF_OK;
|
||||
AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);
|
||||
|
||||
errRet = AMFVariantClear(pDest);
|
||||
errRet = AMFVariantInit(pDest);
|
||||
if(errRet == AMF_OK)
|
||||
{
|
||||
pDest->type = AMF_VARIANT_RATE;
|
||||
|
@ -1871,7 +1874,7 @@ namespace amf
|
|||
AMF_RESULT errRet = AMF_OK;
|
||||
AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);
|
||||
|
||||
errRet = AMFVariantClear(pDest);
|
||||
errRet = AMFVariantInit(pDest);
|
||||
if(errRet == AMF_OK)
|
||||
{
|
||||
pDest->type = AMF_VARIANT_RATIO;
|
||||
|
@ -1892,7 +1895,7 @@ namespace amf
|
|||
AMF_RESULT errRet = AMF_OK;
|
||||
AMF_VARIANT_RETURN_IF_INVALID_POINTER(pDest);
|
||||
|
||||
errRet = AMFVariantClear(pDest);
|
||||
errRet = AMFVariantInit(pDest);
|
||||
if(errRet == AMF_OK)
|
||||
{
|
||||
pDest->type = AMF_VARIANT_COLOR;
|
||||
|
@ -1980,6 +1983,7 @@ namespace amf
|
|||
//-------------------------------------------------------------------------------------------------
|
||||
AMF_INLINE AMFVariant& AMFVariant::operator=(const AMFVariantStruct& other)
|
||||
{
|
||||
AMFVariantClear(this);
|
||||
AMFVariantCopy(this, const_cast<AMFVariantStruct*>(&other));
|
||||
return *this;
|
||||
}
|
||||
|
@ -1988,6 +1992,7 @@ namespace amf
|
|||
{
|
||||
if(pOther != NULL)
|
||||
{
|
||||
AMFVariantClear(this);
|
||||
AMFVariantCopy(this, const_cast<AMFVariantStruct*>(pOther));
|
||||
}
|
||||
return *this;
|
||||
|
@ -1995,6 +2000,7 @@ namespace amf
|
|||
//-------------------------------------------------------------------------------------------------
|
||||
AMF_INLINE AMFVariant& AMFVariant::operator=(const AMFVariant& other)
|
||||
{
|
||||
AMFVariantClear(this);
|
||||
AMFVariantCopy(this,
|
||||
const_cast<AMFVariantStruct*>(static_cast<const AMFVariantStruct*>(&other)));
|
||||
return *this;
|
||||
|
@ -2003,6 +2009,7 @@ namespace amf
|
|||
template<typename T>
|
||||
AMFVariant& AMFVariant::operator=(const AMFInterfacePtr_T<T>& value)
|
||||
{
|
||||
AMFVariantClear(this);
|
||||
AMFVariantAssignInterface(this, value);
|
||||
return *this;
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
|
||||
#define AMF_VERSION_MAJOR 1
|
||||
#define AMF_VERSION_MINOR 4
|
||||
#define AMF_VERSION_RELEASE 24
|
||||
#define AMF_VERSION_RELEASE 29
|
||||
#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)
|
||||
|
|
|
@ -52,9 +52,9 @@ namespace amf
|
|||
|
||||
typedef struct AMFVulkanSync
|
||||
{
|
||||
amf_size cbSizeof; // sizeof(AMFVulkanSemaphore)
|
||||
amf_size cbSizeof; // sizeof(AMFVulkanSync)
|
||||
void* pNext; // reserved for extensions
|
||||
VkSemaphore hSemaphore;
|
||||
VkSemaphore hSemaphore; // VkSemaphore; can be nullptr
|
||||
bool bSubmitted; // if true - wait for hSemaphore. re-submit hSemaphore if not synced by other ways and set to true
|
||||
VkFence hFence; // To sync on CPU; can be nullptr. Submitted in vkQueueSubmit. If waited for hFence, null it, do not delete or reset.
|
||||
} AMFVulkanSync;
|
||||
|
@ -78,12 +78,12 @@ namespace amf
|
|||
amf_size cbSizeof; // sizeof(AMFVulkanSurface)
|
||||
void* pNext; // reserved for extensions
|
||||
// surface properties
|
||||
VkImage hImage;
|
||||
VkDeviceMemory hMemory;
|
||||
VkImage hImage; // vulkan native image for which the surface is created
|
||||
VkDeviceMemory hMemory; // memory for hImage, can be nullptr
|
||||
amf_int64 iSize; // memory size
|
||||
amf_uint32 eFormat; // VkFormat
|
||||
amf_int32 iWidth;
|
||||
amf_int32 iHeight;
|
||||
amf_int32 iWidth; // image width
|
||||
amf_int32 iHeight; // image height
|
||||
amf_uint32 eCurrentLayout; // VkImageLayout
|
||||
amf_uint32 eUsage; // AMF_SURFACE_USAGE
|
||||
amf_uint32 eAccess; // AMF_MEMORY_CPU_ACCESS
|
||||
|
@ -92,7 +92,7 @@ namespace amf
|
|||
|
||||
typedef struct AMFVulkanView
|
||||
{
|
||||
amf_size cbSizeof; // sizeof(AMFVulkanSurface)
|
||||
amf_size cbSizeof; // sizeof(AMFVulkanView)
|
||||
void* pNext; // reserved for extensions
|
||||
// surface properties
|
||||
AMFVulkanSurface *pSurface;
|
||||
|
@ -102,6 +102,9 @@ namespace amf
|
|||
amf_int32 iPlaneWidthPitch;
|
||||
amf_int32 iPlaneHeightPitch;
|
||||
} AMFVulkanView;
|
||||
|
||||
#define AMF_CONTEXT_VULKAN_COMPUTE_QUEUE L"VulkanComputeQueue" // amf_int64; default=0; Compute queue index in range [0, (VkQueueFamilyProperties.queueCount-1)] of the compute queue family.
|
||||
|
||||
#if defined(__cplusplus)
|
||||
} // namespace amf
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue