summaryrefslogtreecommitdiffstats
path: root/src/video_core/command_classes/vic.h
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-10-07 17:14:05 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-10-07 20:56:44 +0200
commit5aae61775fc3d2be15f1e45da40b802feed6b8f1 (patch)
tree2a370b59e28578f65a561e46180d91bfc79cb07b /src/video_core/command_classes/vic.h
parentvic: Implement RGBX frame format (diff)
downloadyuzu-5aae61775fc3d2be15f1e45da40b802feed6b8f1.tar
yuzu-5aae61775fc3d2be15f1e45da40b802feed6b8f1.tar.gz
yuzu-5aae61775fc3d2be15f1e45da40b802feed6b8f1.tar.bz2
yuzu-5aae61775fc3d2be15f1e45da40b802feed6b8f1.tar.lz
yuzu-5aae61775fc3d2be15f1e45da40b802feed6b8f1.tar.xz
yuzu-5aae61775fc3d2be15f1e45da40b802feed6b8f1.tar.zst
yuzu-5aae61775fc3d2be15f1e45da40b802feed6b8f1.zip
Diffstat (limited to 'src/video_core/command_classes/vic.h')
-rw-r--r--src/video_core/command_classes/vic.h21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/video_core/command_classes/vic.h b/src/video_core/command_classes/vic.h
index ea10c2f0f..6d4cdfd57 100644
--- a/src/video_core/command_classes/vic.h
+++ b/src/video_core/command_classes/vic.h
@@ -6,7 +6,6 @@
#include <memory>
#include <vector>
-#include "common/bit_field.h"
#include "common/common_types.h"
struct SwsContext;
@@ -14,6 +13,7 @@ struct SwsContext;
namespace Tegra {
class GPU;
class Nvdec;
+union VicConfig;
class Vic {
public:
@@ -27,6 +27,7 @@ public:
};
explicit Vic(GPU& gpu, std::shared_ptr<Nvdec> nvdec_processor);
+
~Vic();
/// Write to the device state.
@@ -35,23 +36,9 @@ public:
private:
void Execute();
- enum class VideoPixelFormat : u64_le {
- RGBA8 = 0x1f,
- BGRA8 = 0x20,
- RGBX8 = 0x23,
- Yuv420 = 0x44,
- };
+ void WriteRGBFrame(const AVFrame* frame, const VicConfig& config);
- union VicConfig {
- u64_le raw{};
- BitField<0, 7, u64_le> pixel_format;
- BitField<7, 2, u64_le> chroma_loc_horiz;
- BitField<9, 2, u64_le> chroma_loc_vert;
- BitField<11, 4, u64_le> block_linear_kind;
- BitField<15, 4, u64_le> block_linear_height_log2;
- BitField<32, 14, u64_le> surface_width_minus1;
- BitField<46, 14, u64_le> surface_height_minus1;
- };
+ void WriteYUVFrame(const AVFrame* frame, const VicConfig& config);
GPU& gpu;
std::shared_ptr<Tegra::Nvdec> nvdec_processor;