misc: chore: VP9 project cleanup
Target-typed new, remove var usage, use collection expressions, rename many fields & properties to match C# standard
This commit is contained in:
@@ -34,17 +34,17 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
return (ushort)((a + b + 1) >> 1);
|
||||
}
|
||||
|
||||
public static unsafe void D207Predictor8x8(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void D207Predictor8X8(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
D207Predictor(dst, stride, 8, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void D207Predictor16x16(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void D207Predictor16X16(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
D207Predictor(dst, stride, 16, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void D207Predictor32x32(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void D207Predictor32X32(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
D207Predictor(dst, stride, 32, above, left);
|
||||
}
|
||||
@@ -85,17 +85,17 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
}
|
||||
}
|
||||
|
||||
public static unsafe void D63Predictor8x8(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void D63Predictor8X8(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
D63Predictor(dst, stride, 8, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void D63Predictor16x16(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void D63Predictor16X16(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
D63Predictor(dst, stride, 16, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void D63Predictor32x32(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void D63Predictor32X32(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
D63Predictor(dst, stride, 32, above, left);
|
||||
}
|
||||
@@ -117,17 +117,17 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
}
|
||||
}
|
||||
|
||||
public static unsafe void D45Predictor8x8(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void D45Predictor8X8(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
D45Predictor(dst, stride, 8, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void D45Predictor16x16(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void D45Predictor16X16(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
D45Predictor(dst, stride, 16, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void D45Predictor32x32(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void D45Predictor32X32(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
D45Predictor(dst, stride, 32, above, left);
|
||||
}
|
||||
@@ -152,17 +152,17 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
}
|
||||
}
|
||||
|
||||
public static unsafe void D117Predictor8x8(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void D117Predictor8X8(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
D117Predictor(dst, stride, 8, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void D117Predictor16x16(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void D117Predictor16X16(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
D117Predictor(dst, stride, 16, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void D117Predictor32x32(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void D117Predictor32X32(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
D117Predictor(dst, stride, 32, above, left);
|
||||
}
|
||||
@@ -205,17 +205,17 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
}
|
||||
}
|
||||
|
||||
public static unsafe void D135Predictor8x8(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void D135Predictor8X8(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
D135Predictor(dst, stride, 8, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void D135Predictor16x16(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void D135Predictor16X16(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
D135Predictor(dst, stride, 16, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void D135Predictor32x32(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void D135Predictor32X32(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
D135Predictor(dst, stride, 32, above, left);
|
||||
}
|
||||
@@ -245,17 +245,17 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
}
|
||||
}
|
||||
|
||||
public static unsafe void D153Predictor8x8(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void D153Predictor8X8(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
D153Predictor(dst, stride, 8, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void D153Predictor16x16(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void D153Predictor16X16(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
D153Predictor(dst, stride, 16, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void D153Predictor32x32(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void D153Predictor32X32(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
D153Predictor(dst, stride, 32, above, left);
|
||||
}
|
||||
@@ -297,22 +297,22 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
}
|
||||
}
|
||||
|
||||
public static unsafe void VPredictor4x4(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void VPredictor4X4(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
VPredictor(dst, stride, 4, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void VPredictor8x8(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void VPredictor8X8(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
VPredictor(dst, stride, 8, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void VPredictor16x16(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void VPredictor16X16(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
VPredictor(dst, stride, 16, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void VPredictor32x32(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void VPredictor32X32(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
VPredictor(dst, stride, 32, above, left);
|
||||
}
|
||||
@@ -326,22 +326,22 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
}
|
||||
}
|
||||
|
||||
public static unsafe void HPredictor4x4(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void HPredictor4X4(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
HPredictor(dst, stride, 4, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void HPredictor8x8(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void HPredictor8X8(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
HPredictor(dst, stride, 8, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void HPredictor16x16(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void HPredictor16X16(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
HPredictor(dst, stride, 16, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void HPredictor32x32(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void HPredictor32X32(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
HPredictor(dst, stride, 32, above, left);
|
||||
}
|
||||
@@ -355,22 +355,22 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
}
|
||||
}
|
||||
|
||||
public static unsafe void TmPredictor4x4(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void TmPredictor4X4(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
TmPredictor(dst, stride, 4, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void TmPredictor8x8(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void TmPredictor8X8(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
TmPredictor(dst, stride, 8, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void TmPredictor16x16(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void TmPredictor16X16(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
TmPredictor(dst, stride, 16, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void TmPredictor32x32(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void TmPredictor32X32(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
TmPredictor(dst, stride, 32, above, left);
|
||||
}
|
||||
@@ -390,22 +390,22 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
}
|
||||
}
|
||||
|
||||
public static unsafe void Dc128Predictor4x4(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void Dc128Predictor4X4(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
Dc128Predictor(dst, stride, 4, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void Dc128Predictor8x8(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void Dc128Predictor8X8(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
Dc128Predictor(dst, stride, 8, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void Dc128Predictor16x16(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void Dc128Predictor16X16(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
Dc128Predictor(dst, stride, 16, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void Dc128Predictor32x32(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void Dc128Predictor32X32(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
Dc128Predictor(dst, stride, 32, above, left);
|
||||
}
|
||||
@@ -419,36 +419,36 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
}
|
||||
}
|
||||
|
||||
public static unsafe void DcLeftPredictor4x4(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void DcLeftPredictor4X4(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
DcLeftPredictor(dst, stride, 4, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void DcLeftPredictor8x8(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void DcLeftPredictor8X8(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
DcLeftPredictor(dst, stride, 8, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void DcLeftPredictor16x16(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void DcLeftPredictor16X16(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
DcLeftPredictor(dst, stride, 16, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void DcLeftPredictor32x32(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void DcLeftPredictor32X32(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
DcLeftPredictor(dst, stride, 32, above, left);
|
||||
}
|
||||
|
||||
private static unsafe void DcLeftPredictor(byte* dst, int stride, int bs, byte* above, byte* left)
|
||||
{
|
||||
int expectedDc, sum = 0;
|
||||
int sum = 0;
|
||||
|
||||
for (int i = 0; i < bs; i++)
|
||||
{
|
||||
sum += left[i];
|
||||
}
|
||||
|
||||
expectedDc = (sum + (bs >> 1)) / bs;
|
||||
int expectedDc = (sum + (bs >> 1)) / bs;
|
||||
|
||||
for (int r = 0; r < bs; r++)
|
||||
{
|
||||
@@ -457,36 +457,36 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
}
|
||||
}
|
||||
|
||||
public static unsafe void DcTopPredictor4x4(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void DcTopPredictor4X4(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
DcTopPredictor(dst, stride, 4, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void DcTopPredictor8x8(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void DcTopPredictor8X8(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
DcTopPredictor(dst, stride, 8, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void DcTopPredictor16x16(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void DcTopPredictor16X16(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
DcTopPredictor(dst, stride, 16, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void DcTopPredictor32x32(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void DcTopPredictor32X32(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
DcTopPredictor(dst, stride, 32, above, left);
|
||||
}
|
||||
|
||||
private static unsafe void DcTopPredictor(byte* dst, int stride, int bs, byte* above, byte* left)
|
||||
{
|
||||
int expectedDc, sum = 0;
|
||||
int sum = 0;
|
||||
|
||||
for (int i = 0; i < bs; i++)
|
||||
{
|
||||
sum += above[i];
|
||||
}
|
||||
|
||||
expectedDc = (sum + (bs >> 1)) / bs;
|
||||
int expectedDc = (sum + (bs >> 1)) / bs;
|
||||
|
||||
for (int r = 0; r < bs; r++)
|
||||
{
|
||||
@@ -495,29 +495,29 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
}
|
||||
}
|
||||
|
||||
public static unsafe void DcPredictor4x4(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void DcPredictor4X4(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
DcPredictor(dst, stride, 4, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void DcPredictor8x8(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void DcPredictor8X8(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
DcPredictor(dst, stride, 8, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void DcPredictor16x16(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void DcPredictor16X16(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
DcPredictor(dst, stride, 16, above, left);
|
||||
}
|
||||
|
||||
public static unsafe void DcPredictor32x32(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void DcPredictor32X32(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
DcPredictor(dst, stride, 32, above, left);
|
||||
}
|
||||
|
||||
private static unsafe void DcPredictor(byte* dst, int stride, int bs, byte* above, byte* left)
|
||||
{
|
||||
int expectedDc, sum = 0;
|
||||
int sum = 0;
|
||||
int count = 2 * bs;
|
||||
|
||||
for (int i = 0; i < bs; i++)
|
||||
@@ -526,7 +526,7 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
sum += left[i];
|
||||
}
|
||||
|
||||
expectedDc = (sum + (count >> 1)) / count;
|
||||
int expectedDc = (sum + (count >> 1)) / count;
|
||||
|
||||
for (int r = 0; r < bs; r++)
|
||||
{
|
||||
@@ -535,31 +535,31 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
}
|
||||
}
|
||||
|
||||
public static unsafe void HePredictor4x4(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void HePredictor4X4(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
byte h = above[-1];
|
||||
byte I = left[0];
|
||||
byte i = left[0];
|
||||
byte j = left[1];
|
||||
byte k = left[2];
|
||||
byte l = left[3];
|
||||
|
||||
MemoryUtil.Fill(dst + (stride * 0), Avg3(h, I, j), 4);
|
||||
MemoryUtil.Fill(dst + (stride * 1), Avg3(I, j, k), 4);
|
||||
MemoryUtil.Fill(dst + (stride * 0), Avg3(h, i, j), 4);
|
||||
MemoryUtil.Fill(dst + (stride * 1), Avg3(i, j, k), 4);
|
||||
MemoryUtil.Fill(dst + (stride * 2), Avg3(j, k, l), 4);
|
||||
MemoryUtil.Fill(dst + (stride * 3), Avg3(k, l, l), 4);
|
||||
}
|
||||
|
||||
public static unsafe void VePredictor4x4(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void VePredictor4X4(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
byte h = above[-1];
|
||||
byte I = above[0];
|
||||
byte i = above[0];
|
||||
byte j = above[1];
|
||||
byte k = above[2];
|
||||
byte l = above[3];
|
||||
byte m = above[4];
|
||||
|
||||
dst[0] = Avg3(h, I, j);
|
||||
dst[1] = Avg3(I, j, k);
|
||||
dst[0] = Avg3(h, i, j);
|
||||
dst[1] = Avg3(i, j, k);
|
||||
dst[2] = Avg3(j, k, l);
|
||||
dst[3] = Avg3(k, l, m);
|
||||
MemoryUtil.Copy(dst + (stride * 1), dst, 4);
|
||||
@@ -567,23 +567,23 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
MemoryUtil.Copy(dst + (stride * 3), dst, 4);
|
||||
}
|
||||
|
||||
public static unsafe void D207Predictor4x4(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void D207Predictor4X4(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
byte I = left[0];
|
||||
byte i = left[0];
|
||||
byte j = left[1];
|
||||
byte k = left[2];
|
||||
byte l = left[3];
|
||||
Dst(dst, stride, 0, 0) = Avg2(I, j);
|
||||
Dst(dst, stride, 0, 0) = Avg2(i, j);
|
||||
Dst(dst, stride, 2, 0) = Dst(dst, stride, 0, 1) = Avg2(j, k);
|
||||
Dst(dst, stride, 2, 1) = Dst(dst, stride, 0, 2) = Avg2(k, l);
|
||||
Dst(dst, stride, 1, 0) = Avg3(I, j, k);
|
||||
Dst(dst, stride, 1, 0) = Avg3(i, j, k);
|
||||
Dst(dst, stride, 3, 0) = Dst(dst, stride, 1, 1) = Avg3(j, k, l);
|
||||
Dst(dst, stride, 3, 1) = Dst(dst, stride, 1, 2) = Avg3(k, l, l);
|
||||
Dst(dst, stride, 3, 2) = Dst(dst, stride, 2, 2) = Dst(dst, stride, 0, 3) =
|
||||
Dst(dst, stride, 1, 3) = Dst(dst, stride, 2, 3) = Dst(dst, stride, 3, 3) = l;
|
||||
}
|
||||
|
||||
public static unsafe void D63Predictor4x4(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void D63Predictor4X4(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
byte a = above[0];
|
||||
byte b = above[1];
|
||||
@@ -605,7 +605,7 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
Dst(dst, stride, 3, 3) = Avg3(e, f, g); // Differs from vp8
|
||||
}
|
||||
|
||||
public static unsafe void D63EPredictor4x4(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void D63EPredictor4X4(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
byte a = above[0];
|
||||
byte b = above[1];
|
||||
@@ -628,7 +628,7 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
Dst(dst, stride, 3, 3) = Avg3(f, g, h);
|
||||
}
|
||||
|
||||
public static unsafe void D45Predictor4x4(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void D45Predictor4X4(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
byte a = above[0];
|
||||
byte b = above[1];
|
||||
@@ -648,7 +648,7 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
Dst(dst, stride, 3, 3) = h; // differs from vp8
|
||||
}
|
||||
|
||||
public static unsafe void D45EPredictor4x4(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void D45EPredictor4X4(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
byte a = above[0];
|
||||
byte b = above[1];
|
||||
@@ -668,9 +668,9 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
Dst(dst, stride, 3, 3) = Avg3(g, h, h);
|
||||
}
|
||||
|
||||
public static unsafe void D117Predictor4x4(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void D117Predictor4X4(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
byte I = left[0];
|
||||
byte i = left[0];
|
||||
byte j = left[1];
|
||||
byte k = left[2];
|
||||
byte x = above[-1];
|
||||
@@ -683,17 +683,17 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
Dst(dst, stride, 2, 0) = Dst(dst, stride, 3, 2) = Avg2(b, c);
|
||||
Dst(dst, stride, 3, 0) = Avg2(c, d);
|
||||
|
||||
Dst(dst, stride, 0, 3) = Avg3(k, j, I);
|
||||
Dst(dst, stride, 0, 2) = Avg3(j, I, x);
|
||||
Dst(dst, stride, 0, 1) = Dst(dst, stride, 1, 3) = Avg3(I, x, a);
|
||||
Dst(dst, stride, 0, 3) = Avg3(k, j, i);
|
||||
Dst(dst, stride, 0, 2) = Avg3(j, i, x);
|
||||
Dst(dst, stride, 0, 1) = Dst(dst, stride, 1, 3) = Avg3(i, x, a);
|
||||
Dst(dst, stride, 1, 1) = Dst(dst, stride, 2, 3) = Avg3(x, a, b);
|
||||
Dst(dst, stride, 2, 1) = Dst(dst, stride, 3, 3) = Avg3(a, b, c);
|
||||
Dst(dst, stride, 3, 1) = Avg3(b, c, d);
|
||||
}
|
||||
|
||||
public static unsafe void D135Predictor4x4(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void D135Predictor4X4(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
byte I = left[0];
|
||||
byte i = left[0];
|
||||
byte j = left[1];
|
||||
byte k = left[2];
|
||||
byte l = left[3];
|
||||
@@ -703,18 +703,18 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
byte c = above[2];
|
||||
byte d = above[3];
|
||||
Dst(dst, stride, 0, 3) = Avg3(j, k, l);
|
||||
Dst(dst, stride, 1, 3) = Dst(dst, stride, 0, 2) = Avg3(I, j, k);
|
||||
Dst(dst, stride, 2, 3) = Dst(dst, stride, 1, 2) = Dst(dst, stride, 0, 1) = Avg3(x, I, j);
|
||||
Dst(dst, stride, 1, 3) = Dst(dst, stride, 0, 2) = Avg3(i, j, k);
|
||||
Dst(dst, stride, 2, 3) = Dst(dst, stride, 1, 2) = Dst(dst, stride, 0, 1) = Avg3(x, i, j);
|
||||
Dst(dst, stride, 3, 3) =
|
||||
Dst(dst, stride, 2, 2) = Dst(dst, stride, 1, 1) = Dst(dst, stride, 0, 0) = Avg3(a, x, I);
|
||||
Dst(dst, stride, 2, 2) = Dst(dst, stride, 1, 1) = Dst(dst, stride, 0, 0) = Avg3(a, x, i);
|
||||
Dst(dst, stride, 3, 2) = Dst(dst, stride, 2, 1) = Dst(dst, stride, 1, 0) = Avg3(b, a, x);
|
||||
Dst(dst, stride, 3, 1) = Dst(dst, stride, 2, 0) = Avg3(c, b, a);
|
||||
Dst(dst, stride, 3, 0) = Avg3(d, c, b);
|
||||
}
|
||||
|
||||
public static unsafe void D153Predictor4x4(byte* dst, int stride, byte* above, byte* left)
|
||||
public static unsafe void D153Predictor4X4(byte* dst, int stride, byte* above, byte* left)
|
||||
{
|
||||
byte I = left[0];
|
||||
byte i = left[0];
|
||||
byte j = left[1];
|
||||
byte k = left[2];
|
||||
byte l = left[3];
|
||||
@@ -722,30 +722,30 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
byte a = above[0];
|
||||
byte b = above[1];
|
||||
byte c = above[2];
|
||||
Dst(dst, stride, 0, 0) = Dst(dst, stride, 2, 1) = Avg2(I, x);
|
||||
Dst(dst, stride, 0, 1) = Dst(dst, stride, 2, 2) = Avg2(j, I);
|
||||
Dst(dst, stride, 0, 0) = Dst(dst, stride, 2, 1) = Avg2(i, x);
|
||||
Dst(dst, stride, 0, 1) = Dst(dst, stride, 2, 2) = Avg2(j, i);
|
||||
Dst(dst, stride, 0, 2) = Dst(dst, stride, 2, 3) = Avg2(k, j);
|
||||
Dst(dst, stride, 0, 3) = Avg2(l, k);
|
||||
|
||||
Dst(dst, stride, 3, 0) = Avg3(a, b, c);
|
||||
Dst(dst, stride, 2, 0) = Avg3(x, a, b);
|
||||
Dst(dst, stride, 1, 0) = Dst(dst, stride, 3, 1) = Avg3(I, x, a);
|
||||
Dst(dst, stride, 1, 1) = Dst(dst, stride, 3, 2) = Avg3(j, I, x);
|
||||
Dst(dst, stride, 1, 2) = Dst(dst, stride, 3, 3) = Avg3(k, j, I);
|
||||
Dst(dst, stride, 1, 0) = Dst(dst, stride, 3, 1) = Avg3(i, x, a);
|
||||
Dst(dst, stride, 1, 1) = Dst(dst, stride, 3, 2) = Avg3(j, i, x);
|
||||
Dst(dst, stride, 1, 2) = Dst(dst, stride, 3, 3) = Avg3(k, j, i);
|
||||
Dst(dst, stride, 1, 3) = Avg3(l, k, j);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdD207Predictor8x8(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdD207Predictor8X8(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdD207Predictor(dst, stride, 8, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdD207Predictor16x16(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdD207Predictor16X16(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdD207Predictor(dst, stride, 16, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdD207Predictor32x32(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdD207Predictor32X32(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdD207Predictor(dst, stride, 32, above, left, bd);
|
||||
}
|
||||
@@ -787,17 +787,17 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
}
|
||||
}
|
||||
|
||||
public static unsafe void HighbdD63Predictor8x8(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdD63Predictor8X8(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdD63Predictor(dst, stride, 8, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdD63Predictor16x16(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdD63Predictor16X16(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdD63Predictor(dst, stride, 16, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdD63Predictor32x32(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdD63Predictor32X32(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdD63Predictor(dst, stride, 32, above, left, bd);
|
||||
}
|
||||
@@ -820,17 +820,17 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
}
|
||||
}
|
||||
|
||||
public static unsafe void HighbdD45Predictor8x8(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdD45Predictor8X8(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdD45Predictor(dst, stride, 8, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdD45Predictor16x16(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdD45Predictor16X16(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdD45Predictor(dst, stride, 16, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdD45Predictor32x32(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdD45Predictor32X32(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdD45Predictor(dst, stride, 32, above, left, bd);
|
||||
}
|
||||
@@ -856,17 +856,17 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
}
|
||||
}
|
||||
|
||||
public static unsafe void HighbdD117Predictor8x8(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdD117Predictor8X8(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdD117Predictor(dst, stride, 8, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdD117Predictor16x16(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdD117Predictor16X16(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdD117Predictor(dst, stride, 16, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdD117Predictor32x32(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdD117Predictor32X32(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdD117Predictor(dst, stride, 32, above, left, bd);
|
||||
}
|
||||
@@ -910,17 +910,17 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
}
|
||||
}
|
||||
|
||||
public static unsafe void HighbdD135Predictor8x8(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdD135Predictor8X8(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdD135Predictor(dst, stride, 8, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdD135Predictor16x16(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdD135Predictor16X16(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdD135Predictor(dst, stride, 16, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdD135Predictor32x32(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdD135Predictor32X32(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdD135Predictor(dst, stride, 32, above, left, bd);
|
||||
}
|
||||
@@ -951,17 +951,17 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
}
|
||||
}
|
||||
|
||||
public static unsafe void HighbdD153Predictor8x8(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdD153Predictor8X8(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdD153Predictor(dst, stride, 8, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdD153Predictor16x16(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdD153Predictor16X16(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdD153Predictor(dst, stride, 16, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdD153Predictor32x32(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdD153Predictor32X32(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdD153Predictor(dst, stride, 32, above, left, bd);
|
||||
}
|
||||
@@ -1004,22 +1004,22 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
}
|
||||
}
|
||||
|
||||
public static unsafe void HighbdVPredictor4x4(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdVPredictor4X4(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdVPredictor(dst, stride, 4, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdVPredictor8x8(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdVPredictor8X8(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdVPredictor(dst, stride, 8, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdVPredictor16x16(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdVPredictor16X16(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdVPredictor(dst, stride, 16, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdVPredictor32x32(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdVPredictor32X32(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdVPredictor(dst, stride, 32, above, left, bd);
|
||||
}
|
||||
@@ -1034,22 +1034,22 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
}
|
||||
}
|
||||
|
||||
public static unsafe void HighbdHPredictor4x4(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdHPredictor4X4(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdHPredictor(dst, stride, 4, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdHPredictor8x8(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdHPredictor8X8(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdHPredictor(dst, stride, 8, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdHPredictor16x16(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdHPredictor16X16(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdHPredictor(dst, stride, 16, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdHPredictor32x32(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdHPredictor32X32(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdHPredictor(dst, stride, 32, above, left, bd);
|
||||
}
|
||||
@@ -1064,22 +1064,22 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
}
|
||||
}
|
||||
|
||||
public static unsafe void HighbdTmPredictor4x4(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdTmPredictor4X4(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdTmPredictor(dst, stride, 4, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdTmPredictor8x8(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdTmPredictor8X8(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdTmPredictor(dst, stride, 8, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdTmPredictor16x16(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdTmPredictor16X16(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdTmPredictor(dst, stride, 16, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdTmPredictor32x32(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdTmPredictor32X32(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdTmPredictor(dst, stride, 32, above, left, bd);
|
||||
}
|
||||
@@ -1100,23 +1100,23 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
}
|
||||
}
|
||||
|
||||
public static unsafe void HighbdDc128Predictor4x4(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdDc128Predictor4X4(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdDc128Predictor(dst, stride, 4, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdDc128Predictor8x8(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdDc128Predictor8X8(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdDc128Predictor(dst, stride, 8, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdDc128Predictor16x16(ushort* dst, int stride, ushort* above, ushort* left,
|
||||
public static unsafe void HighbdDc128Predictor16X16(ushort* dst, int stride, ushort* above, ushort* left,
|
||||
int bd)
|
||||
{
|
||||
HighbdDc128Predictor(dst, stride, 16, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdDc128Predictor32x32(ushort* dst, int stride, ushort* above, ushort* left,
|
||||
public static unsafe void HighbdDc128Predictor32X32(ushort* dst, int stride, ushort* above, ushort* left,
|
||||
int bd)
|
||||
{
|
||||
HighbdDc128Predictor(dst, stride, 32, above, left, bd);
|
||||
@@ -1132,23 +1132,23 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
}
|
||||
}
|
||||
|
||||
public static unsafe void HighbdDcLeftPredictor4x4(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdDcLeftPredictor4X4(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdDcLeftPredictor(dst, stride, 4, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdDcLeftPredictor8x8(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdDcLeftPredictor8X8(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdDcLeftPredictor(dst, stride, 8, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdDcLeftPredictor16x16(ushort* dst, int stride, ushort* above, ushort* left,
|
||||
public static unsafe void HighbdDcLeftPredictor16X16(ushort* dst, int stride, ushort* above, ushort* left,
|
||||
int bd)
|
||||
{
|
||||
HighbdDcLeftPredictor(dst, stride, 16, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdDcLeftPredictor32x32(ushort* dst, int stride, ushort* above, ushort* left,
|
||||
public static unsafe void HighbdDcLeftPredictor32X32(ushort* dst, int stride, ushort* above, ushort* left,
|
||||
int bd)
|
||||
{
|
||||
HighbdDcLeftPredictor(dst, stride, 32, above, left, bd);
|
||||
@@ -1157,14 +1157,14 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
private static unsafe void HighbdDcLeftPredictor(ushort* dst, int stride, int bs, ushort* above, ushort* left,
|
||||
int bd)
|
||||
{
|
||||
int expectedDc, sum = 0;
|
||||
int sum = 0;
|
||||
|
||||
for (int i = 0; i < bs; i++)
|
||||
{
|
||||
sum += left[i];
|
||||
}
|
||||
|
||||
expectedDc = (sum + (bs >> 1)) / bs;
|
||||
int expectedDc = (sum + (bs >> 1)) / bs;
|
||||
|
||||
for (int r = 0; r < bs; r++)
|
||||
{
|
||||
@@ -1173,23 +1173,23 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
}
|
||||
}
|
||||
|
||||
public static unsafe void HighbdDcTopPredictor4x4(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdDcTopPredictor4X4(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdDcTopPredictor(dst, stride, 4, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdDcTopPredictor8x8(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdDcTopPredictor8X8(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdDcTopPredictor(dst, stride, 8, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdDcTopPredictor16x16(ushort* dst, int stride, ushort* above, ushort* left,
|
||||
public static unsafe void HighbdDcTopPredictor16X16(ushort* dst, int stride, ushort* above, ushort* left,
|
||||
int bd)
|
||||
{
|
||||
HighbdDcTopPredictor(dst, stride, 16, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdDcTopPredictor32x32(ushort* dst, int stride, ushort* above, ushort* left,
|
||||
public static unsafe void HighbdDcTopPredictor32X32(ushort* dst, int stride, ushort* above, ushort* left,
|
||||
int bd)
|
||||
{
|
||||
HighbdDcTopPredictor(dst, stride, 32, above, left, bd);
|
||||
@@ -1198,14 +1198,14 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
private static unsafe void HighbdDcTopPredictor(ushort* dst, int stride, int bs, ushort* above, ushort* left,
|
||||
int bd)
|
||||
{
|
||||
int expectedDc, sum = 0;
|
||||
int sum = 0;
|
||||
|
||||
for (int i = 0; i < bs; i++)
|
||||
{
|
||||
sum += above[i];
|
||||
}
|
||||
|
||||
expectedDc = (sum + (bs >> 1)) / bs;
|
||||
int expectedDc = (sum + (bs >> 1)) / bs;
|
||||
|
||||
for (int r = 0; r < bs; r++)
|
||||
{
|
||||
@@ -1214,22 +1214,22 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
}
|
||||
}
|
||||
|
||||
public static unsafe void HighbdDcPredictor4x4(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdDcPredictor4X4(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdDcPredictor(dst, stride, 4, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdDcPredictor8x8(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdDcPredictor8X8(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdDcPredictor(dst, stride, 8, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdDcPredictor16x16(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdDcPredictor16X16(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdDcPredictor(dst, stride, 16, above, left, bd);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdDcPredictor32x32(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdDcPredictor32X32(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
HighbdDcPredictor(dst, stride, 32, above, left, bd);
|
||||
}
|
||||
@@ -1237,7 +1237,7 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
private static unsafe void HighbdDcPredictor(ushort* dst, int stride, int bs, ushort* above, ushort* left,
|
||||
int bd)
|
||||
{
|
||||
int expectedDc, sum = 0;
|
||||
int sum = 0;
|
||||
int count = 2 * bs;
|
||||
|
||||
for (int i = 0; i < bs; i++)
|
||||
@@ -1246,7 +1246,7 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
sum += left[i];
|
||||
}
|
||||
|
||||
expectedDc = (sum + (count >> 1)) / count;
|
||||
int expectedDc = (sum + (count >> 1)) / count;
|
||||
|
||||
for (int r = 0; r < bs; r++)
|
||||
{
|
||||
@@ -1255,23 +1255,23 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
}
|
||||
}
|
||||
|
||||
public static unsafe void HighbdD207Predictor4x4(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdD207Predictor4X4(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
ushort I = left[0];
|
||||
ushort i = left[0];
|
||||
ushort j = left[1];
|
||||
ushort k = left[2];
|
||||
ushort l = left[3];
|
||||
Dst(dst, stride, 0, 0) = Avg2(I, j);
|
||||
Dst(dst, stride, 0, 0) = Avg2(i, j);
|
||||
Dst(dst, stride, 2, 0) = Dst(dst, stride, 0, 1) = Avg2(j, k);
|
||||
Dst(dst, stride, 2, 1) = Dst(dst, stride, 0, 2) = Avg2(k, l);
|
||||
Dst(dst, stride, 1, 0) = Avg3(I, j, k);
|
||||
Dst(dst, stride, 1, 0) = Avg3(i, j, k);
|
||||
Dst(dst, stride, 3, 0) = Dst(dst, stride, 1, 1) = Avg3(j, k, l);
|
||||
Dst(dst, stride, 3, 1) = Dst(dst, stride, 1, 2) = Avg3(k, l, l);
|
||||
Dst(dst, stride, 3, 2) = Dst(dst, stride, 2, 2) = Dst(dst, stride, 0, 3) =
|
||||
Dst(dst, stride, 1, 3) = Dst(dst, stride, 2, 3) = Dst(dst, stride, 3, 3) = l;
|
||||
}
|
||||
|
||||
public static unsafe void HighbdD63Predictor4x4(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdD63Predictor4X4(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
ushort a = above[0];
|
||||
ushort b = above[1];
|
||||
@@ -1293,7 +1293,7 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
Dst(dst, stride, 3, 3) = Avg3(e, f, g); // Differs from vp8
|
||||
}
|
||||
|
||||
public static unsafe void HighbdD45Predictor4x4(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdD45Predictor4X4(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
ushort a = above[0];
|
||||
ushort b = above[1];
|
||||
@@ -1313,9 +1313,9 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
Dst(dst, stride, 3, 3) = h; // Differs from vp8
|
||||
}
|
||||
|
||||
public static unsafe void HighbdD117Predictor4x4(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdD117Predictor4X4(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
ushort I = left[0];
|
||||
ushort i = left[0];
|
||||
ushort j = left[1];
|
||||
ushort k = left[2];
|
||||
ushort x = above[-1];
|
||||
@@ -1328,17 +1328,17 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
Dst(dst, stride, 2, 0) = Dst(dst, stride, 3, 2) = Avg2(b, c);
|
||||
Dst(dst, stride, 3, 0) = Avg2(c, d);
|
||||
|
||||
Dst(dst, stride, 0, 3) = Avg3(k, j, I);
|
||||
Dst(dst, stride, 0, 2) = Avg3(j, I, x);
|
||||
Dst(dst, stride, 0, 1) = Dst(dst, stride, 1, 3) = Avg3(I, x, a);
|
||||
Dst(dst, stride, 0, 3) = Avg3(k, j, i);
|
||||
Dst(dst, stride, 0, 2) = Avg3(j, i, x);
|
||||
Dst(dst, stride, 0, 1) = Dst(dst, stride, 1, 3) = Avg3(i, x, a);
|
||||
Dst(dst, stride, 1, 1) = Dst(dst, stride, 2, 3) = Avg3(x, a, b);
|
||||
Dst(dst, stride, 2, 1) = Dst(dst, stride, 3, 3) = Avg3(a, b, c);
|
||||
Dst(dst, stride, 3, 1) = Avg3(b, c, d);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdD135Predictor4x4(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdD135Predictor4X4(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
ushort I = left[0];
|
||||
ushort i = left[0];
|
||||
ushort j = left[1];
|
||||
ushort k = left[2];
|
||||
ushort l = left[3];
|
||||
@@ -1348,18 +1348,18 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
ushort c = above[2];
|
||||
ushort d = above[3];
|
||||
Dst(dst, stride, 0, 3) = Avg3(j, k, l);
|
||||
Dst(dst, stride, 1, 3) = Dst(dst, stride, 0, 2) = Avg3(I, j, k);
|
||||
Dst(dst, stride, 2, 3) = Dst(dst, stride, 1, 2) = Dst(dst, stride, 0, 1) = Avg3(x, I, j);
|
||||
Dst(dst, stride, 1, 3) = Dst(dst, stride, 0, 2) = Avg3(i, j, k);
|
||||
Dst(dst, stride, 2, 3) = Dst(dst, stride, 1, 2) = Dst(dst, stride, 0, 1) = Avg3(x, i, j);
|
||||
Dst(dst, stride, 3, 3) =
|
||||
Dst(dst, stride, 2, 2) = Dst(dst, stride, 1, 1) = Dst(dst, stride, 0, 0) = Avg3(a, x, I);
|
||||
Dst(dst, stride, 2, 2) = Dst(dst, stride, 1, 1) = Dst(dst, stride, 0, 0) = Avg3(a, x, i);
|
||||
Dst(dst, stride, 3, 2) = Dst(dst, stride, 2, 1) = Dst(dst, stride, 1, 0) = Avg3(b, a, x);
|
||||
Dst(dst, stride, 3, 1) = Dst(dst, stride, 2, 0) = Avg3(c, b, a);
|
||||
Dst(dst, stride, 3, 0) = Avg3(d, c, b);
|
||||
}
|
||||
|
||||
public static unsafe void HighbdD153Predictor4x4(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
public static unsafe void HighbdD153Predictor4X4(ushort* dst, int stride, ushort* above, ushort* left, int bd)
|
||||
{
|
||||
ushort I = left[0];
|
||||
ushort i = left[0];
|
||||
ushort j = left[1];
|
||||
ushort k = left[2];
|
||||
ushort l = left[3];
|
||||
@@ -1368,17 +1368,17 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Dsp
|
||||
ushort b = above[1];
|
||||
ushort c = above[2];
|
||||
|
||||
Dst(dst, stride, 0, 0) = Dst(dst, stride, 2, 1) = Avg2(I, x);
|
||||
Dst(dst, stride, 0, 1) = Dst(dst, stride, 2, 2) = Avg2(j, I);
|
||||
Dst(dst, stride, 0, 0) = Dst(dst, stride, 2, 1) = Avg2(i, x);
|
||||
Dst(dst, stride, 0, 1) = Dst(dst, stride, 2, 2) = Avg2(j, i);
|
||||
Dst(dst, stride, 0, 2) = Dst(dst, stride, 2, 3) = Avg2(k, j);
|
||||
Dst(dst, stride, 0, 3) = Avg2(l, k);
|
||||
|
||||
Dst(dst, stride, 3, 0) = Avg3(a, b, c);
|
||||
Dst(dst, stride, 2, 0) = Avg3(x, a, b);
|
||||
Dst(dst, stride, 1, 0) = Dst(dst, stride, 3, 1) = Avg3(I, x, a);
|
||||
Dst(dst, stride, 1, 1) = Dst(dst, stride, 3, 2) = Avg3(j, I, x);
|
||||
Dst(dst, stride, 1, 2) = Dst(dst, stride, 3, 3) = Avg3(k, j, I);
|
||||
Dst(dst, stride, 1, 0) = Dst(dst, stride, 3, 1) = Avg3(i, x, a);
|
||||
Dst(dst, stride, 1, 1) = Dst(dst, stride, 3, 2) = Avg3(j, i, x);
|
||||
Dst(dst, stride, 1, 2) = Dst(dst, stride, 3, 3) = Avg3(k, j, i);
|
||||
Dst(dst, stride, 1, 3) = Avg3(l, k, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user