From 90515bc6a2c0534fab99e9a10b6ab31c9279fad0 Mon Sep 17 00:00:00 2001 From: lizzie Date: Wed, 29 Apr 2026 16:41:25 +0200 Subject: [host1x] fix ffmpeg not having va-api on freebsd, inline nvenc (#3878) - fix va-api not being used on freebsd small thingies dont affect a lot: - removes some pointer indirection (why save pointer to GMMU if its accesible via host1x) - use std::variant<> for decoder - miscelly vp9/v8/h264 opts Signed-off-by: lizzie Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3878 Reviewed-by: crueter Reviewed-by: MaranBr --- src/video_core/host1x/codecs/decoder.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) mode change 100755 => 100644 src/video_core/host1x/codecs/decoder.cpp (limited to 'src/video_core/host1x/codecs/decoder.cpp') diff --git a/src/video_core/host1x/codecs/decoder.cpp b/src/video_core/host1x/codecs/decoder.cpp old mode 100755 new mode 100644 index 887eb28c8c..c75059db6f --- a/src/video_core/host1x/codecs/decoder.cpp +++ b/src/video_core/host1x/codecs/decoder.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project @@ -12,10 +12,11 @@ namespace Tegra { -Decoder::Decoder(Host1x::Host1x& host1x_, s32 id_, const Host1x::NvdecCommon::NvdecRegisters& regs_, - Host1x::FrameQueue& frame_queue_) - : host1x(host1x_), memory_manager{host1x.GMMU()}, regs{regs_}, id{id_}, frame_queue{ - frame_queue_} {} +Decoder::Decoder(Host1x::Host1x& host1x_, s32 id_, const Host1x::NvdecCommon::NvdecRegisters& regs_) + : host1x(host1x_) + , regs{regs_} + , id{id_} +{} Decoder::~Decoder() = default; @@ -53,11 +54,11 @@ void Decoder::Decode() { } if (UsingDecodeOrder()) { - frame_queue.PushDecodeOrder(id, luma_top, std::move(frame)); - frame_queue.PushDecodeOrder(id, luma_bottom, std::move(frame_copy)); + host1x.frame_queue.PushDecodeOrder(id, luma_top, std::move(frame)); + host1x.frame_queue.PushDecodeOrder(id, luma_bottom, std::move(frame_copy)); } else { - frame_queue.PushPresentOrder(id, luma_top, std::move(frame)); - frame_queue.PushPresentOrder(id, luma_bottom, std::move(frame_copy)); + host1x.frame_queue.PushPresentOrder(id, luma_top, std::move(frame)); + host1x.frame_queue.PushPresentOrder(id, luma_bottom, std::move(frame_copy)); } } else { auto [luma_offset, chroma_offset] = GetProgressiveOffsets(); @@ -68,9 +69,9 @@ void Decoder::Decode() { } if (UsingDecodeOrder()) { - frame_queue.PushDecodeOrder(id, luma_offset, std::move(frame)); + host1x.frame_queue.PushDecodeOrder(id, luma_offset, std::move(frame)); } else { - frame_queue.PushPresentOrder(id, luma_offset, std::move(frame)); + host1x.frame_queue.PushPresentOrder(id, luma_offset, std::move(frame)); } } } -- cgit v1.2.3