diff options
author | Lioncash <mathew1800@gmail.com> | 2020-10-27 07:26:03 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2020-10-27 07:26:03 +0100 |
commit | 111802bbbb84e1713a6a093ca334009f709d02ed (patch) | |
tree | 78068b15d1ee77d9be5d93cf5ebd74b5c0366d88 /src/video_core/command_classes/codecs/vp9.cpp | |
parent | vp9: Remove pessimizing moves (diff) | |
download | yuzu-111802bbbb84e1713a6a093ca334009f709d02ed.tar yuzu-111802bbbb84e1713a6a093ca334009f709d02ed.tar.gz yuzu-111802bbbb84e1713a6a093ca334009f709d02ed.tar.bz2 yuzu-111802bbbb84e1713a6a093ca334009f709d02ed.tar.lz yuzu-111802bbbb84e1713a6a093ca334009f709d02ed.tar.xz yuzu-111802bbbb84e1713a6a093ca334009f709d02ed.tar.zst yuzu-111802bbbb84e1713a6a093ca334009f709d02ed.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/command_classes/codecs/vp9.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/video_core/command_classes/codecs/vp9.cpp b/src/video_core/command_classes/codecs/vp9.cpp index 0315a80bc..380180975 100644 --- a/src/video_core/command_classes/codecs/vp9.cpp +++ b/src/video_core/command_classes/codecs/vp9.cpp @@ -677,7 +677,6 @@ VpxBitStreamWriter VP9::ComposeUncompressedHeader() { current_frame_info.intra_only = true; } else { - std::array<s32, 3> ref_frame_index; if (!current_frame_info.show_frame) { uncomp_writer.WriteBit(current_frame_info.intra_only); @@ -692,9 +691,9 @@ VpxBitStreamWriter VP9::ComposeUncompressedHeader() { } // Last, Golden, Altref frames - ref_frame_index = std::array<s32, 3>{0, 1, 2}; + std::array<s32, 3> ref_frame_index{0, 1, 2}; - // set when next frame is hidden + // Set when next frame is hidden // altref and golden references are swapped if (swap_next_golden) { ref_frame_index = std::array<s32, 3>{0, 2, 1}; @@ -783,17 +782,19 @@ VpxBitStreamWriter VP9::ComposeUncompressedHeader() { for (std::size_t index = 0; index < current_frame_info.ref_deltas.size(); index++) { const s8 old_deltas = loop_filter_ref_deltas[index]; const s8 new_deltas = current_frame_info.ref_deltas[index]; + const bool differing_delta = old_deltas != new_deltas; - loop_filter_delta_update |= - (update_loop_filter_ref_deltas[index] = old_deltas != new_deltas); + update_loop_filter_ref_deltas[index] = differing_delta; + loop_filter_delta_update |= differing_delta; } for (std::size_t index = 0; index < current_frame_info.mode_deltas.size(); index++) { const s8 old_deltas = loop_filter_mode_deltas[index]; const s8 new_deltas = current_frame_info.mode_deltas[index]; + const bool differing_delta = old_deltas != new_deltas; - loop_filter_delta_update |= - (update_loop_filter_mode_deltas[index] = old_deltas != new_deltas); + update_loop_filter_mode_deltas[index] = differing_delta; + loop_filter_delta_update |= differing_delta; } uncomp_writer.WriteBit(loop_filter_delta_update); |