aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Nvdec.Vp9/Common
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.Graphics.Nvdec.Vp9/Common')
-rw-r--r--src/Ryujinx.Graphics.Nvdec.Vp9/Common/BitUtils.cs3
-rw-r--r--src/Ryujinx.Graphics.Nvdec.Vp9/Common/MemoryAllocator.cs4
2 files changed, 4 insertions, 3 deletions
diff --git a/src/Ryujinx.Graphics.Nvdec.Vp9/Common/BitUtils.cs b/src/Ryujinx.Graphics.Nvdec.Vp9/Common/BitUtils.cs
index 641188f8..86981930 100644
--- a/src/Ryujinx.Graphics.Nvdec.Vp9/Common/BitUtils.cs
+++ b/src/Ryujinx.Graphics.Nvdec.Vp9/Common/BitUtils.cs
@@ -20,7 +20,7 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Common
{
10 => (ushort)Math.Clamp(val, 0, 1023),
12 => (ushort)Math.Clamp(val, 0, 4095),
- _ => (ushort)Math.Clamp(val, 0, 255)
+ _ => (ushort)Math.Clamp(val, 0, 255),
};
}
@@ -46,6 +46,7 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Common
private static int GetMsb(uint n)
{
Debug.Assert(n != 0);
+
return 31 ^ BitOperations.LeadingZeroCount(n);
}
diff --git a/src/Ryujinx.Graphics.Nvdec.Vp9/Common/MemoryAllocator.cs b/src/Ryujinx.Graphics.Nvdec.Vp9/Common/MemoryAllocator.cs
index 473dd904..c75cfeb0 100644
--- a/src/Ryujinx.Graphics.Nvdec.Vp9/Common/MemoryAllocator.cs
+++ b/src/Ryujinx.Graphics.Nvdec.Vp9/Common/MemoryAllocator.cs
@@ -16,7 +16,7 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Common
public bool InUse;
}
- private PoolItem[] _pool = new PoolItem[PoolEntries];
+ private readonly PoolItem[] _pool = new PoolItem[PoolEntries];
public ArrayPtr<T> Allocate<T>(int length) where T : unmanaged
{
@@ -91,4 +91,4 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Common
}
}
}
-} \ No newline at end of file
+}