aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/command_classes
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/command_classes')
-rw-r--r--src/video_core/command_classes/codecs/codec.cpp4
-rw-r--r--src/video_core/command_classes/codecs/vp9.cpp42
-rw-r--r--src/video_core/command_classes/codecs/vp9.h2
-rw-r--r--src/video_core/command_classes/vic.cpp10
4 files changed, 29 insertions, 29 deletions
diff --git a/src/video_core/command_classes/codecs/codec.cpp b/src/video_core/command_classes/codecs/codec.cpp
index f547f5bd4..39bc923a5 100644
--- a/src/video_core/command_classes/codecs/codec.cpp
+++ b/src/video_core/command_classes/codecs/codec.cpp
@@ -44,7 +44,7 @@ Codec::~Codec() {
}
void Codec::SetTargetCodec(NvdecCommon::VideoCodec codec) {
- LOG_INFO(Service_NVDRV, "NVDEC video codec initialized to {}", static_cast<u32>(codec));
+ LOG_INFO(Service_NVDRV, "NVDEC video codec initialized to {}", codec);
current_codec = codec;
}
@@ -62,7 +62,7 @@ void Codec::Decode() {
} else if (current_codec == NvdecCommon::VideoCodec::Vp9) {
av_codec = avcodec_find_decoder(AV_CODEC_ID_VP9);
} else {
- LOG_ERROR(Service_NVDRV, "Unknown video codec {}", static_cast<u32>(current_codec));
+ LOG_ERROR(Service_NVDRV, "Unknown video codec {}", current_codec);
return;
}
diff --git a/src/video_core/command_classes/codecs/vp9.cpp b/src/video_core/command_classes/codecs/vp9.cpp
index 7d8d6ee3c..59e586695 100644
--- a/src/video_core/command_classes/codecs/vp9.cpp
+++ b/src/video_core/command_classes/codecs/vp9.cpp
@@ -233,7 +233,7 @@ constexpr std::array<s32, 254> map_lut{
}
} // Anonymous namespace
-VP9::VP9(GPU& gpu) : gpu(gpu) {}
+VP9::VP9(GPU& gpu_) : gpu{gpu_} {}
VP9::~VP9() = default;
@@ -374,43 +374,43 @@ void VP9::InsertEntropy(u64 offset, Vp9EntropyProbs& dst) {
}
Vp9FrameContainer VP9::GetCurrentFrame(const NvdecCommon::NvdecRegisters& state) {
- Vp9FrameContainer frame{};
+ Vp9FrameContainer current_frame{};
{
gpu.SyncGuestHost();
- frame.info = GetVp9PictureInfo(state);
- frame.bit_stream.resize(frame.info.bitstream_size);
- gpu.MemoryManager().ReadBlock(state.frame_bitstream_offset, frame.bit_stream.data(),
- frame.info.bitstream_size);
+ current_frame.info = GetVp9PictureInfo(state);
+ current_frame.bit_stream.resize(current_frame.info.bitstream_size);
+ gpu.MemoryManager().ReadBlock(state.frame_bitstream_offset, current_frame.bit_stream.data(),
+ current_frame.info.bitstream_size);
}
// Buffer two frames, saving the last show frame info
if (!next_next_frame.bit_stream.empty()) {
Vp9FrameContainer temp{
- .info = frame.info,
- .bit_stream = std::move(frame.bit_stream),
+ .info = current_frame.info,
+ .bit_stream = std::move(current_frame.bit_stream),
};
- next_next_frame.info.show_frame = frame.info.last_frame_shown;
- frame.info = next_next_frame.info;
- frame.bit_stream = std::move(next_next_frame.bit_stream);
+ next_next_frame.info.show_frame = current_frame.info.last_frame_shown;
+ current_frame.info = next_next_frame.info;
+ current_frame.bit_stream = std::move(next_next_frame.bit_stream);
next_next_frame = std::move(temp);
if (!next_frame.bit_stream.empty()) {
Vp9FrameContainer temp2{
- .info = frame.info,
- .bit_stream = std::move(frame.bit_stream),
+ .info = current_frame.info,
+ .bit_stream = std::move(current_frame.bit_stream),
};
- next_frame.info.show_frame = frame.info.last_frame_shown;
- frame.info = next_frame.info;
- frame.bit_stream = std::move(next_frame.bit_stream);
+ next_frame.info.show_frame = current_frame.info.last_frame_shown;
+ current_frame.info = next_frame.info;
+ current_frame.bit_stream = std::move(next_frame.bit_stream);
next_frame = std::move(temp2);
} else {
- next_frame.info = frame.info;
- next_frame.bit_stream = std::move(frame.bit_stream);
+ next_frame.info = current_frame.info;
+ next_frame.bit_stream = std::move(current_frame.bit_stream);
}
} else {
- next_next_frame.info = frame.info;
- next_next_frame.bit_stream = std::move(frame.bit_stream);
+ next_next_frame.info = current_frame.info;
+ next_next_frame.bit_stream = std::move(current_frame.bit_stream);
}
- return frame;
+ return current_frame;
}
std::vector<u8> VP9::ComposeCompressedHeader() {
diff --git a/src/video_core/command_classes/codecs/vp9.h b/src/video_core/command_classes/codecs/vp9.h
index 9ebbbf59e..8396c8105 100644
--- a/src/video_core/command_classes/codecs/vp9.h
+++ b/src/video_core/command_classes/codecs/vp9.h
@@ -108,7 +108,7 @@ private:
class VP9 {
public:
- explicit VP9(GPU& gpu);
+ explicit VP9(GPU& gpu_);
~VP9();
VP9(const VP9&) = delete;
diff --git a/src/video_core/command_classes/vic.cpp b/src/video_core/command_classes/vic.cpp
index 6cfc193fa..aa8c9f9de 100644
--- a/src/video_core/command_classes/vic.cpp
+++ b/src/video_core/command_classes/vic.cpp
@@ -9,7 +9,7 @@
#include "video_core/engines/maxwell_3d.h"
#include "video_core/gpu.h"
#include "video_core/memory_manager.h"
-#include "video_core/texture_cache/surface_params.h"
+#include "video_core/textures/decoders.h"
extern "C" {
#include <libswscale/swscale.h>
@@ -27,7 +27,7 @@ void Vic::VicStateWrite(u32 offset, u32 arguments) {
}
void Vic::ProcessMethod(Method method, const std::vector<u32>& arguments) {
- LOG_DEBUG(HW_GPU, "Vic method 0x{:X}", static_cast<u32>(method));
+ LOG_DEBUG(HW_GPU, "Vic method 0x{:X}", method);
VicStateWrite(static_cast<u32>(method), arguments[0]);
const u64 arg = static_cast<u64>(arguments[0]) << 8;
switch (method) {
@@ -105,9 +105,9 @@ void Vic::Execute() {
const auto size = Tegra::Texture::CalculateSize(true, 4, frame->width, frame->height, 1,
block_height, 0);
std::vector<u8> swizzled_data(size);
- Tegra::Texture::CopySwizzledData(frame->width, frame->height, 1, 4, 4,
- swizzled_data.data(), converted_frame_buffer.get(),
- false, block_height, 0, 1);
+ Tegra::Texture::SwizzleSubrect(frame->width, frame->height, frame->width * 4,
+ frame->width, 4, swizzled_data.data(),
+ converted_frame_buffer.get(), block_height, 0, 0);
gpu.MemoryManager().WriteBlock(output_surface_luma_address, swizzled_data.data(), size);
gpu.Maxwell3D().OnMemoryWrite();