From 6291975731f6237de3edc81a96aca87cdae01000 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 27 Oct 2020 02:27:29 -0400 Subject: [PATCH] vp9: std::move buffer within ComposeFrameHeader() We can move the buffer here to avoid a heap reallocation --- src/video_core/command_classes/codecs/vp9.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video_core/command_classes/codecs/vp9.cpp b/src/video_core/command_classes/codecs/vp9.cpp index 2a3bdb7e7..bcbea9c05 100644 --- a/src/video_core/command_classes/codecs/vp9.cpp +++ b/src/video_core/command_classes/codecs/vp9.cpp @@ -853,7 +853,7 @@ std::vector& VP9::ComposeFrameHeader(NvdecCommon::NvdecRegisters& state) { { Vp9FrameContainer curr_frame = GetCurrentFrame(state); current_frame_info = curr_frame.info; - bitstream = curr_frame.bit_stream; + bitstream = std::move(curr_frame.bit_stream); } // The uncompressed header routine sets PrevProb parameters needed for the compressed header