aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/host1x/codecs/h264.cpp
diff options
context:
space:
mode:
authorcomex <comexk@gmail.com>2023-07-01 15:01:11 -0700
committercomex <comexk@gmail.com>2023-07-01 15:01:11 -0700
commit98685d48e3cb9f25f6919f004ec62cadf33afad2 (patch)
tree9df2ce7f57370641589bfae7196c77b090bcbe0f /src/video_core/host1x/codecs/h264.cpp
parentd885dd5b642807d0587acad43668cfccfdf06d1e (diff)
parent8857911216f16a098231c25e0d2992ab67e33f83 (diff)
Merge remote-tracking branch 'origin/master' into ssl
Diffstat (limited to 'src/video_core/host1x/codecs/h264.cpp')
-rw-r--r--src/video_core/host1x/codecs/h264.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/video_core/host1x/codecs/h264.cpp b/src/video_core/host1x/codecs/h264.cpp
index 6ce179167..ce827eb6c 100644
--- a/src/video_core/host1x/codecs/h264.cpp
+++ b/src/video_core/host1x/codecs/h264.cpp
@@ -4,6 +4,7 @@
#include <array>
#include <bit>
+#include "common/scratch_buffer.h"
#include "common/settings.h"
#include "video_core/host1x/codecs/h264.h"
#include "video_core/host1x/host1x.h"
@@ -188,7 +189,8 @@ void H264BitWriter::WriteBit(bool state) {
}
void H264BitWriter::WriteScalingList(std::span<const u8> list, s32 start, s32 count) {
- std::vector<u8> scan(count);
+ static Common::ScratchBuffer<u8> scan{};
+ scan.resize_destructive(count);
if (count == 16) {
std::memcpy(scan.data(), zig_zag_scan.data(), scan.size());
} else {