这是indexloc提供的服务,不要输入任何密码
Skip to content

experimental/fast_lossless doesn't anon-namespace its BitWriter #1855

@nigeltao

Description

@nigeltao

I can't combine libjxl/experimental/fast_lossless and the github.com/veluca93/fpnge encoder code in the same program (e.g. to compare the two encoders' speeds), because both fjxl and fpnge declare struct BitWriter in the top-level namespace, with the same name (and both have a Write(uint32_t, uint64_t) method) but different field layout (see links below). Linking both of them leads to a crash, presumably because the fjxl code mistakenly calls the fpnge BitWriter or vice versa.

I believe one solution would be to wrap a C++ "anonymous namespace" around all of fast_lossless.cc code except for the final FastLosslessEncode function.

@veluca93

Metadata

Metadata

Assignees

No one assigned

    Labels

    unrelated to 1.0Things that need not be done before the 1.0 version milestone

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions