summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/video_core/command_classes/codecs/h264.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/video_core/command_classes/codecs/h264.cpp b/src/video_core/command_classes/codecs/h264.cpp
index 51ee14c13..5519c4705 100644
--- a/src/video_core/command_classes/codecs/h264.cpp
+++ b/src/video_core/command_classes/codecs/h264.cpp
@@ -20,6 +20,8 @@
20 20
21#include <array> 21#include <array>
22#include <bit> 22#include <bit>
23
24#include "common/settings.h"
23#include "video_core/command_classes/codecs/h264.h" 25#include "video_core/command_classes/codecs/h264.h"
24#include "video_core/gpu.h" 26#include "video_core/gpu.h"
25#include "video_core/memory_manager.h" 27#include "video_core/memory_manager.h"
@@ -96,7 +98,10 @@ const std::vector<u8>& H264::ComposeFrameHeader(const NvdecCommon::NvdecRegister
96 (context.h264_parameter_set.frame_mbs_only_flag ? 1 : 2); 98 (context.h264_parameter_set.frame_mbs_only_flag ? 1 : 2);
97 99
98 // TODO (ameerj): Where do we get this number, it seems to be particular for each stream 100 // TODO (ameerj): Where do we get this number, it seems to be particular for each stream
99 writer.WriteUe(6); // Max number of reference frames 101 const auto nvdec_decoding = Settings::values.nvdec_emulation.GetValue();
102 const bool uses_gpu_decoding = nvdec_decoding == Settings::NvdecEmulation::GPU;
103 const u32 max_num_ref_frames = uses_gpu_decoding ? 6u : 16u;
104 writer.WriteUe(max_num_ref_frames);
100 writer.WriteBit(false); 105 writer.WriteBit(false);
101 writer.WriteUe(context.h264_parameter_set.pic_width_in_mbs - 1); 106 writer.WriteUe(context.h264_parameter_set.pic_width_in_mbs - 1);
102 writer.WriteUe(pic_height - 1); 107 writer.WriteUe(pic_height - 1);