xref: /aosp_15_r20/external/libpng/contrib/conftest/read.dfa (revision a67afe4df73cf47866eedc69947994b8ff839aba)
1*a67afe4dSAndroid Build Coastguard Worker# read.dfa
2*a67afe4dSAndroid Build Coastguard Worker#  Build time configuration of libpng
3*a67afe4dSAndroid Build Coastguard Worker#
4*a67afe4dSAndroid Build Coastguard Worker# Author: John Bowler
5*a67afe4dSAndroid Build Coastguard Worker# Copyright: (c) John Bowler, 2013
6*a67afe4dSAndroid Build Coastguard Worker# Usage rights:
7*a67afe4dSAndroid Build Coastguard Worker#  To the extent possible under law, the author has waived all copyright and
8*a67afe4dSAndroid Build Coastguard Worker#  related or neighboring rights to this work.  This work is published from:
9*a67afe4dSAndroid Build Coastguard Worker#  United States.
10*a67afe4dSAndroid Build Coastguard Worker#
11*a67afe4dSAndroid Build Coastguard Worker# Build libpng with basic read support.  This enables the lowest level libpng
12*a67afe4dSAndroid Build Coastguard Worker# read API - the one where the calling code has to use a loop to read each row.
13*a67afe4dSAndroid Build Coastguard Worker# At present this is the API used by most programs.
14*a67afe4dSAndroid Build Coastguard Worker#
15*a67afe4dSAndroid Build Coastguard Worker# Support is enabled only for those chunks and transformations that are
16*a67afe4dSAndroid Build Coastguard Worker# typically required - others can be added easily.
17*a67afe4dSAndroid Build Coastguard Worker#
18*a67afe4dSAndroid Build Coastguard Worker
19*a67afe4dSAndroid Build Coastguard Workereverything = off
20*a67afe4dSAndroid Build Coastguard Worker
21*a67afe4dSAndroid Build Coastguard Worker# The sequential read code is enabled here; the progressive code can be used
22*a67afe4dSAndroid Build Coastguard Worker# instead but there is no point enabling both.
23*a67afe4dSAndroid Build Coastguard Worker
24*a67afe4dSAndroid Build Coastguard Workeroption SEQUENTIAL_READ on
25*a67afe4dSAndroid Build Coastguard Worker
26*a67afe4dSAndroid Build Coastguard Worker# Likewise it is pointless enabling both fixed and floating point APIs.  Choose
27*a67afe4dSAndroid Build Coastguard Worker# one or the other for both the API and the internal math.
28*a67afe4dSAndroid Build Coastguard Worker
29*a67afe4dSAndroid Build Coastguard Worker#Fixed point:
30*a67afe4dSAndroid Build Coastguard Worker#option FIXED_POINT on
31*a67afe4dSAndroid Build Coastguard Worker#option FLOATING_ARITHMETIC off
32*a67afe4dSAndroid Build Coastguard Worker
33*a67afe4dSAndroid Build Coastguard Worker#Floating point:
34*a67afe4dSAndroid Build Coastguard Workeroption FLOATING_POINT on
35*a67afe4dSAndroid Build Coastguard Workeroption FLOATING_ARITHMETIC on
36*a67afe4dSAndroid Build Coastguard Worker
37*a67afe4dSAndroid Build Coastguard Worker# Basic error handling, IO and user memory support.  The latter allows the
38*a67afe4dSAndroid Build Coastguard Worker# application program to provide its own implementations of 'malloc' and 'free'.
39*a67afe4dSAndroid Build Coastguard Workeroption SETJMP on
40*a67afe4dSAndroid Build Coastguard Workeroption STDIO on
41*a67afe4dSAndroid Build Coastguard Workeroption USER_MEM on
42*a67afe4dSAndroid Build Coastguard Worker
43*a67afe4dSAndroid Build Coastguard Worker# To read the full set of PNG images correctly interlace, transparency and
44*a67afe4dSAndroid Build Coastguard Worker# 16-bit support is required.  The application can implement interlace itself,
45*a67afe4dSAndroid Build Coastguard Worker# but very few do and it's no longer possible to disable it when READ is
46*a67afe4dSAndroid Build Coastguard Worker# enabled.
47*a67afe4dSAndroid Build Coastguard Workeroption READ_tRNS on
48*a67afe4dSAndroid Build Coastguard Workeroption READ_16BIT on
49*a67afe4dSAndroid Build Coastguard Worker
50*a67afe4dSAndroid Build Coastguard Worker# Everything else is application dependent.  This file assumes the app handles
51*a67afe4dSAndroid Build Coastguard Worker# all the native PNG bit layouts, so it doesn't need any of layout change
52*a67afe4dSAndroid Build Coastguard Worker# transforms, but needs libpng to perform gamma correction.  It doesn't do any
53*a67afe4dSAndroid Build Coastguard Worker# colorspace stuff and ignores the 'significant bit' information.
54*a67afe4dSAndroid Build Coastguard Worker#
55*a67afe4dSAndroid Build Coastguard Worker# If your app always expands the image to a limited set of bit layouts you
56*a67afe4dSAndroid Build Coastguard Worker# probably want to consider using the simplified API instead of the low level
57*a67afe4dSAndroid Build Coastguard Worker# one - see png.h and s_read.dfa.
58*a67afe4dSAndroid Build Coastguard Workeroption READ_GAMMA on
59