From d0b51ccdbff41f45e4001cfbd23afec8904c949a Mon Sep 17 00:00:00 2001
From: foreman
Date: Mon, 15 Jun 2015 18:09:54 -0400
Subject: [PATCH] P4 to Git Change 1161664 by rili@rili_opencl_stg on
2015/06/15 18:01:53
EPR #421679 - remove all source code related to open video
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/opencl/OpenVideo/Makefile#3 delete
... //depot/stg/opencl/drivers/opencl/api/opencl/OpenVideo/OVDecode.cpp#15 delete
... //depot/stg/opencl/drivers/opencl/api/opencl/OpenVideo/OVDecode.def#5 delete
... //depot/stg/opencl/drivers/opencl/api/opencl/OpenVideo/OVDecode.h#7 delete
... //depot/stg/opencl/drivers/opencl/api/opencl/OpenVideo/OVDecode.rc#2 delete
... //depot/stg/opencl/drivers/opencl/api/opencl/OpenVideo/OVDecodeTypes.h#6 delete
... //depot/stg/opencl/drivers/opencl/api/opencl/OpenVideo/OVEncode.cpp#37 delete
... //depot/stg/opencl/drivers/opencl/api/opencl/OpenVideo/OVEncode.h#11 delete
... //depot/stg/opencl/drivers/opencl/api/opencl/OpenVideo/OVEncodeTypes.h#16 delete
... //depot/stg/opencl/drivers/opencl/api/opencl/OpenVideo/OpenVideo.cpp#6 delete
... //depot/stg/opencl/drivers/opencl/api/opencl/OpenVideo/OpenVideo.def#3 delete
... //depot/stg/opencl/drivers/opencl/api/opencl/OpenVideo/OpenVideo.h#5 delete
... //depot/stg/opencl/drivers/opencl/api/opencl/OpenVideo/OpenVideo.rc#3 delete
... //depot/stg/opencl/drivers/opencl/api/opencl/OpenVideo/OpenVideo.sln#5 delete
... //depot/stg/opencl/drivers/opencl/api/opencl/OpenVideo/OpenVideo.vcxproj#11 delete
... //depot/stg/opencl/drivers/opencl/api/opencl/OpenVideo/OpenVideo.vcxproj.filters#3 delete
... //depot/stg/opencl/drivers/opencl/api/opencl/OpenVideo/OpenVideo_2008.sln#2 delete
... //depot/stg/opencl/drivers/opencl/api/opencl/OpenVideo/OpenVideo_2008.vcproj#2 delete
... //depot/stg/opencl/drivers/opencl/api/opencl/OpenVideo/atiumdva.cap#2 delete
... //depot/stg/opencl/drivers/opencl/api/opencl/OpenVideo/build.bat#2 delete
... //depot/stg/opencl/drivers/opencl/api/opencl/OpenVideo/build/Makefile#6 delete
... //depot/stg/opencl/drivers/opencl/api/opencl/OpenVideo/build/Makefile.ov#18 delete
... //depot/stg/opencl/drivers/opencl/api/opencl/OpenVideo/build/Makefile.ovd#27 delete
... //depot/stg/opencl/drivers/opencl/api/opencl/OpenVideo/buildOV/Makefile#5 delete
... //depot/stg/opencl/drivers/opencl/api/opencl/OpenVideo/res/OpenVideo.rc2#2 delete
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/build/Makefile.api#113 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_common.hpp#17 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_context.cpp#43 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_device.cpp#59 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_open_video.cpp#35 delete
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_open_video_amd.h#20 delete
... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpudevice.cpp#273 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpudevice.hpp#91 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpuvirtual.cpp#24 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpuvirtual.hpp#12 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#247 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#512 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#145 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.cpp#311 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.hpp#91 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#366 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.hpp#130 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLContext.cpp#73 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLContext.h#45 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa/hsadevice.cpp#92 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa/hsadevice.hpp#49 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa/hsavirtual.hpp#28 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsadevice.cpp#34 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsadevice.hpp#15 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsavirtual.hpp#20 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/command.hpp#78 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/commandqueue.cpp#21 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/commandqueue.hpp#16 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/object.hpp#15 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/video_session.hpp#13 delete
... //depot/stg/opencl/drivers/opencl/runtime/top.hpp#22 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#235 edit
---
rocclr/runtime/device/cpu/cpudevice.cpp | 4 -
rocclr/runtime/device/cpu/cpuvirtual.cpp | 12 -
rocclr/runtime/device/cpu/cpuvirtual.hpp | 4 -
rocclr/runtime/device/device.hpp | 29 --
rocclr/runtime/device/gpu/gpudevice.cpp | 42 ---
rocclr/runtime/device/gpu/gpudevice.hpp | 4 -
rocclr/runtime/device/gpu/gpusettings.cpp | 17 --
rocclr/runtime/device/gpu/gpusettings.hpp | 4 -
rocclr/runtime/device/gpu/gpuvirtual.cpp | 206 -------------
rocclr/runtime/device/gpu/gpuvirtual.hpp | 7 -
.../device/gpu/gslbe/src/rt/GSLContext.cpp | 275 ------------------
.../device/gpu/gslbe/src/rt/GSLContext.h | 7 -
rocclr/runtime/device/hsa/hsavirtual.hpp | 4 -
rocclr/runtime/platform/command.hpp | 123 --------
rocclr/runtime/platform/commandqueue.cpp | 6 -
rocclr/runtime/platform/commandqueue.hpp | 7 -
rocclr/runtime/platform/object.hpp | 4 +-
rocclr/runtime/platform/video_session.hpp | 79 -----
rocclr/runtime/top.hpp | 1 -
rocclr/runtime/utils/flags.hpp | 2 -
20 files changed, 1 insertion(+), 836 deletions(-)
delete mode 100644 rocclr/runtime/platform/video_session.hpp
diff --git a/rocclr/runtime/device/cpu/cpudevice.cpp b/rocclr/runtime/device/cpu/cpudevice.cpp
index cc95884782..fe1ee198bd 100644
--- a/rocclr/runtime/device/cpu/cpudevice.cpp
+++ b/rocclr/runtime/device/cpu/cpudevice.cpp
@@ -395,10 +395,6 @@ Device::init()
}
info.spirVersions_ = "1.2";
-#if cl_amd_open_video
- info.openVideo_ = CL_FALSE;
-#endif // cl_amd_open_video
-
info.partitionCreateInfo_.type_.value_ = 0;
info.partitionProperties_.value_ = 0;
if (info.maxComputeUnits_ > 1) {
diff --git a/rocclr/runtime/device/cpu/cpuvirtual.cpp b/rocclr/runtime/device/cpu/cpuvirtual.cpp
index d2e57edbb9..c8df4a7806 100644
--- a/rocclr/runtime/device/cpu/cpuvirtual.cpp
+++ b/rocclr/runtime/device/cpu/cpuvirtual.cpp
@@ -555,18 +555,6 @@ VirtualCPU::flush(amd::Command* list, bool wait)
}
}
-#if cl_amd_open_video
-void VirtualCPU::submitRunVideoProgram(amd::RunVideoProgramCommand& cmd)
-{
- cmd.setStatus(CL_INVALID_OPERATION);
-}
-
-void VirtualCPU::submitSetVideoSession(amd::SetVideoSessionCommand& cmd)
-{
- cmd.setStatus(CL_INVALID_OPERATION);
-}
-#endif // cl_amd_open_video
-
void
VirtualCPU::submitSignal(amd::SignalCommand & cmd)
{
diff --git a/rocclr/runtime/device/cpu/cpuvirtual.hpp b/rocclr/runtime/device/cpu/cpuvirtual.hpp
index e843eef85e..5a1ac86b70 100644
--- a/rocclr/runtime/device/cpu/cpuvirtual.hpp
+++ b/rocclr/runtime/device/cpu/cpuvirtual.hpp
@@ -49,10 +49,6 @@ public:
virtual void submitThreadTraceMemObjects(amd::ThreadTraceMemObjectsCommand& cmd);
virtual void submitThreadTrace(amd::ThreadTraceCommand& cmd);
virtual void flush(amd::Command* list = NULL, bool wait = false);
-#if cl_amd_open_video
- virtual void submitRunVideoProgram(amd::RunVideoProgramCommand& cmd);
- virtual void submitSetVideoSession(amd::SetVideoSessionCommand& cmd);
-#endif // cl_amd_open_video
virtual void submitSignal(amd::SignalCommand & cmd);
virtual void submitMakeBuffersResident(amd::MakeBuffersResidentCommand & cmd);
virtual void submitSvmFreeMemory(amd::SvmFreeMemoryCommand& cmd);
diff --git a/rocclr/runtime/device/device.hpp b/rocclr/runtime/device/device.hpp
index 82dfc0ffd6..6f229b7ddf 100644
--- a/rocclr/runtime/device/device.hpp
+++ b/rocclr/runtime/device/device.hpp
@@ -51,10 +51,6 @@ class Marker;
class KernelSignature;
class ThreadTraceCommand;
class ThreadTraceMemObjectsCommand;
-#if cl_amd_open_video
-class RunVideoProgramCommand;
-class SetVideoSessionCommand;
-#endif // cl_amd_open_video
class SignalCommand;
class MakeBuffersResidentCommand;
class SvmFreeMemoryCommand;
@@ -106,7 +102,6 @@ enum OclExtensions {
#endif
ClKhrImage2dFromBuffer,
ClAmdImage2dFromBufferReadOnly,
- ClAmdOpenVideo,
ClAmdSemaphore,
ClAMDBusAddressableMemory,
ClAMDC11Atomics,
@@ -149,11 +144,6 @@ OclExtensionsString[] = {
#endif
"cl_khr_image2d_from_buffer ",
"cl_amd_image2d_from_buffer_read_only ",
-#if cl_amd_open_video
- "cl_amd_open_video ",
-#else
- "",
-#endif // cl_amd_open_video
"",
"cl_amd_bus_addressable_memory ",
"cl_amd_c11_atomics ",
@@ -497,24 +487,9 @@ struct Info : public amd::EmbeddedObject
//! of printf calls from a kernel
size_t printfBufferSize_;
- //! Indicates whether UVD interop is supported
- cl_bool openVideo_;
-
//! Indicates maximum number of supported global atomic counters
cl_uint maxAtomicCounters_;
-#if cl_amd_open_video
- // Decoder
- //! Maximum number of simultaneous video sessions/streams
- cl_uint maxVideoSessions_;
- //! List of supported video attributes (profile/format pairs)
- cl_video_attrib_amd* videoAttribs_;
- cl_uint numVideoAttribs_;
- //Encoder
- cl_video_attrib_encode_amd* videoEncAttribs_;
- cl_uint numVideoEncAttribs_;
-#endif //cl_amd_open_video
-
//! Returns the topology for the device
cl_device_topology_amd deviceTopology_;
@@ -1435,10 +1410,6 @@ public:
virtual void submitThreadTraceMemObjects(amd::ThreadTraceMemObjectsCommand& cmd) = 0;
virtual void submitThreadTrace(amd::ThreadTraceCommand& cmd) = 0;
virtual void flush(amd::Command* list = NULL, bool wait = false) = 0;
-#if cl_amd_open_video
- virtual void submitRunVideoProgram(amd::RunVideoProgramCommand& cmd) = 0;
- virtual void submitSetVideoSession(amd::SetVideoSessionCommand& cmd) = 0;
-#endif // cl_amd_open_video
virtual void submitSignal(amd::SignalCommand & cmd) = 0;
virtual void submitMakeBuffersResident(amd::MakeBuffersResidentCommand & cmd) = 0;
virtual void submitSvmFreeMemory(amd::SvmFreeMemoryCommand& cmd) = 0;
diff --git a/rocclr/runtime/device/gpu/gpudevice.cpp b/rocclr/runtime/device/gpu/gpudevice.cpp
index 585925a44b..a0c14ad496 100644
--- a/rocclr/runtime/device/gpu/gpudevice.cpp
+++ b/rocclr/runtime/device/gpu/gpudevice.cpp
@@ -164,9 +164,6 @@ NullDevice::create(CALtarget target)
gpu::Settings* gpuSettings = reinterpret_cast(settings_);
// Create setting for the offline target
if ((gpuSettings == NULL) || !gpuSettings->create(calAttr
-#if cl_amd_open_video
- , calVideoAttr
-#endif //cl_amd_open_video
)) {
return false;
}
@@ -178,9 +175,6 @@ NullDevice::create(CALtarget target)
// Fill the device info structure
fillDeviceInfo(calAttr, calDevStatus, 4096, 1, true
-#if cl_amd_open_video
- , getVideoAttribs()
-#endif //cl_amd_open_video
);
if (settings().hsail_ || (settings().oclVersion_ == OpenCL20)) {
@@ -235,10 +229,6 @@ void NullDevice::fillDeviceInfo(
size_t maxTextureSize,
uint numComputeRings,
bool isVirtualMode
-#if cl_amd_open_video
- ,
- const CALdeviceVideoAttribs& calVideoAttr
-#endif // cl_amd_open_video
)
{
info_.type_ = CL_DEVICE_TYPE_GPU;
@@ -425,23 +415,6 @@ void NullDevice::fillDeviceInfo(
info_.platform_ = AMD_PLATFORM;
-#if cl_amd_open_video
- // Open Video support
- // Decoder
- info_.openVideo_ = settings().openVideo_;
- info_.maxVideoSessions_ = calVideoAttr.max_decode_sessions;
- info_.numVideoAttribs_ = (calVideoAttr.data_size - 2 * sizeof(CALuint))
- / sizeof(CALvideoAttrib);
- info_.videoAttribs_ = const_cast(
- reinterpret_cast(calVideoAttr.video_attribs));
-
- // Encoder
- info_.numVideoEncAttribs_ = (calVideoAttr.data_size - 2 * sizeof(CALuint))
- / sizeof(CALvideoEncAttrib);
- info_.videoEncAttribs_ = const_cast(
- reinterpret_cast(calVideoAttr.video_enc_attribs));
-#endif // cl_amd_open_video
-
::strcpy(info_.name_, hwInfo()->targetName_);
::strcpy(info_.vendor_, "Advanced Micro Devices, Inc.");
::snprintf(info_.driverVersion_, sizeof(info_.driverVersion_) - 1,
@@ -817,9 +790,6 @@ Device::create(CALuint ordinal, CALuint numOfDevices)
settings_ = new gpu::Settings();
gpu::Settings* gpuSettings = reinterpret_cast(settings_);
if ((gpuSettings == NULL) || !gpuSettings->create(getAttribs()
-#if cl_amd_open_video
- , getVideoAttribs()
-#endif // cl_amd_open_video
, appProfile_.reportAsOCL12Device()
)) {
return false;
@@ -928,9 +898,6 @@ Device::create(CALuint ordinal, CALuint numOfDevices)
fillDeviceInfo(getAttribs(), getStatus(),
static_cast(getMaxTextureSize()),
engines().numComputeRings(), heap()->isVirtual()
-#if cl_amd_open_video
- , getVideoAttribs()
-#endif //cl_amd_open_video
);
if (settings().hsail_ || (settings().oclVersion_ == OpenCL20)) {
@@ -1075,9 +1042,6 @@ Device::initializeHeapResources()
xferQueue_ = new VirtualGPU(*this);
if (!(xferQueue_ && xferQueue_->create(
false
- #if cl_amd_open_video
- ,NULL
- #endif // cl_amd_open_video
))) {
delete xferQueue_;
xferQueue_ = NULL;
@@ -1100,9 +1064,6 @@ Device::createVirtualDevice(
bool interopQueue = false;
uint rtCUs = 0;
uint deviceQueueSize = 0;
-#if cl_amd_open_video
- void* calVideoProperties = NULL;
-#endif // cl_amd_open_video
if (queue != NULL) {
profiling = queue->properties().test(CL_QUEUE_PROFILING_ENABLE);
@@ -1130,9 +1091,6 @@ Device::createVirtualDevice(
VirtualGPU* vgpu = new VirtualGPU(*this);
if (vgpu && vgpu->create(
profiling
-#if cl_amd_open_video
- , calVideoProperties
-#endif // cl_amd_open_video
, deviceQueueSize
)) {
return vgpu;
diff --git a/rocclr/runtime/device/gpu/gpudevice.hpp b/rocclr/runtime/device/gpu/gpudevice.hpp
index 3b159d04c0..2490642f61 100644
--- a/rocclr/runtime/device/gpu/gpudevice.hpp
+++ b/rocclr/runtime/device/gpu/gpudevice.hpp
@@ -127,10 +127,6 @@ protected:
size_t maxTextureSize, //!< Maximum texture size supported in HW
uint numComputeRings, //!< Number of compute rings
bool isVirtualMode //!< Device is in virtual mode
-#if cl_amd_open_video
- ,
- const CALdeviceVideoAttribs& calVideoAttr //!< -"- video attrib. info
-#endif //cl_amd_open_video
);
};
diff --git a/rocclr/runtime/device/gpu/gpusettings.cpp b/rocclr/runtime/device/gpu/gpusettings.cpp
index 7cf23e23bd..b9c415780b 100644
--- a/rocclr/runtime/device/gpu/gpusettings.cpp
+++ b/rocclr/runtime/device/gpu/gpusettings.cpp
@@ -65,11 +65,6 @@ Settings::Settings()
libSelector_ = amd::LibraryUndefined;
-#if cl_amd_open_video
- // By default Open Video extension is not yet supported
- openVideo_ = false;
-#endif // cl_amd_open_video
-
// Enable workload split by default (for 24 bit arithmetic or timeout)
workloadSplitSize_ = 1 << GPU_WORKLOAD_SPLIT;
@@ -152,9 +147,6 @@ Settings::Settings()
bool
Settings::create(
const CALdeviceattribs& calAttr
-#if cl_amd_open_video
- , const CALdeviceVideoAttribs& calVideoAttr
-#endif // cl_amd_open_video
, bool reportAsOCL12Device
)
{
@@ -411,15 +403,6 @@ Settings::create(
// Use kernels for blit if appropriate
blitEngine_ = BlitEngineKernel;
-#if cl_amd_open_video
- // Enable OpenVideo by default if CAL supports it
- if (calVideoAttr.max_decode_sessions > 0) {
- openVideo_ = true;
- if (GPU_OPEN_VIDEO)
- enableExtension(ClAmdOpenVideo);
- }
-#endif // cl_amd_open_video
-
hostMemDirectAccess_ |= HostMemBuffer;
// HW doesn't support untiled image writes
// hostMemDirectAccess_ |= HostMemImage;
diff --git a/rocclr/runtime/device/gpu/gpusettings.hpp b/rocclr/runtime/device/gpu/gpusettings.hpp
index f88e45ddb3..5799bfd83e 100644
--- a/rocclr/runtime/device/gpu/gpusettings.hpp
+++ b/rocclr/runtime/device/gpu/gpusettings.hpp
@@ -51,7 +51,6 @@ public:
uint useAliases_: 1; //!< Enables global heap aliases in HW
uint imageSupport_: 1; //!< Report images support
uint doublePrecision_: 1; //!< Enables double precision support
- uint openVideo_: 1; //!< Open Video interop support
uint reportFMAF_: 1; //!< Report FP_FAST_FMAF define in CL program
uint reportFMA_: 1; //!< Report FP_FAST_FMA define in CL program
uint use64BitPtr_: 1; //!< Use 64bit pointers on GPU
@@ -113,9 +112,6 @@ public:
//! Creates settings
bool create(
const CALdeviceattribs& calAttr //!< CAL attributes structure
-#if cl_amd_open_video
- , const CALdeviceVideoAttribs& calVideoAttr //!< CAL video attributes
-#endif // cl_amd_open_video
, bool reportAsOCL12Device = false //!< Report As OpenCL1.2 Device
);
diff --git a/rocclr/runtime/device/gpu/gpuvirtual.cpp b/rocclr/runtime/device/gpu/gpuvirtual.cpp
index 193c917de3..f6bdb1e413 100644
--- a/rocclr/runtime/device/gpu/gpuvirtual.cpp
+++ b/rocclr/runtime/device/gpu/gpuvirtual.cpp
@@ -212,7 +212,6 @@ VirtualGPU::gslOpen(uint nEngines, gslEngineDescriptor *engines)
void
VirtualGPU::gslDestroy()
{
- closeVideoSession();
close(dev().getNative());
}
@@ -421,9 +420,6 @@ VirtualGPU::VirtualGPU(
bool
VirtualGPU::create(
bool profiling
-#if cl_amd_open_video
- , void* calVideoProperties
-#endif // cl_amd_open_video
, uint deviceQueueSize
)
{
@@ -440,56 +436,6 @@ VirtualGPU::create(
// Virtual GPU will have profiling enabled
state_.profiling_ = profiling;
-#if cl_amd_open_video
- if(calVideoProperties) {
- cl_video_encode_desc_amd* ptr_ovSessionProperties =
- reinterpret_cast(calVideoProperties);
- CALvideoProperties* ptr_calVideoProperties =
- reinterpret_cast(ptr_ovSessionProperties->calVideoProperties);
-
- switch (ptr_calVideoProperties->VideoEngine_name) {
- case CAL_CONTEXT_VIDEO:
- engineMask = dev().engines().getMask(GSL_ENGINEID_UVD);
- num = dev().engines().getRequested(engineMask, engines);
- // Open GSL context
- if ((num == 0) || !gslOpen(num, engines)) {
- return false;
- }
- openVideoSession(*ptr_calVideoProperties);
- break;
- case CAL_CONTEXT_VIDEO_VCE:
- engineMask = dev().engines().getMask(GSL_ENGINEID_VCE);
- num = dev().engines().getRequested(engineMask, engines);
- // Open GSL context
- if ((num == 0) || !gslOpen(num, engines)) {
- return false;
- }
- break;
- default:
- assert(false && "Unknown video engine!");
- break;
- }
- if (ptr_calVideoProperties->VideoEngine_name == CAL_CONTEXT_VIDEO_VCE) {
- CALEncodeCreateVCE encodeVCE;
- createVCE(&encodeVCE, 0);
-
- CAL_VID_PROFILE_LEVEL encode_profile_level;
- encode_profile_level.profile = ptr_ovSessionProperties->attrib.profile;
- encode_profile_level.level = ptr_ovSessionProperties->attrib.level;
- createEncodeSession(
- 0,
- (CALencodeMode)ptr_ovSessionProperties->encodeMode,//CAL_VID_encode_AVC_FULL
- encode_profile_level,
- (CAL_VID_PICTURE_FORMAT)ptr_ovSessionProperties->attrib.format, //CAL_VID_PICTURE_NV12
- ptr_ovSessionProperties->image_width,
- ptr_ovSessionProperties->image_height,
- ptr_ovSessionProperties->frameRateNumerator,
- ptr_ovSessionProperties->frameRateDenominator,
- (CAL_VID_ENCODE_JOB_PRIORITY)ptr_ovSessionProperties->priority); //CAL_VID_ENCODE_JOB_PRIORITY_LEVEL1
- }
- }
- else
-#endif // !cl_amd_open_video
{
if (dev().engines().numComputeRings()) {
uint idx = index() % dev().engines().numComputeRings();
@@ -2621,158 +2567,6 @@ VirtualGPU::submitReleaseExtObjects(amd::ReleaseExtObjectsCommand& vcmd)
profilingEnd(vcmd);
}
-#if cl_amd_open_video
-void
-VirtualGPU::submitRunVideoProgram(amd::RunVideoProgramCommand& vcmd)
-{
- // Make sure VirtualGPU has an exclusive access to the resources
- amd::ScopedLock lock(execution());
-
- profilingBegin(vcmd);
-
- switch(vcmd.type()) {
- case CL_COMMAND_VIDEO_DECODE_AMD: {
- CALprogramVideoDecode calVideoData;
- cl_video_decode_data_amd* clVideoData =
- static_cast(vcmd.videoData());
-
- //Convert cl_video_program_type_amd to CALvideoType
- calVideoData.videoType.type = CAL_VIDEO_DECODE;
- calVideoData.videoType.size = sizeof(CALprogramVideoDecode);
- // Copy video data from CL to CAL structure
- calVideoData.videoType.flags = clVideoData->video_type.flags;
- calVideoData.picture_parameter_1 = clVideoData->picture_parameter_1;
- calVideoData.picture_parameter_2 = clVideoData->picture_parameter_2;
- calVideoData.picture_parameter_2_size = clVideoData->picture_parameter_2_size;
- calVideoData.bitstream_data = clVideoData->bitstream_data;
- calVideoData.bitstream_data_size = clVideoData->bitstream_data_size;
- calVideoData.slice_data_control = clVideoData->slice_data_control;
- calVideoData.slice_data_size = clVideoData->slice_data_control_size;
-
- gpu::Memory* gpuMem = dev().getGpuMemory(&vcmd.memory());
-
- GpuEvent event;
- if (!runProgramVideoDecode(event, gpuMem->gslResource(),
- reinterpret_cast(calVideoData))) {
- vcmd.setStatus(CL_INVALID_OPERATION);
- return;
- }
- // Mark source and destination as busy
- gpuMem->setBusy(*this, event);
-
- // Update the global GPU event and flush the DMA buffer,
- // so runtime can synchronize UVD and SDMA engines
- // @todo - do we need to flush here?
- setGpuEvent(event, true);
- }
- break;
- case CL_COMMAND_VIDEO_ENCODE_AMD: {
- cl_video_encode_data_amd* clVideoData =
- static_cast(vcmd.videoData());
-
- CAL_VID_ENCODE_PARAMETERS_H264 *ppicture_parameter =
- reinterpret_cast(clVideoData->pictureParam2);
- uint num_of_encode_task_input_buffer =
- (uint)(clVideoData->pictureParam1Size);
- CAL_VID_BUFFER_DESCRIPTION *encode_task_input_buffer_list =
- reinterpret_cast(clVideoData->pictureParam1);
-
- CAL_VID_BUFFER_DESCRIPTION *encode_task_input_buffer_listbackup =
- new CAL_VID_BUFFER_DESCRIPTION [num_of_encode_task_input_buffer];
- if (encode_task_input_buffer_listbackup == NULL) {
- LogError("calCtxRunProgramVideo unable to allocate memory");
- vcmd.setStatus(CL_OUT_OF_RESOURCES);
- return;
- }
-
- // Entropy mode
- cl_mem buffer_surface;
- gpu::Memory* gpuMem;
-
- // Convert cl_mem object to gslMemObject object
- for (uint i = 0; i < num_of_encode_task_input_buffer; i++) {
- encode_task_input_buffer_listbackup[i] = encode_task_input_buffer_list[i];
- buffer_surface = (cl_mem)encode_task_input_buffer_list[i].buffer.pPicture;
- gpuMem = dev().getGpuMemory(as_amd(buffer_surface));
- encode_task_input_buffer_listbackup[i].buffer.pPicture = gpuMem->gslResource();
- }
-
- gpuMem = dev().getGpuMemory(&(vcmd.memory()));
-
- // Encode the picture - call QueryTask to get the results...
- GpuEvent event;
- EncodeePicture(event, num_of_encode_task_input_buffer,
- encode_task_input_buffer_listbackup, ppicture_parameter,
- &(clVideoData->uiTaskID),
- gpuMem->gslResource(), 0);
-
- // Mark source and destination as busy
- gpuMem->setBusy(*this, event);
-
- // Update the global GPU event and flush the DMA buffer,
- // so runtime can synchronize VCE and SDMA engines
- // @todo - do we need to flush here?
- setGpuEvent(event, true);
- delete[] encode_task_input_buffer_listbackup;
- }
- break;
- default:
- vcmd.setStatus(CL_INVALID_VIDEO_CONFIG_TYPE_AMD);
- LogError("Invalid video command type");
- return;
- }
- profilingEnd(vcmd);
-}
-
-void
-VirtualGPU::submitSetVideoSession(amd::SetVideoSessionCommand& cmd)
-{
- switch (cmd.operation()) {
- case amd::SetVideoSessionCommand::CloseSession:
- closeVideoEncodeSession(0);
- destroyVCE(0);
- break;
- case amd::SetVideoSessionCommand::ConfigTypePictureControl:
- getPictureConfig(
- (CALEncodeGetPictureControlConfig*)(cmd.paramValue()), 0);
- break;
- case amd::SetVideoSessionCommand::ConfigTypeRateControl:
- getRateControlConfig(
- (CALEncodeGetRateControlConfig*)(cmd.paramValue()), 0);
- break;
- case amd::SetVideoSessionCommand::ConfigTypeMotionEstimation:
- getMotionEstimationConfig(
- (CALEncodeGetMotionEstimationConfig*)(cmd.paramValue()), 0);
- break;
- case amd::SetVideoSessionCommand::ConfigTypeRDO:
- getRDOConfig(
- (CALEncodeGetRDOControlConfig*)(cmd.paramValue()), 0);
- break;
- case amd::SetVideoSessionCommand::SendEncodeConfig:
- SendConfig(
- cmd.numBuffers(), (CAL_VID_CONFIG*)(cmd.paramValue()), 0);
- break;
- case amd::SetVideoSessionCommand::GetDeviceCapVCE: {
- CALEncodeGetDeviceCAP EncodeCAP;
- EncodeCAP.num_of_encode_cap = 1;
- EncodeCAP.encode_caps = (CAL_VID_ENCODE_CAPS *)(cmd.paramValue());
- getDeviceCAPVCE(0, cmd.numBuffers(), &EncodeCAP, 0);
- }
- break;
- case amd::SetVideoSessionCommand::EncodeQueryTaskDescription:
- QueryTaskDescription(
- cmd.numBuffers(), cmd.paramValue2(),
- (CAL_VID_OUTPUT_DESCRIPTION *)cmd.paramValue(), 0);
- break;
- case amd::SetVideoSessionCommand::ReleaseOutputResource:
- ReleaseOutputResource(cmd.numBuffers(), 0);
- break;
- default:
- break;
- }
-}
-#endif // cl_amd_open_video
-
void
VirtualGPU::submitSignal(amd::SignalCommand & vcmd)
{
diff --git a/rocclr/runtime/device/gpu/gpuvirtual.hpp b/rocclr/runtime/device/gpu/gpuvirtual.hpp
index 131da243e6..ca2fb034bf 100644
--- a/rocclr/runtime/device/gpu/gpuvirtual.hpp
+++ b/rocclr/runtime/device/gpu/gpuvirtual.hpp
@@ -206,9 +206,6 @@ public:
VirtualGPU(Device& device);
bool create(
bool profiling
-#if cl_amd_open_video
- , void* calVideoProperties
-#endif // cl_amd_open_video
, uint deviceQueueSize = 0
);
~VirtualGPU();
@@ -242,10 +239,6 @@ public:
void submitPerfCounter(amd::PerfCounterCommand& vcmd);
void submitThreadTraceMemObjects(amd::ThreadTraceMemObjectsCommand& cmd);
void submitThreadTrace(amd::ThreadTraceCommand& vcmd);
-#if cl_amd_open_video
- void submitRunVideoProgram(amd::RunVideoProgramCommand& vcmd);
- void submitSetVideoSession(amd::SetVideoSessionCommand& cmd);
-#endif // cl_amd_open_video
void submitSignal(amd::SignalCommand & vcmd);
void submitMakeBuffersResident(amd::MakeBuffersResidentCommand & vcmd);
virtual void submitSvmFreeMemory(amd::SvmFreeMemoryCommand& cmd);
diff --git a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLContext.cpp b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLContext.cpp
index 2b81b6bd9e..bd9cba155e 100644
--- a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLContext.cpp
+++ b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLContext.cpp
@@ -44,7 +44,6 @@ CALGSLContext::CALGSLContext()
m_scratchBuffers = 0;
- m_videoSession = 0;
m_waitType = CAL_WAIT_LOW_CPU_UTILIZATION;
}
@@ -434,8 +433,6 @@ CALGSLContext::runProgramVideoDecode(GpuEvent& event, gslMemObject mo, const CAL
eventBegin(MainEngine);
eventEnd(MainEngine, event);
- gslVidDecode(&m_videocontext, m_videoSession, data);
-
return true;
}
@@ -802,46 +799,6 @@ CALGSLContext::MakeBuffersResident(CALuint numObjects, gslMemObject* pMemObjects
return res;
}
-bool
-CALGSLContext::openVideoSession(CALvideoProperties& properties)
-{
- gslVidSessionCreateData data;
-
- assert(properties.size == sizeof(CALvideoProperties));
-
- data.size = sizeof(gslVidSessionCreateData);
- data.type = (gslDecodeProfile) properties.profile;
- data.format = (gslDecodeFormat) properties.format;
- data.width = properties.width;
- data.height = properties.height;
-
- m_videocontext.m_gsCtx = m_cs;
- m_videocontext.VideoEngine_name = static_cast(properties.VideoEngine_name);
- m_videoSession = gslVidSessionCreate(&m_videocontext, data);
-
- if (m_videoSession == NULL)
- {
- return false;
- }
- return true;
-}
-
-
-void
-CALGSLContext::closeVideoSession(void)
-{
- if (m_videoSession)
- {
- //! @note: GSL device isn't thread safe
- amd::ScopedLock k(dev()->gslDeviceOps());
-
- m_videocontext.m_gsCtx = m_cs;
- m_videocontext.VideoEngine_name = GSL_VID_CONTEXT_VIDEO;
- gslVidSessionDestroy(&m_videocontext, m_videoSession);
- }
-}
-
-
void
CALGSLContext::bindAtomicCounter(uint32 index, gslMemObject obj)
{
@@ -862,238 +819,6 @@ CALGSLContext::syncAtomicCounter(GpuEvent& event, uint32 index, bool read)
eventEnd(MainEngine, event);
}
-void
-CALGSLContext::createVCE(CALEncodeCreateVCE* pEncodeVCE, CALuint flags)
-{
- gslVidEncodeCreateVCEData data;
- m_videocontext.m_gsCtx = m_cs;
- m_videocontext.VideoEngine_name = GSL_VID_CONTEXT_VIDEO_VCE;
-
- gslVidEncodeCreateVCE(&m_videocontext, &data);
-
- pEncodeVCE->VCEsession = reinterpret_cast(data.session);
-}
-
-void
-CALGSLContext::destroyVCE(CALuint flags)
-{
- m_videocontext.m_gsCtx = m_cs;
- m_videocontext.VideoEngine_name = GSL_VID_CONTEXT_VIDEO_VCE;
-
- gslVidEncodeDestroyVCE(&m_videocontext);
-}
-
-void
-CALGSLContext::getDeviceInfoVCE(CALuint *num_device, CALEncodeGetDeviceInfo* pEncodeDeviceInfo, CALuint flags)
-{
- gslVidEncodeGetDeviceInfo(num_device, (gslVidEncodeGetDeviceInfoData *) pEncodeDeviceInfo);
-}
-
-void
-CALGSLContext::getNumberOfModesVCE(CALEncodeGetNumberOfModes* pEncodeNumberOfModes, CALuint flags)
-{
- uint32 device_id =0;
- gslVidEncodeQueryNumberOfModesData data;
-
- m_videocontext.m_gsCtx = m_cs;
- m_videocontext.VideoEngine_name = GSL_VID_CONTEXT_VIDEO_VCE;
-
- gslVidEncodeGetNumberOfModes(&m_videocontext, device_id, &data);
- pEncodeNumberOfModes->num_of_encode_Mode = data.num_of_encode_Mode;
-}
-
-void
-CALGSLContext::getModesVCE(CALuint device_id, CALuint NumEncodeModesToRetrieve, CALEncodeGetModes* pEncodeMode, CALuint flags)
-{
- gslVidEncodeGetModesData data;
- data.NumEncodeModesToRetrieve = NumEncodeModesToRetrieve ;
- data.pEncodeModes = (GSL_VID_ENCODE_MODE *)malloc(sizeof(GSL_VID_ENCODE_MODE)*NumEncodeModesToRetrieve);
-
- m_videocontext.m_gsCtx = m_cs;
- m_videocontext.VideoEngine_name = GSL_VID_CONTEXT_VIDEO_VCE;
-
- gslVidEncodeGetModes(&m_videocontext, device_id, &data);
-
-// pEncodeMode = ( CALEncodeGetModes *) data.pEncodeModes;
- pEncodeMode->NumEncodeModesToRetrieve = data.NumEncodeModesToRetrieve;
- CALencodeMode *pEncodeModes = pEncodeMode->pEncodeModes;
-
- for (CALuint mode_id = 0; mode_id < NumEncodeModesToRetrieve; mode_id++)
- {
- switch(data.pEncodeModes[mode_id])
- {
- case GSL_VID_encode_AVC_FULL:
- pEncodeModes[mode_id] = CAL_VID_encode_AVC_FULL;
- break;
- case GSL_VID_encode_AVC_ENTROPY:
- pEncodeModes[mode_id] = CAL_VID_encode_AVC_ENTROPY;
- break;
- default:
- pEncodeModes[mode_id] = CAL_VID_encode_MODE_NONE;
- break;
- }
- }
-
- free(data.pEncodeModes);
-}
-void
-CALGSLContext::getDeviceCAPVCE(CALuint device_id,
- CALuint encode_cap_total_size,
- CALEncodeGetDeviceCAP *pEncodeCAP,
- CALuint flags)
-{
- gslVidEncodeGetDeviceCAPData *data = (gslVidEncodeGetDeviceCAPData *) pEncodeCAP;
-
- m_videocontext.m_gsCtx = m_cs;
- m_videocontext.VideoEngine_name = GSL_VID_CONTEXT_VIDEO_VCE;
-
- data->num_of_encode_cap = encode_cap_total_size;
-
- gslVidEncodeGetDeviceCAP(device_id, encode_cap_total_size, data);
-}
-
-void
-CALGSLContext::createEncodeSession(CALuint device_id,
- CALencodeMode encode_mode,
- CAL_VID_PROFILE_LEVEL encode_profile_level,
- CAL_VID_PICTURE_FORMAT encode_formatm,
- CALuint encode_width,
- CALuint encode_height,
- CALuint frameRateNum,
- CALuint frameRateDenom,
- CAL_VID_ENCODE_JOB_PRIORITY encode_priority_level)
-{
- gslVidEncodeSessionCreateData data;
-
- data.encode_mode = (GSL_VID_ENCODE_MODE)encode_mode;
- data.encode_profile_level.profile = encode_profile_level.profile;
- data.encode_profile_level.level = encode_profile_level.level;
- data.encode_formatm = (GSL_VID_PICTURE_FORMAT)encode_formatm;
- data.encode_width = encode_width;
- data.encode_height = encode_height;
- data.frameRateNumerator = frameRateNum;
- data.frameRateDenominator = frameRateDenom;
- data.encode_priority_level = (GSL_VID_ENCODE_JOB_PRIORITY)encode_priority_level;
-
- m_videocontext.m_gsCtx = m_cs;
- m_videocontext.VideoEngine_name = GSL_VID_CONTEXT_VIDEO_VCE;
-
- m_EncodevideoSession = gslVidEncodeCreateSession(&m_videocontext, device_id, &data);
-}
-
-void
-CALGSLContext::closeVideoEncodeSession(CALuint device_id)
-{
- m_videocontext.m_gsCtx = m_cs;
- m_videocontext.VideoEngine_name = GSL_VID_CONTEXT_VIDEO_VCE;
-
- if (m_EncodevideoSession)
- {
- gslVidEncodeSessionDestroy(&m_videocontext, device_id, m_EncodevideoSession);
- }
-}
-
-
-void
-CALGSLContext::setState(CALEncodeSetState EncodeState, CALuint flags)
-{
- m_videocontext.m_gsCtx = m_cs;
- m_videocontext.VideoEngine_name = GSL_VID_CONTEXT_VIDEO_VCE;
- gslVidEncodeSetState(&m_videocontext, m_EncodevideoSession, (GSL_VID_ENCODE_STATE) EncodeState.encode_states);
-}
-
-void
-CALGSLContext::getPictureConfig(CALEncodeGetPictureControlConfig *pPictureControlConfig, CALuint flags)
-{
- m_videocontext.m_gsCtx = m_cs;
- m_videocontext.VideoEngine_name = GSL_VID_CONTEXT_VIDEO_VCE;
-
- gslVidEncodeGetPictureControlConfig(&m_videocontext, m_EncodevideoSession, (GSL_VID_CONFIG_PICTURE_CONTROL *) pPictureControlConfig);
-}
-void
-CALGSLContext::getRateControlConfig(CALEncodeGetRateControlConfig *pRateControConfig, CALuint flags)
-{
- m_videocontext.m_gsCtx = m_cs;
- m_videocontext.VideoEngine_name = GSL_VID_CONTEXT_VIDEO_VCE;
-
- gslVidEncodeGetRateControlConfig(&m_videocontext, m_EncodevideoSession, (GSL_VID_CONFIG_RATE_CONTROL *) pRateControConfig);
-}
-void
-CALGSLContext::getMotionEstimationConfig(CALEncodeGetMotionEstimationConfig *pMotionEstimationConfig, CALuint flags)
-{
- m_videocontext.m_gsCtx = m_cs;
- m_videocontext.VideoEngine_name = GSL_VID_CONTEXT_VIDEO_VCE;
- gslVidEncodeGetMotionEstimationConfig(&m_videocontext, m_EncodevideoSession, (GSL_VID_CONFIG_MOTION_ESTIMATION *) pMotionEstimationConfig);
-}
-
-void
-CALGSLContext::getRDOConfig(CALEncodeGetRDOControlConfig *pRODConfig, CALuint flags)
-{
- m_videocontext.m_gsCtx = m_cs;
- m_videocontext.VideoEngine_name = GSL_VID_CONTEXT_VIDEO_VCE;
-
- gslVidEncodeGetRDOControlConfig(&m_videocontext, m_EncodevideoSession, (GSL_VID_CONFIG_RDO *) pRODConfig);
-}
-
-void
-CALGSLContext::SendConfig(CALuint num_of_config_buffers, CAL_VID_CONFIG *pConfigBuffers, CALuint flags)
-{
- m_videocontext.m_gsCtx = m_cs;
- m_videocontext.VideoEngine_name = GSL_VID_CONTEXT_VIDEO_VCE;
-
- gslVidEncodeSendConfig(&m_videocontext, m_EncodevideoSession, num_of_config_buffers, (GSL_VID_CONFIG *)pConfigBuffers);
-}
-
-void
-CALGSLContext::EncodeePicture(GpuEvent& event,
- CALuint num_of_encode_task_input_buffer,
- CAL_VID_BUFFER_DESCRIPTION *encode_task_input_buffer_list,
- void* picture_parameter,
- CALuint *pTaskID,
- gslMemObject input_NV12_surface,
- CALuint flags)
-{
- m_videocontext.m_gsCtx = m_cs;
- m_videocontext.VideoEngine_name = GSL_VID_CONTEXT_VIDEO_VCE;
-
- eventBegin(MainEngine);
- eventEnd(MainEngine, event);
-
- gslVidEncodeePicture(
- &m_videocontext,
- m_EncodevideoSession,
- num_of_encode_task_input_buffer,
- (GSL_VID_BUFFER_DESCRIPTION *)encode_task_input_buffer_list,
- picture_parameter,
- pTaskID,
- input_NV12_surface);
-}
-
-void
-CALGSLContext::QueryTaskDescription(CALuint num_of_task_description_request,
- CALuint *num_of_task_description_return,
- CAL_VID_OUTPUT_DESCRIPTION *task_description_list,
- CALuint flags)
-{
- m_videocontext.m_gsCtx = m_cs;
- m_videocontext.VideoEngine_name = GSL_VID_CONTEXT_VIDEO_VCE;
-
- gslVidEncodeeQueryTaskDescription(
- &m_videocontext,
- m_EncodevideoSession,
- num_of_task_description_request,
- num_of_task_description_return,
- (GSL_VID_OUTPUT_DESCRIPTION *)task_description_list);
-}
-void
-CALGSLContext::ReleaseOutputResource(CALuint taskID, CALuint flags)
-{
- m_videocontext.m_gsCtx = m_cs;
- m_videocontext.VideoEngine_name = GSL_VID_CONTEXT_VIDEO_VCE;
-
- gslVidEncodeeReleaseOutputResource(&m_videocontext, m_EncodevideoSession, taskID);
-}
-
bool
CALGSLContext::moduleLoad(CALimage image,
gslProgramObject* func, gslMemObject* constants, CALUavMask* uavMask)
diff --git a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLContext.h b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLContext.h
index 3a27116027..ecb866e56f 100644
--- a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLContext.h
+++ b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLContext.h
@@ -94,9 +94,6 @@ public:
void getFuncInfo(gslProgramObject func, gslProgramTarget target, CALfuncInfo* pInfo);
- bool openVideoSession(CALvideoProperties& properties);
- void closeVideoSession(void);
-
void bindAtomicCounter(uint32 index, gslMemObject obj);
void syncAtomicCounter(GpuEvent& event, uint32 index, bool read);
@@ -178,10 +175,6 @@ private:
gslScratchBufferObject m_scratchBuffers;
EventQueue m_eventQueue[AllEngines];
bool m_allowDMA;
-
- gslVidSession m_videoSession;
- gslVideoContext m_videocontext;
- gslVidSession m_EncodevideoSession;
};
#endif // __GSLContext_h__
diff --git a/rocclr/runtime/device/hsa/hsavirtual.hpp b/rocclr/runtime/device/hsa/hsavirtual.hpp
index 64a776e7db..8ab98c05c3 100644
--- a/rocclr/runtime/device/hsa/hsavirtual.hpp
+++ b/rocclr/runtime/device/hsa/hsavirtual.hpp
@@ -87,10 +87,6 @@ public:
// when integrating HSA and OpenCL branches.
// TODO: After inegration, whoever is working on VirtualGPU should write
// actual implemention.
-#if cl_amd_open_video
- virtual void submitRunVideoProgram(amd::RunVideoProgramCommand &cmd) {}
- virtual void submitSetVideoSession(amd::SetVideoSessionCommand &cmd) {}
-#endif // cl_amd_open_video
virtual void submitSignal(amd::SignalCommand &cmd) {}
virtual void submitMakeBuffersResident(amd::MakeBuffersResidentCommand &cmd) {}
virtual void submitSvmFreeMemory(amd::SvmFreeMemoryCommand& cmd);
diff --git a/rocclr/runtime/platform/command.hpp b/rocclr/runtime/platform/command.hpp
index 4627e8b03b..a33d8acf9b 100644
--- a/rocclr/runtime/platform/command.hpp
+++ b/rocclr/runtime/platform/command.hpp
@@ -1202,129 +1202,6 @@ private:
State state_; //!< State of the issued command
};
-#if cl_amd_open_video
-class RunVideoProgramCommand: public OneMemoryArgCommand
-{
-private:
- //! Store pointer to video data structure
- void* videoData_;
-
-public:
- //! Construct a new AcquireExtObjectsCommand
- RunVideoProgramCommand(
- HostQueue& queue,
- const EventWaitList& eventWaitList,
- void* videoData,
- Memory& memory,
- cl_command_type cmdType)
- : OneMemoryArgCommand(queue, cmdType, eventWaitList, memory)
- , videoData_(NULL)
- {
- unsigned int size = *static_cast(videoData);
- videoData_ = static_cast(new char[size]);
- if (videoData_) {
- memcpy(videoData_, videoData, size);
- }
- }
- virtual ~RunVideoProgramCommand()
- {
- if (videoData_) delete[] static_cast(videoData_);
- }
-
- virtual void submit(device::VirtualDevice& device) {
- device.submitRunVideoProgram(*this);
- }
-
- // Accessor methods
- void* videoData() const { return videoData_; }
-
- //! Read the memory object
- Memory& memory() const { return *memory_; }
-};
-
-class SetVideoSessionCommand: public Command
-{
-public:
- enum Operation {
- CloseSession,
- ConfigTypePictureControl,
- ConfigTypeRateControl,
- ConfigTypeMotionEstimation,
- ConfigTypeRDO,
- SendEncodeConfig,
- GetDeviceCapVCE,
- EncodeQueryTaskDescription,
- ReleaseOutputResource
- };
-
- //! Construct a new SetVideoSessionCommand
- SetVideoSessionCommand(
- HostQueue& queue,
- const EventWaitList& eventWaitList,
- Operation oper,
- void* paramValue = 0
- )
- : Command(queue, 0, eventWaitList)
- , oper_(oper)
- , paramValue_(paramValue)
- , numBuffers_(0)
- , paramValue2_(NULL)
- {
- }
-
- //! Construct a new SetVideoSessionCommand
- SetVideoSessionCommand(
- HostQueue& queue,
- const EventWaitList& eventWaitList,
- Operation oper,
- void* paramValue,
- uint numBuffers
- )
- : Command(queue, 0, eventWaitList)
- , oper_(oper)
- , paramValue_(paramValue)
- , numBuffers_(numBuffers)
- , paramValue2_(NULL)
- {
- }
- //! Construct a new SetVideoSessionCommand
- SetVideoSessionCommand(
- HostQueue& queue,
- const EventWaitList& eventWaitList,
- Operation oper,
- uint numBuffers,
- void* paramValue,
- uint* paramValue2
- )
- : Command(queue, 0, eventWaitList)
- , oper_(oper)
- , paramValue_(paramValue)
- , numBuffers_(numBuffers)
- , paramValue2_(paramValue2)
- {
- }
- virtual ~SetVideoSessionCommand()
- {
- }
-
- virtual void submit(device::VirtualDevice& device) {
- device.submitSetVideoSession(*this);
- }
-
- // Accessor methods
- Operation operation() const { return oper_; }
- void* paramValue() const { return paramValue_; }
- uint* paramValue2() const { return paramValue2_; }
- uint numBuffers() const { return numBuffers_; }
-
-private:
- Operation oper_; //!< Video session operation
- void* paramValue_; //!< Store pointer to parameter data
- uint numBuffers_; //!<
- uint* paramValue2_; //!< Store pointer to parameter data
-};
-#endif // cl_amd_open_video
-
class SignalCommand:public OneMemoryArgCommand
{
diff --git a/rocclr/runtime/platform/commandqueue.cpp b/rocclr/runtime/platform/commandqueue.cpp
index acb6c4b170..1f3071440d 100644
--- a/rocclr/runtime/platform/commandqueue.cpp
+++ b/rocclr/runtime/platform/commandqueue.cpp
@@ -19,15 +19,9 @@ namespace amd {
HostQueue::HostQueue(
Context& context, Device& device, cl_command_queue_properties properties, uint queueRTCUs
-#if cl_amd_open_video
- , void* calVideoProperties
-#endif // cl_amd_open_video
)
: CommandQueue(context, device, properties, device.info().queueProperties_
| CL_QUEUE_COMMAND_INTERCEPT_ENABLE_AMD, queueRTCUs)
-#if cl_amd_open_video
- , calVideoProperties_(calVideoProperties)
-#endif // cl_amd_open_video
{
if (thread_.state() >= Thread::INITIALIZED) {
ScopedLock sl(queueLock_);
diff --git a/rocclr/runtime/platform/commandqueue.hpp b/rocclr/runtime/platform/commandqueue.hpp
index 6a47633556..05ad3b42d3 100644
--- a/rocclr/runtime/platform/commandqueue.hpp
+++ b/rocclr/runtime/platform/commandqueue.hpp
@@ -169,10 +169,6 @@ private:
protected:
virtual bool terminate();
-#if cl_amd_open_video
- void* calVideoProperties_;
-#endif // cl_amd_open_video
-
public:
/*! \brief Construct a new host queue.
*
@@ -184,9 +180,6 @@ public:
Device& device,
cl_command_queue_properties properties,
uint queueRTCUs = 0
-#if cl_amd_open_video
- , void* calVideoProperties = NULL
-#endif // cl_amd_open_video
);
//! Returns TRUE if this command queue can accept commands.
diff --git a/rocclr/runtime/platform/object.hpp b/rocclr/runtime/platform/object.hpp
index 2ee57c0380..0c4f326e55 100644
--- a/rocclr/runtime/platform/object.hpp
+++ b/rocclr/runtime/platform/object.hpp
@@ -22,7 +22,6 @@
F(cl_sampler, Sampler) \
F(cl_counter_amd, Counter) \
F(cl_perfcounter_amd, PerfCounter) \
- F(cl_video_session_amd, VideoSession) \
F(cl_threadtrace_amd, ThreadTrace)
// Forward declare ::cl_* types and amd::Class types
@@ -184,8 +183,7 @@ public:
ObjectTypeProgram = 7,
ObjectTypeQueue = 8,
ObjectTypeSampler = 9,
- ObjectTypeThreadTrace = 10,
- ObjectTypeVideoSession= 11
+ ObjectTypeThreadTrace = 10
};
ObjectMetadata& metadata() { return metadata_; }
diff --git a/rocclr/runtime/platform/video_session.hpp b/rocclr/runtime/platform/video_session.hpp
deleted file mode 100644
index 95fa630783..0000000000
--- a/rocclr/runtime/platform/video_session.hpp
+++ /dev/null
@@ -1,79 +0,0 @@
-//
-// Copyright (c) 2010 Advanced Micro Devices, Inc. All rights reserved.
-//
-
-#ifndef VIDEO_SESSION_HPP_
-#define VIDEO_SESSION_HPP_
-
-#include "top.hpp"
-#include "platform/object.hpp"
-#include "device/device.hpp"
-#include "platform/commandqueue.hpp"
-
-#if cl_amd_open_video
-
-namespace amd
-{
-//! VideoSession class
-class VideoSession : public RuntimeObject
-{
-private:
- Context& context_; //!< OpenCL context
- Device& device_; //!< OpenCL device
- HostQueue* queue_; //!< Open CL video command queue
- cl_bitfield& video_session_flags_; //!< Creation flags
- cl_video_config_type_amd type_; //!< config buffer type
- cl_uint size_; //!< config buffer size
- void* buffer_; //!< pointer to config buffer
-
-public:
- VideoSession(
- Context& context, //!< OpenCL context
- Device& device, //!< OpenCL device
- HostQueue* queue, //!< OpenCL command queue
- cl_bitfield flags, //!< Video Session flags
- cl_video_config_type_amd type, //!< config buffer type
- cl_uint size, //!< config buffer size
- void* buffer //!< pointer to config buffer
- )
- : context_(context)
- , device_(device)
- , queue_(queue)
- , video_session_flags_(flags)
- , type_(type)
- , size_(size)
- , buffer_(NULL)
- {
- if (size > 0 && buffer) {
- buffer_ = new char[size];
- memcpy(buffer_, buffer, size);
- }
- }
-
- virtual ~VideoSession()
- {
- if (queue_) {
- queue_->release();
- }
- if (buffer_) {
- delete[] static_cast(buffer_);
- }
- }
-
- //! Accessor functions
- Context& context() const { return context_; }
- Device& device() const { return device_; }
- HostQueue& queue() const { return *queue_; }
- cl_bitfield& flags() const { return video_session_flags_; }
- cl_video_config_type_amd type() const { return type_; }
- void * configbuffer() const {return buffer_;}
-
- //! RTTI internal implementation
- virtual ObjectType objectType() const {return ObjectTypeVideoSession;}
-};
-
-} // namespace amd
-
-#endif // cl_amd_open_video
-
-#endif /*VIDEO_SESSION_HPP_*/
diff --git a/rocclr/runtime/top.hpp b/rocclr/runtime/top.hpp
index 61a7d446e1..32ba1616f6 100644
--- a/rocclr/runtime/top.hpp
+++ b/rocclr/runtime/top.hpp
@@ -16,7 +16,6 @@
#include "utils/macros.hpp"
#include "CL/opencl.h"
-#include "amdocl/cl_open_video_amd.h"
#if defined(CL_VERSION_2_0)
/* Deprecated in OpenCL 2.0 */
diff --git a/rocclr/runtime/utils/flags.hpp b/rocclr/runtime/utils/flags.hpp
index cf941095bd..a8c53544b5 100644
--- a/rocclr/runtime/utils/flags.hpp
+++ b/rocclr/runtime/utils/flags.hpp
@@ -76,8 +76,6 @@ release(bool, ENABLE_CAL_SHUTDOWN, false, \
"Enable explicit CAL shutdown (for PM4 capture)") \
release(bool, CL_KHR_FP64, true, \
"Enable/Disable support for double precision") \
-release(uint, GPU_OPEN_VIDEO, 0, \
- "Non-zero value allows to report Open Video extension on GPU") \
release(cstring, AMD_OCL_BUILD_OPTIONS, 0, \
"Set clBuildProgram() and clCompileProgram()'s options (override)") \
release(cstring, AMD_OCL_BUILD_OPTIONS_APPEND, 0, \