mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2024-11-24 07:45:49 +01:00
Merge branch 'master' into DiscreteCosine
This commit is contained in:
commit
84f25a353b
@ -58,50 +58,50 @@ TEST(IntegerEncoding, GetEncoding) {
|
||||
// According to table C.2.7
|
||||
IntegerEncodedValue val = IntegerEncodedValue::CreateEncoding(1);
|
||||
EXPECT_EQ(val.GetEncoding(), ASTCC::eIntegerEncoding_JustBits);
|
||||
EXPECT_EQ(val.BaseBitLength(), 1);
|
||||
EXPECT_EQ(val.BaseBitLength(), 1U);
|
||||
|
||||
val = IntegerEncodedValue::CreateEncoding(2);
|
||||
EXPECT_EQ(val.GetEncoding(), ASTCC::eIntegerEncoding_Trit);
|
||||
EXPECT_EQ(val.BaseBitLength(), 0);
|
||||
EXPECT_EQ(val.BaseBitLength(), 0U);
|
||||
|
||||
val = IntegerEncodedValue::CreateEncoding(3);
|
||||
EXPECT_EQ(val.GetEncoding(), ASTCC::eIntegerEncoding_JustBits);
|
||||
EXPECT_EQ(val.BaseBitLength(), 2);
|
||||
EXPECT_EQ(val.BaseBitLength(), 2U);
|
||||
|
||||
val = IntegerEncodedValue::CreateEncoding(4);
|
||||
EXPECT_EQ(val.GetEncoding(), ASTCC::eIntegerEncoding_Quint);
|
||||
EXPECT_EQ(val.BaseBitLength(), 0);
|
||||
EXPECT_EQ(val.BaseBitLength(), 0U);
|
||||
|
||||
val = IntegerEncodedValue::CreateEncoding(5);
|
||||
EXPECT_EQ(val.GetEncoding(), ASTCC::eIntegerEncoding_Trit);
|
||||
EXPECT_EQ(val.BaseBitLength(), 1);
|
||||
EXPECT_EQ(val.BaseBitLength(), 1U);
|
||||
|
||||
val = IntegerEncodedValue::CreateEncoding(7);
|
||||
EXPECT_EQ(val.GetEncoding(), ASTCC::eIntegerEncoding_JustBits);
|
||||
EXPECT_EQ(val.BaseBitLength(), 3);
|
||||
EXPECT_EQ(val.BaseBitLength(), 3U);
|
||||
|
||||
val = IntegerEncodedValue::CreateEncoding(9);
|
||||
EXPECT_EQ(val.GetEncoding(), ASTCC::eIntegerEncoding_Quint);
|
||||
EXPECT_EQ(val.BaseBitLength(), 1);
|
||||
EXPECT_EQ(val.BaseBitLength(), 1U);
|
||||
|
||||
val = IntegerEncodedValue::CreateEncoding(11);
|
||||
EXPECT_EQ(val.GetEncoding(), ASTCC::eIntegerEncoding_Trit);
|
||||
EXPECT_EQ(val.BaseBitLength(), 2);
|
||||
EXPECT_EQ(val.BaseBitLength(), 2U);
|
||||
|
||||
val = IntegerEncodedValue::CreateEncoding(15);
|
||||
EXPECT_EQ(val.GetEncoding(), ASTCC::eIntegerEncoding_JustBits);
|
||||
EXPECT_EQ(val.BaseBitLength(), 4);
|
||||
EXPECT_EQ(val.BaseBitLength(), 4U);
|
||||
|
||||
val = IntegerEncodedValue::CreateEncoding(19);
|
||||
EXPECT_EQ(val.GetEncoding(), ASTCC::eIntegerEncoding_Quint);
|
||||
EXPECT_EQ(val.BaseBitLength(), 2);
|
||||
EXPECT_EQ(val.BaseBitLength(), 2U);
|
||||
|
||||
val = IntegerEncodedValue::CreateEncoding(23);
|
||||
EXPECT_EQ(val.GetEncoding(), ASTCC::eIntegerEncoding_Trit);
|
||||
EXPECT_EQ(val.BaseBitLength(), 3);
|
||||
EXPECT_EQ(val.BaseBitLength(), 3U);
|
||||
|
||||
val = IntegerEncodedValue::CreateEncoding(31);
|
||||
EXPECT_EQ(val.GetEncoding(), ASTCC::eIntegerEncoding_JustBits);
|
||||
EXPECT_EQ(val.BaseBitLength(), 5);
|
||||
EXPECT_EQ(val.BaseBitLength(), 5U);
|
||||
}
|
||||
|
||||
|
@ -74,15 +74,15 @@ TEST(Image, BilinearUpscale) {
|
||||
for(uint32 i = 0; i < img.GetWidth(); i++) {
|
||||
for(uint32 j = 0; j < img.GetHeight(); j++) {
|
||||
if(i == 0) {
|
||||
EXPECT_EQ(img(i, j).R(), i);
|
||||
EXPECT_EQ(static_cast<uint32>(img(i, j).R()), i);
|
||||
} else {
|
||||
EXPECT_EQ(img(i, j).R(), i-1);
|
||||
EXPECT_EQ(static_cast<uint32>(img(i, j).R()), i-1);
|
||||
}
|
||||
|
||||
if(j == 0) {
|
||||
EXPECT_EQ(img(i, j).G(), j);
|
||||
EXPECT_EQ(static_cast<uint32>(img(i, j).G()), j);
|
||||
} else {
|
||||
EXPECT_EQ(img(i, j).G(), j-1);
|
||||
EXPECT_EQ(static_cast<uint32>(img(i, j).G()), j-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -145,13 +145,13 @@ TEST(Image, NonuniformBilinearUpscale) {
|
||||
} else if(i == 15) {
|
||||
EXPECT_EQ(img(i, j).R(), 12);
|
||||
} else {
|
||||
EXPECT_EQ(img(i, j).R(), i-2);
|
||||
EXPECT_EQ(static_cast<uint32>(img(i, j).R()), i-2);
|
||||
}
|
||||
|
||||
if(j == 0) {
|
||||
EXPECT_EQ(img(i, j).G(), 0);
|
||||
} else {
|
||||
EXPECT_EQ(img(i, j).G(), j-1);
|
||||
EXPECT_EQ(static_cast<uint32>(img(i, j).G()), j-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -198,7 +198,7 @@ TEST(Image, BilinearUpscaleWrapped) {
|
||||
} else if(i == 15) {
|
||||
EXPECT_EQ(p.R(), 9);
|
||||
} else {
|
||||
EXPECT_EQ(p.R(), i-2);
|
||||
EXPECT_EQ(static_cast<uint32>(p.R()), i-2);
|
||||
}
|
||||
|
||||
if(j == 0) {
|
||||
@ -208,7 +208,7 @@ TEST(Image, BilinearUpscaleWrapped) {
|
||||
} else if(j == 15) {
|
||||
EXPECT_EQ(p.G(), 9);
|
||||
} else {
|
||||
EXPECT_EQ(p.G(), j-2);
|
||||
EXPECT_EQ(static_cast<uint32>(p.G()), j-2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user