Skip to content

Commit

Permalink
Linux: Remove AMF encoder (alvr-org#1905)
Browse files Browse the repository at this point in the history
With all the recent Mesa changes there is no point using AMF instead
of VAAPI anymore.
  • Loading branch information
nowrep authored Nov 14, 2023
1 parent aaeecf5 commit 2f673b3
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 755 deletions.
10 changes: 1 addition & 9 deletions alvr/server/cpp/platform/linux/CEncoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "ffmpeg_helper.h"
#include "EncodePipeline.h"
#include "FrameRender.h"
#include "amf_helper.h"

extern "C" {
#include <libavutil/avutil.h>
Expand Down Expand Up @@ -204,14 +203,7 @@ void CEncoder::Run() {

av_log_set_callback(av_logfn);

bool useAmf = alvr::AMFContext::get()->isValid();
std::vector<const char*> deviceExtensions;

if (useAmf) {
deviceExtensions = alvr::AMFContext::get()->requiredDeviceExtensions();
}

alvr::VkContext vk_ctx(init.device_uuid.data(), deviceExtensions);
alvr::VkContext vk_ctx(init.device_uuid.data(), {});

FrameRender render(vk_ctx, init, m_fds);
auto output = render.CreateOutput();
Expand Down
11 changes: 0 additions & 11 deletions alvr/server/cpp/platform/linux/EncodePipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "EncodePipelineSW.h"
#include "EncodePipelineVAAPI.h"
#include "EncodePipelineNvEnc.h"
#include "EncodePipelineAMF.h"
#include "ffmpeg_helper.h"

extern "C" {
Expand Down Expand Up @@ -35,16 +34,6 @@ std::unique_ptr<alvr::EncodePipeline> alvr::EncodePipeline::Create(Renderer *ren
Info("failed to create NvEnc encoder: %s", e.what());
}
} else {
if (vk_ctx.amd) {
try {
auto amf = std::make_unique<alvr::EncodePipelineAMF>(render, width, height);
Info("using AMF encoder");
return amf;
} catch (std::exception &e)
{
Info("failed to create AMF encoder: %s", e.what());
}
}
try {
auto vaapi = std::make_unique<alvr::EncodePipelineVAAPI>(render, vk_ctx, input_frame, width, height);
Info("using VAAPI encoder");
Expand Down
Loading

0 comments on commit 2f673b3

Please sign in to comment.