diff options
| author | arades79 <scravers@protonmail.com> | 2023-02-11 13:28:03 -0500 |
|---|---|---|
| committer | arades79 <scravers@protonmail.com> | 2023-02-14 12:33:11 -0500 |
| commit | 45e13b03f372230dbf780f3fa87dd88f388af605 (patch) | |
| tree | 555593e7e5016b6ba2a777d7417ada244abce458 /src/video_core/host1x/codecs/vp9.cpp | |
| parent | 5f5a6e4b2e541e86c0bfdb99e3acfbbebe89a5d3 (diff) | |
add static lifetime to constexpr values to force compile time evaluation where possible
Signed-off-by: arades79 <scravers@protonmail.com>
Diffstat (limited to 'src/video_core/host1x/codecs/vp9.cpp')
| -rw-r--r-- | src/video_core/host1x/codecs/vp9.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/host1x/codecs/vp9.cpp b/src/video_core/host1x/codecs/vp9.cpp index cf40c9012..bb691f7d8 100644 --- a/src/video_core/host1x/codecs/vp9.cpp +++ b/src/video_core/host1x/codecs/vp9.cpp @@ -283,7 +283,7 @@ void VP9::EncodeTermSubExp(VpxRangeEncoder& writer, s32 value) { } else { value -= 64; - constexpr s32 size = 8; + constexpr static s32 size = 8; const s32 mask = (1 << size) - 191; @@ -307,7 +307,7 @@ bool VP9::WriteLessThan(VpxRangeEncoder& writer, s32 value, s32 test) { void VP9::WriteCoefProbabilityUpdate(VpxRangeEncoder& writer, s32 tx_mode, const std::array<u8, 1728>& new_prob, const std::array<u8, 1728>& old_prob) { - constexpr u32 block_bytes = 2 * 2 * 6 * 6 * 3; + constexpr static u32 block_bytes = 2 * 2 * 6 * 6 * 3; const auto needs_update = [&](u32 base_index) { return !std::equal(new_prob.begin() + base_index, |
