mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-01-14 22:50:34 +00:00
Remove duplicate BitUtils methods
This commit is contained in:
parent
fcca8871fb
commit
10e775dbc1
1 changed files with 3 additions and 15 deletions
|
@ -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;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Numerics;
|
|
||||||
|
|
||||||
namespace Ryujinx.Graphics.Nvdec.Vp9
|
namespace Ryujinx.Graphics.Nvdec.Vp9
|
||||||
{
|
{
|
||||||
|
@ -11,20 +10,9 @@ namespace Ryujinx.Graphics.Nvdec.Vp9
|
||||||
public ulong BitOffset;
|
public ulong BitOffset;
|
||||||
public object ErrorHandlerData;
|
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)
|
public int DecodeUnsignedMax(int max)
|
||||||
{
|
{
|
||||||
int data = ReadLiteral(GetUnsignedBits((uint)max));
|
int data = ReadLiteral(BitUtils.GetUnsignedBits((uint)max));
|
||||||
return data > max ? max : data;
|
return data > max ? max : data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue