Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This change updates support for target-specific code. #615

Merged
merged 1 commit into from
Oct 10, 2024

Commits on Oct 10, 2024

  1. This change updates support for target-specific code.

    The change removes the need for build configuration of target specific
    code such as SIMD enhancements.
    
    The extensible framework is based on checks in the new file named
    pngtarget.h and allows per target description of requirements and
    capabilities using macros with the prefix PNG_TARGET_.  These macros are
    interpreted by the core libpng code in a target independent way.
    
    The PNG_TARGET_ prefixed macros describe the target specific
    implementation and document how to include it.  The actual inclusion of
    the code is done, at present, by a single target independent core file
    named pngsimd.c.
    
    This approach ensures that no special configuration in the build system
    is required on any system.  It is not required on a system which is
    compiling for the build host where we can reasonably assume that the
    compiler is correctly set up.  Neither is it required for cross builds
    so long as the toolchain is correctly set up.  In this case the
    toolchain means the cross build system and any ancilliary programs it
    requires.
    
    More details of the implementation are included in the source files
    named pngtarget.h and pngsimd.c.  These files document in C comments how
    additional target specific code might be added.
    
    The changes consist primarily of movement of target specific code from
    the core libpng source files to the existing target specific
    subdirectories such as the ones named intel and arm.  This isolates the
    code into the corresponding subdirectory and eliminates the requirement
    for changes across the libpng structure.
    
    As part of this the ARM processor NEON instruction set specific palette
    to RGB code has been generalised to allow implementation in other
    architectures.  The resultant updated version of the original (ARM Ltd)
    implementation has been moved to the subdirectory named arm.
    
    In addition some selected changes have been included to allow testing
    with higher warning levels than the typical compiler defaults.
    
    Signed-off-by: John Bowler <[email protected]>
    jbowler committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    b1626b7 View commit details
    Browse the repository at this point in the history