这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,8 @@ cmd_msan_install() {
["17"]="17.0.6"
["18"]="18.1.8"
["19"]="19.1.7"
["20"]="20.1.2"
["20"]="20.1.8"
["21"]="21.1.5"
)
local llvm_tag="${CLANG_VERSION}.0.0"
if [[ -n "${llvm_tag_by_version["${CLANG_VERSION}"]}" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion lib/jxl/jxl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1427,7 +1427,7 @@ TEST(JxlTest, RoundtripAnimationPatches) {
21378u);
EXPECT_EQ(ppf_out.frames.size(), t.ppf().frames.size());
// >10 with broken patches; not all patches are detected on borders.
EXPECT_SLIGHTLY_BELOW(ButteraugliDistance(t.ppf(), ppf_out), 1.85);
EXPECT_SLIGHTLY_BELOW(ButteraugliDistance(t.ppf(), ppf_out), 1.88);
}

size_t RoundtripJpeg(const std::vector<uint8_t>& jpeg_in, ThreadPool* pool) {
Expand Down
8 changes: 7 additions & 1 deletion lib/jxl/render_pipeline/stage_write.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ using hwy::HWY_NAMESPACE::Mul;
using hwy::HWY_NAMESPACE::NearestInt;
using hwy::HWY_NAMESPACE::Or;
using hwy::HWY_NAMESPACE::Rebind;
using hwy::HWY_NAMESPACE::RebindToSigned;
using hwy::HWY_NAMESPACE::RebindToUnsigned;
using hwy::HWY_NAMESPACE::ShiftLeftSame;
using hwy::HWY_NAMESPACE::ShiftRightSame;
using hwy::HWY_NAMESPACE::VFromD;
Expand Down Expand Up @@ -204,6 +206,8 @@ template <typename T>
VFromD<Rebind<T, DF>> MakeUnsigned(VFromD<DF> v, size_t x0, size_t y0,
VFromD<DF> mul) {
static_assert(std::is_unsigned<T>::value, "T must be an unsigned type");
using DI32 = RebindToSigned<DF>;
using DU32 = RebindToUnsigned<DF>;
using DU = Rebind<T, DF>;
v = Mul(v, mul);
// TODO(veluca): if constexpr with C++17
Expand All @@ -217,7 +221,9 @@ VFromD<Rebind<T, DF>> MakeUnsigned(VFromD<DF> v, size_t x0, size_t y0,
v = Add(v, dither);
}
v = Clamp(Zero(DF()), v, mul);
return DemoteTo(DU(), NearestInt(v));
VFromD<DI32> ni = NearestInt(v);
VFromD<DU32> nu = BitCast(DU32(), ni);
return DemoteTo(DU(), nu);
}

class WriteToOutputStage : public RenderPipelineStage {
Expand Down
Loading