summaryrefslogtreecommitdiffstats
path: root/src/video_core/command_classes/codecs/vp8.h
blob: 70c75f4144331b34c6b77e8ddf91603f4bce19bc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright 2021 yuzu Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.

#pragma once

#include <vector>

#include "common/common_types.h"
#include "video_core/command_classes/nvdec_common.h"

namespace Tegra {
class GPU;
namespace Decoder {

class VP8 {
public:
    explicit VP8(GPU& gpu);
    ~VP8();

    /// Compose the VP8 header of the frame for FFmpeg decoding
    [[nodiscard]] const std::vector<u8>& ComposeFrameHeader(
        const NvdecCommon::NvdecRegisters& state, bool is_first_frame = false);

private:
    std::vector<u8> frame;
    GPU& gpu;
};

} // namespace Decoder
} // namespace Tegra