Procházet zdrojové kódy

vp9: std::move buffer within ComposeFrameHeader()

We can move the buffer here to avoid a heap reallocation
Lioncash před 5 roky
rodič
revize
6291975731
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      src/video_core/command_classes/codecs/vp9.cpp

+ 1 - 1
src/video_core/command_classes/codecs/vp9.cpp

@@ -853,7 +853,7 @@ std::vector<u8>& 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