diff options
Diffstat (limited to 'src')
| -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() { | |||
| 677 | current_frame_info.intra_only = true; | 677 | current_frame_info.intra_only = true; |
| 678 | 678 | ||
| 679 | } else { | 679 | } else { |
| 680 | std::array<s32, 3> ref_frame_index; | ||
| 681 | 680 | ||
| 682 | if (!current_frame_info.show_frame) { | 681 | if (!current_frame_info.show_frame) { |
| 683 | uncomp_writer.WriteBit(current_frame_info.intra_only); | 682 | uncomp_writer.WriteBit(current_frame_info.intra_only); |
| @@ -692,9 +691,9 @@ VpxBitStreamWriter VP9::ComposeUncompressedHeader() { | |||
| 692 | } | 691 | } |
| 693 | 692 | ||
| 694 | // Last, Golden, Altref frames | 693 | // Last, Golden, Altref frames |
| 695 | ref_frame_index = std::array<s32, 3>{0, 1, 2}; | 694 | std::array<s32, 3> ref_frame_index{0, 1, 2}; |
| 696 | 695 | ||
| 697 | // set when next frame is hidden | 696 | // Set when next frame is hidden |
| 698 | // altref and golden references are swapped | 697 | // altref and golden references are swapped |
| 699 | if (swap_next_golden) { | 698 | if (swap_next_golden) { |
| 700 | ref_frame_index = std::array<s32, 3>{0, 2, 1}; | 699 | ref_frame_index = std::array<s32, 3>{0, 2, 1}; |
| @@ -783,17 +782,19 @@ VpxBitStreamWriter VP9::ComposeUncompressedHeader() { | |||
| 783 | for (std::size_t index = 0; index < current_frame_info.ref_deltas.size(); index++) { | 782 | for (std::size_t index = 0; index < current_frame_info.ref_deltas.size(); index++) { |
| 784 | const s8 old_deltas = loop_filter_ref_deltas[index]; | 783 | const s8 old_deltas = loop_filter_ref_deltas[index]; |
| 785 | const s8 new_deltas = current_frame_info.ref_deltas[index]; | 784 | const s8 new_deltas = current_frame_info.ref_deltas[index]; |
| 785 | const bool differing_delta = old_deltas != new_deltas; | ||
| 786 | 786 | ||
| 787 | loop_filter_delta_update |= | 787 | update_loop_filter_ref_deltas[index] = differing_delta; |
| 788 | (update_loop_filter_ref_deltas[index] = old_deltas != new_deltas); | 788 | loop_filter_delta_update |= differing_delta; |
| 789 | } | 789 | } |
| 790 | 790 | ||
| 791 | for (std::size_t index = 0; index < current_frame_info.mode_deltas.size(); index++) { | 791 | for (std::size_t index = 0; index < current_frame_info.mode_deltas.size(); index++) { |
| 792 | const s8 old_deltas = loop_filter_mode_deltas[index]; | 792 | const s8 old_deltas = loop_filter_mode_deltas[index]; |
| 793 | const s8 new_deltas = current_frame_info.mode_deltas[index]; | 793 | const s8 new_deltas = current_frame_info.mode_deltas[index]; |
| 794 | const bool differing_delta = old_deltas != new_deltas; | ||
| 794 | 795 | ||
| 795 | loop_filter_delta_update |= | 796 | update_loop_filter_mode_deltas[index] = differing_delta; |
| 796 | (update_loop_filter_mode_deltas[index] = old_deltas != new_deltas); | 797 | loop_filter_delta_update |= differing_delta; |
| 797 | } | 798 | } |
| 798 | 799 | ||
| 799 | uncomp_writer.WriteBit(loop_filter_delta_update); | 800 | uncomp_writer.WriteBit(loop_filter_delta_update); |