Skip to content

Commit

Permalink
Cherry-pie topping: lint + fix includes + cherry-pick-in-forked-code
Browse files Browse the repository at this point in the history
  • Loading branch information
eustas committed Dec 6, 2024
1 parent 96212de commit b307d35
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/cms/jxl_cms.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#else // JPEGXL_ENABLE_SKCMS
#include "lcms2.h"
#include "lcms2_plugin.h"
#include "lib/jxl/base/span.h"
#include "lib/base/span.h"
#endif // JPEGXL_ENABLE_SKCMS

#define JXL_CMS_VERBOSE 0
Expand Down
9 changes: 1 addition & 8 deletions lib/extras/packed_image_convert.cc
Original file line number Diff line number Diff line change
Expand Up @@ -343,14 +343,7 @@ Status ConvertFromExternalNoSizeCheck(const uint8_t* data, size_t xsize,
size_t bytes_per_pixel = format.num_channels * bytes_per_channel;
size_t pixel_offset = c * bytes_per_channel;
// Only for uint8/16.
float scale = 1.0f;
if (format.data_type == JXL_TYPE_UINT8) {
// We will do an integer multiplication by 257 in LoadFloatRow so that a
// UINT8 value and the corresponding UINT16 value convert to the same float
scale = 1.0f / (257 * ((1ull << bits_per_sample) - 1));
} else {
scale = 1.0f / ((1ull << bits_per_sample) - 1);
}
float scale = 1.0f / ((1ull << bits_per_sample) - 1);

const bool little_endian =
format.endianness == JXL_LITTLE_ENDIAN ||
Expand Down
2 changes: 1 addition & 1 deletion tools/tracking_memory_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include <mutex>

#include "lib/base/memory_manager.h"
#include "lib/extras/memory_manager_internal.h"
#include "lib/base/status.h"
#include "lib/extras/memory_manager_internal.h"

namespace jpegxl {
namespace tools {
Expand Down

0 comments on commit b307d35

Please sign in to comment.