mirror of
https://github.com/Ryujinx-NX/Ryujinx.git
synced 2024-11-14 13:07:41 -07:00
Remove duplicate BitUtils methods
This commit is contained in:
parent
fcca8871fb
commit
10e775dbc1
@ -1,7 +1,6 @@
|
||||
using Ryujinx.Graphics.Nvdec.Vp9.Types;
|
||||
using Ryujinx.Graphics.Nvdec.Vp9.Common;
|
||||
using Ryujinx.Graphics.Nvdec.Vp9.Types;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Numerics;
|
||||
|
||||
namespace Ryujinx.Graphics.Nvdec.Vp9
|
||||
{
|
||||
@ -11,20 +10,9 @@ namespace Ryujinx.Graphics.Nvdec.Vp9
|
||||
public ulong BitOffset;
|
||||
public object ErrorHandlerData;
|
||||
|
||||
private static int GetMsb(uint n)
|
||||
{
|
||||
Debug.Assert(n != 0);
|
||||
return 31 ^ BitOperations.LeadingZeroCount(n);
|
||||
}
|
||||
|
||||
private static int GetUnsignedBits(uint numValues)
|
||||
{
|
||||
return numValues > 0 ? GetMsb(numValues) + 1 : 0;
|
||||
}
|
||||
|
||||
public int DecodeUnsignedMax(int max)
|
||||
{
|
||||
int data = ReadLiteral(GetUnsignedBits((uint)max));
|
||||
int data = ReadLiteral(BitUtils.GetUnsignedBits((uint)max));
|
||||
return data > max ? max : data;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user