summaryrefslogtreecommitdiffstats
path: root/third_party/jpeg-xl/lib/jxl/encode_test.cc
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--third_party/jpeg-xl/lib/jxl/encode_test.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/third_party/jpeg-xl/lib/jxl/encode_test.cc b/third_party/jpeg-xl/lib/jxl/encode_test.cc
index 3e519cc45d..0aef5f8aff 100644
--- a/third_party/jpeg-xl/lib/jxl/encode_test.cc
+++ b/third_party/jpeg-xl/lib/jxl/encode_test.cc
@@ -304,7 +304,7 @@ TEST(EncodeTest, CmsTest) {
EXPECT_TRUE(cms_called);
}
-TEST(EncodeTest, frame_settingsTest) {
+TEST(EncodeTest, FrameSettingsTest) {
{
JxlEncoderPtr enc = JxlEncoderMake(nullptr);
EXPECT_NE(nullptr, enc.get());
@@ -451,7 +451,7 @@ TEST(EncodeTest, frame_settingsTest) {
JxlEncoderFrameSettingsCreate(enc.get(), nullptr);
EXPECT_EQ(JXL_ENC_SUCCESS,
JxlEncoderSetFrameLossless(frame_settings, JXL_TRUE));
- VerifyFrameEncoding(63, 129, enc.get(), frame_settings, 3000, false);
+ VerifyFrameEncoding(63, 129, enc.get(), frame_settings, 3600, false);
EXPECT_EQ(true, enc->last_used_cparams.IsLossless());
}
@@ -838,20 +838,20 @@ TEST(EncodeTest, SingleFrameBoundedJXLCTest) {
bool found_jxlc = false;
bool found_jxlp = false;
// The encoder is allowed to either emit a jxlc or one or more jxlp.
- for (size_t i = 0; i < container.boxes.size(); ++i) {
- if (memcmp("jxlc", container.boxes[i].type, 4) == 0) {
+ for (const auto& box : container.boxes) {
+ if (memcmp("jxlc", box.type, 4) == 0) {
EXPECT_EQ(false, found_jxlc); // Max 1 jxlc
EXPECT_EQ(false, found_jxlp); // Can't mix jxlc and jxlp
found_jxlc = true;
}
- if (memcmp("jxlp", container.boxes[i].type, 4) == 0) {
+ if (memcmp("jxlp", box.type, 4) == 0) {
EXPECT_EQ(false, found_jxlc); // Can't mix jxlc and jxlp
found_jxlp = true;
}
// The encoder shouldn't create an unbounded box in this case, with the
// single frame it knows the full size in time, so can help make decoding
// more efficient by giving the full box size of the final box.
- EXPECT_EQ(true, container.boxes[i].data_size_given);
+ EXPECT_EQ(true, box.data_size_given);
}
EXPECT_EQ(true, found_jxlc || found_jxlp);
}
@@ -940,7 +940,7 @@ TEST(EncodeTest, CodestreamLevelVerificationTest) {
EXPECT_EQ(JXL_ENC_ERROR, JxlEncoderSetBasicInfo(enc.get(), &basic_info));
}
-TEST(EncodeTest, JXL_TRANSCODE_JPEG_TEST(JPEGReconstructionTest)) {
+JXL_TRANSCODE_JPEG_TEST(EncodeTest, JPEGReconstructionTest) {
const std::string jpeg_path = "jxl/flower/flower.png.im_q85_420.jpg";
const std::vector<uint8_t> orig = jxl::test::ReadTestData(jpeg_path);
@@ -980,7 +980,7 @@ TEST(EncodeTest, JXL_TRANSCODE_JPEG_TEST(JPEGReconstructionTest)) {
EXPECT_EQ(0, memcmp(decoded_jpeg_bytes.data(), orig.data(), orig.size()));
}
-TEST(EncodeTest, JXL_TRANSCODE_JPEG_TEST(ProgressiveJPEGReconstructionTest)) {
+JXL_TRANSCODE_JPEG_TEST(EncodeTest, ProgressiveJPEGReconstructionTest) {
const std::string jpeg_path = "jxl/flower/flower.png.im_q85_420.jpg";
const std::vector<uint8_t> orig = jxl::test::ReadTestData(jpeg_path);
@@ -1345,7 +1345,7 @@ TEST(EncodeTest, CroppedFrameTest) {
struct EncodeBoxTest : public testing::TestWithParam<std::tuple<bool, size_t>> {
};
-TEST_P(EncodeBoxTest, JXL_BOXES_TEST(BoxTest)) {
+JXL_BOXES_TEST_P(EncodeBoxTest, BoxTest) {
// Test with uncompressed boxes and with brob boxes
bool compress_box = std::get<0>(GetParam());
size_t xml_box_size = std::get<1>(GetParam());
@@ -1485,7 +1485,7 @@ JXL_GTEST_INSTANTIATE_TEST_SUITE_P(
jxl::kLargeBoxContentSizeThreshold + 77)),
nameBoxTest);
-TEST(EncodeTest, JXL_TRANSCODE_JPEG_TEST(JPEGFrameTest)) {
+JXL_TRANSCODE_JPEG_TEST(EncodeTest, JPEGFrameTest) {
TEST_LIBJPEG_SUPPORT();
for (int skip_basic_info = 0; skip_basic_info < 2; skip_basic_info++) {
for (int skip_color_encoding = 0; skip_color_encoding < 2;