aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/video_core/host1x/codecs/vp8.h
diff options
context:
space:
mode:
authoryuzubot <[email protected]>2024-03-04 00:57:21 +0000
committeryuzubot <[email protected]>2024-03-04 00:57:21 +0000
commit276ceb26d0c58a00a0e65e3bf4d9c4371428f82d (patch)
tree587c6b5415501f1b1a1795ddd6df8d3403252cb4 /src/video_core/host1x/codecs/vp8.h
parent15e6e48bef0216480661444a8d8b348c1cca47bb (diff)
downloadyuzu-android-276ceb26d0c58a00a0e65e3bf4d9c4371428f82d.tar.gz
yuzu-android-276ceb26d0c58a00a0e65e3bf4d9c4371428f82d.zip
Merge yuzu-emu#12461
Diffstat (limited to 'src/video_core/host1x/codecs/vp8.h')
-rw-r--r--src/video_core/host1x/codecs/vp8.h44
1 files changed, 34 insertions, 10 deletions
diff --git a/src/video_core/host1x/codecs/vp8.h b/src/video_core/host1x/codecs/vp8.h
index 5945e4658..74800281d 100644
--- a/src/video_core/host1x/codecs/vp8.h
+++ b/src/video_core/host1x/codecs/vp8.h
@@ -9,6 +9,7 @@
#include "common/common_funcs.h"
#include "common/common_types.h"
#include "common/scratch_buffer.h"
+#include "video_core/host1x/codecs/decoder.h"
#include "video_core/host1x/nvdec_common.h"
namespace Tegra {
@@ -17,20 +18,41 @@ namespace Host1x {
class Host1x;
} // namespace Host1x
-namespace Decoder {
+namespace Decoders {
+enum class Vp8SurfaceIndex : u32 {
+ Last = 0,
+ Golden = 1,
+ AltRef = 2,
+ Current = 3,
+};
-class VP8 {
+class VP8 final : public Decoder {
public:
- explicit VP8(Host1x::Host1x& host1x);
- ~VP8();
+ explicit VP8(Host1x::Host1x& host1x, const Host1x::NvdecCommon::NvdecRegisters& regs, s32 id,
+ Host1x::FrameQueue& frame_queue);
+ ~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;
- /// Compose the VP8 frame for FFmpeg decoding
- [[nodiscard]] std::span<const u8> ComposeFrame(
- const Host1x::NvdecCommon::NvdecRegisters& state);
+ 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";
+ }
private:
- Common::ScratchBuffer<u8> frame;
- Host1x::Host1x& host1x;
+ Common::ScratchBuffer<u8> frame_scratch;
struct VP8PictureInfo {
INSERT_PADDING_WORDS_NOINIT(14);
@@ -73,7 +95,9 @@ private:
INSERT_PADDING_WORDS_NOINIT(3);
};
static_assert(sizeof(VP8PictureInfo) == 0xc0, "PictureInfo is an invalid size");
+
+ VP8PictureInfo current_context{};
};
-} // namespace Decoder
+} // namespace Decoders
} // namespace Tegra