Files
eden/src/video_core/host1x/codecs/vp8.h
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

64 lines
1.5 KiB
C++
Raw Normal View History

// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
2021-11-12 19:28:21 -05:00
#pragma once
2021-11-12 17:14:02 -05:00
#include <array>
2023-06-24 21:58:23 -04:00
#include <span>
2021-11-12 19:28:21 -05:00
2021-11-12 17:14:02 -05:00
#include "common/common_funcs.h"
2021-11-12 19:28:21 -05:00
#include "common/common_types.h"
2023-06-24 21:58:23 -04:00
#include "common/scratch_buffer.h"
2024-04-05 01:58:29 +02:00
#include "video_core/host1x/codecs/decoder.h"
2022-01-30 10:31:13 +01:00
#include "video_core/host1x/nvdec_common.h"
#include "video_core/host1x/codec_types.h"
2021-11-12 19:28:21 -05:00
namespace Tegra {
2022-01-30 22:26:01 +01:00
namespace Host1x {
class Host1x;
} // namespace Host1x
2024-04-05 01:58:29 +02:00
namespace Decoders {
enum class Vp8SurfaceIndex : u32 {
Last = 0,
Golden = 1,
AltRef = 2,
Current = 3,
};
2021-11-12 19:28:21 -05:00
2024-04-05 01:58:29 +02:00
class VP8 final : public Decoder {
2021-11-12 19:28:21 -05:00
public:
explicit VP8(Host1x::Host1x& host1x, const Host1x::NvdecCommon::NvdecRegisters& regs, s32 id);
2024-04-05 01:58:29 +02:00
~VP8() override;
VP8(const VP8&) = delete;
VP8& operator=(const VP8&) = delete;
VP8(VP8&&) = delete;
VP8& operator=(VP8&&) = delete;
[[nodiscard]] std::span<const u8> ComposeFrame() override;
2021-11-12 19:28:21 -05:00
2024-04-05 01:58:29 +02:00
std::tuple<u64, u64> GetProgressiveOffsets() override;
std::tuple<u64, u64, u64, u64> GetInterlacedOffsets() override;
bool IsInterlaced() override {
return false;
}
std::string_view GetCurrentCodecName() const override {
return "VP8";
}
2021-11-12 19:28:21 -05:00
private:
2024-04-05 01:58:29 +02:00
VP8PictureInfo current_context{};
Common::ScratchBuffer<u8> frame_scratch;
2021-11-12 19:28:21 -05:00
};
2024-04-05 01:58:29 +02:00
} // namespace Decoders
2021-11-12 19:28:21 -05:00
} // namespace Tegra