From 668e80a9f42fb4ce0e16f6381d05bcbd286b2da1 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Sun, 30 Jan 2022 10:31:13 +0100 Subject: VideoCore: Refactor syncing. --- src/video_core/command_classes/vic.h | 61 ------------------------------------ 1 file changed, 61 deletions(-) delete mode 100644 src/video_core/command_classes/vic.h (limited to 'src/video_core/command_classes/vic.h') diff --git a/src/video_core/command_classes/vic.h b/src/video_core/command_classes/vic.h deleted file mode 100644 index 010daa6b6..000000000 --- a/src/video_core/command_classes/vic.h +++ /dev/null @@ -1,61 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include -#include -#include "common/common_types.h" - -struct SwsContext; - -namespace Tegra { -class GPU; -class Nvdec; -union VicConfig; - -class Vic { -public: - enum class Method : u32 { - Execute = 0xc0, - SetControlParams = 0x1c1, - SetConfigStructOffset = 0x1c2, - SetOutputSurfaceLumaOffset = 0x1c8, - SetOutputSurfaceChromaOffset = 0x1c9, - SetOutputSurfaceChromaUnusedOffset = 0x1ca - }; - - explicit Vic(GPU& gpu, std::shared_ptr nvdec_processor); - - ~Vic(); - - /// Write to the device state. - void ProcessMethod(Method method, u32 argument); - -private: - void Execute(); - - void WriteRGBFrame(const AVFrame* frame, const VicConfig& config); - - void WriteYUVFrame(const AVFrame* frame, const VicConfig& config); - - GPU& gpu; - std::shared_ptr nvdec_processor; - - /// Avoid reallocation of the following buffers every frame, as their - /// size does not change during a stream - using AVMallocPtr = std::unique_ptr; - AVMallocPtr converted_frame_buffer; - std::vector luma_buffer; - std::vector chroma_buffer; - - GPUVAddr config_struct_address{}; - GPUVAddr output_surface_luma_address{}; - GPUVAddr output_surface_chroma_address{}; - - SwsContext* scaler_ctx{}; - s32 scaler_width{}; - s32 scaler_height{}; -}; - -} // namespace Tegra -- cgit v1.2.3