diff options
author | Feng Chen <vonchenplus@gmail.com> | 2021-09-30 05:58:42 +0200 |
---|---|---|
committer | vonchenplus <vonchenplus@gmail.com> | 2021-10-10 14:07:19 +0200 |
commit | ba8be7503772c363399cd23098123fb584834afd (patch) | |
tree | 1c87f9f608fbd7772c130dd0ff735a84fb0c5517 /src/video_core/command_classes | |
parent | Merge pull request #7043 from astrelsky/cmake (diff) | |
download | yuzu-ba8be7503772c363399cd23098123fb584834afd.tar yuzu-ba8be7503772c363399cd23098123fb584834afd.tar.gz yuzu-ba8be7503772c363399cd23098123fb584834afd.tar.bz2 yuzu-ba8be7503772c363399cd23098123fb584834afd.tar.lz yuzu-ba8be7503772c363399cd23098123fb584834afd.tar.xz yuzu-ba8be7503772c363399cd23098123fb584834afd.tar.zst yuzu-ba8be7503772c363399cd23098123fb584834afd.zip |
Diffstat (limited to 'src/video_core/command_classes')
-rw-r--r-- | src/video_core/command_classes/codecs/h264.cpp | 7 |
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 @@ #include <array> #include <bit> + +#include "common/settings.h" #include "video_core/command_classes/codecs/h264.h" #include "video_core/gpu.h" #include "video_core/memory_manager.h" @@ -96,7 +98,10 @@ const std::vector<u8>& H264::ComposeFrameHeader(const NvdecCommon::NvdecRegister (context.h264_parameter_set.frame_mbs_only_flag ? 1 : 2); // TODO (ameerj): Where do we get this number, it seems to be particular for each stream - writer.WriteUe(6); // Max number of reference frames + const auto nvdec_decoding = Settings::values.nvdec_emulation.GetValue(); + const bool uses_gpu_decoding = nvdec_decoding == Settings::NvdecEmulation::GPU; + const u32 max_num_ref_frames = uses_gpu_decoding ? 6u : 16u; + writer.WriteUe(max_num_ref_frames); writer.WriteBit(false); writer.WriteUe(context.h264_parameter_set.pic_width_in_mbs - 1); writer.WriteUe(pic_height - 1); |