From 997c24ae0c45a40e055f9c9d90debc7c13782350 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Apr 2018 20:19:07 +0200 Subject: [PATCH] Make FLAC, zlib and LZMA support in libchdr optional --- Makefile.common | 31 ++- griffin/griffin.c | 13 ++ libretro-common/formats/libchdr/libchdr_chd.c | 203 +++++------------- .../formats/libchdr/libchdr_flac_codec.c | 163 ++++++++++++++ .../formats/libchdr/libchdr_lzma.c | 3 +- .../formats/libchdr/libchdr_zlib.c | 2 - libretro-common/include/libchdr/flac.h | 18 ++ .../include/libchdr/libchdr_zlib.h | 1 + qb/config.params.sh | 1 + 9 files changed, 265 insertions(+), 170 deletions(-) create mode 100644 libretro-common/formats/libchdr/libchdr_flac_codec.c diff --git a/Makefile.common b/Makefile.common index ef5f2b7a4d..81f850788e 100644 --- a/Makefile.common +++ b/Makefile.common @@ -1495,32 +1495,27 @@ ifeq ($(HAVE_ZLIB), 1) endif endif -ifeq ($(HAVE_FLAC), 1) -ifeq ($(HAVE_7ZIP), 1) -ifeq ($(HAVE_ZLIB), 1) - HAVE_CHD = 1 - DEFINES += -DHAVE_CHD -DWANT_SUBCODE -DWANT_RAW_DATA_SECTOR +ifeq ($(HAVE_CHD), 1) CFLAGS += -I$(LIBRETRO_COMM_DIR)/formats/libchdr + DEFINES += -DHAVE_CHD -DWANT_SUBCODE -DWANT_RAW_DATA_SECTOR OBJ += $(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_bitstream.o \ $(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_cdrom.o \ $(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_chd.o \ - $(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_flac.o \ $(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_huffman.o \ $(LIBRETRO_COMM_DIR)/streams/chd_stream.o -endif -endif -endif + + ifeq ($(HAVE_FLAC), 1) + OBJ += $(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_flac.o \ + $(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_flac_codec.o + endif -ifeq ($(HAVE_CHD), 1) -ifeq ($(HAVE_7ZIP), 1) - OBJ += $(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_lzma.o -endif -endif + ifeq ($(HAVE_7ZIP), 1) + OBJ += $(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_lzma.o + endif -ifeq ($(HAVE_CHD), 1) -ifeq ($(HAVE_ZLIB), 1) - OBJ += $(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_zlib.o -endif + ifeq ($(HAVE_ZLIB), 1) + OBJ += $(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_zlib.o + endif endif ifeq ($(HAVE_RTGA), 1) diff --git a/griffin/griffin.c b/griffin/griffin.c index e71cb8753f..6bab9b6631 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -1310,7 +1310,20 @@ DEPENDENCIES #include "../libretro-common/formats/libchdr/libchdr_bitstream.c" #include "../libretro-common/formats/libchdr/libchdr_cdrom.c" #include "../libretro-common/formats/libchdr/libchdr_chd.c" + +#ifdef HAVE_FLAC #include "../libretro-common/formats/libchdr/libchdr_flac.c" +#include "../libretro-common/formats/libchdr/libchdr_flac_codec.c" +#endif + +#ifdef HAVE_ZLIB +#include "../libretro-common/formats/libchdr/libchdr_zlib.c" +#endif + +#ifdef HAVE_7ZIP +#include "../libretro-common/formats/libchdr/libchdr_lzma.c" +#endif + #include "../libretro-common/formats/libchdr/libchdr_huffman.c" #include "../libretro-common/streams/chd_stream.c" diff --git a/libretro-common/formats/libchdr/libchdr_chd.c b/libretro-common/formats/libchdr/libchdr_chd.c index 3712c926dd..d50091d0a4 100644 --- a/libretro-common/formats/libchdr/libchdr_chd.c +++ b/libretro-common/formats/libchdr/libchdr_chd.c @@ -45,11 +45,16 @@ #include #include #include -#include #include + +#ifdef HAVE_FLAC +#include +#endif + #ifdef HAVE_7ZIP #include #endif + #ifdef HAVE_ZLIB #include #endif @@ -185,18 +190,6 @@ struct _metadata_entry UINT8 flags; /* flag bits */ }; -/* codec-private data for the CDFL codec */ -typedef struct _cdfl_codec_data cdfl_codec_data; -struct _cdfl_codec_data { - /* internal state */ - int swap_endian; - flac_decoder decoder; -#ifdef WANT_SUBCODE - zlib_codec_data subcode_decompressor; -#endif - uint8_t* buffer; -}; - /* internal representation of an open CHD file */ struct _chd_file { @@ -228,7 +221,9 @@ struct _chd_file #ifdef HAVE_7ZIP cdlz_codec_data cdlz_codec_data; /* cdlz codec data */ #endif +#ifdef HAVE_FLAC cdfl_codec_data cdfl_codec_data; /* cdfl codec data */ +#endif #ifdef NEED_CACHE_HUNK UINT32 maxhunk; /* maximum hunk accessed */ @@ -263,118 +258,6 @@ static chd_error map_read(chd_file *chd); /* metadata management */ static chd_error metadata_find_entry(chd_file *chd, UINT32 metatag, UINT32 metaindex, metadata_entry *metaentry); - -/* cdfl compression codec */ -static chd_error cdfl_codec_init(void* codec, uint32_t hunkbytes); -static void cdfl_codec_free(void* codec); -static chd_error cdfl_codec_decompress(void *codec, const uint8_t *src, uint32_t complen, uint8_t *dest, uint32_t destlen); - -/*************************************************************************** - * CD FLAC DECOMPRESSOR - *************************************************************************** - */ - -/*------------------------------------------------------ - * cdfl_codec_blocksize - return the optimal block size - *------------------------------------------------------ - */ - -static uint32_t cdfl_codec_blocksize(uint32_t bytes) -{ - /* determine FLAC block size, which must be 16-65535 - * clamp to 2k since that's supposed to be the sweet spot */ - uint32_t hunkbytes = bytes / 4; - while (hunkbytes > 2048) - hunkbytes /= 2; - return hunkbytes; -} - -chd_error cdfl_codec_init(void *codec, uint32_t hunkbytes) -{ -#ifdef WANT_SUBCODE - chd_error ret; -#endif - uint16_t native_endian = 0; - cdfl_codec_data *cdfl = (cdfl_codec_data*)codec; - - /* make sure the CHD's hunk size is an even multiple of the frame size */ - if (hunkbytes % CD_FRAME_SIZE != 0) - return CHDERR_CODEC_ERROR; - - cdfl->buffer = (uint8_t*)malloc(sizeof(uint8_t) * hunkbytes); - if (cdfl->buffer == NULL) - return CHDERR_OUT_OF_MEMORY; - - /* determine whether we want native or swapped samples */ - *(uint8_t *)(&native_endian) = 1; - cdfl->swap_endian = (native_endian & 1); - -#ifdef WANT_SUBCODE - /* init zlib inflater */ - ret = zlib_codec_init(&cdfl->subcode_decompressor, (hunkbytes / CD_FRAME_SIZE) * CD_MAX_SECTOR_DATA); - if (ret != CHDERR_NONE) - return ret; -#endif - - /* flac decoder init */ - flac_decoder_init(&cdfl->decoder); - if (cdfl->decoder.decoder == NULL) - return CHDERR_OUT_OF_MEMORY; - - return CHDERR_NONE; -} - -void cdfl_codec_free(void *codec) -{ - cdfl_codec_data *cdfl = (cdfl_codec_data*)codec; - flac_decoder_free(&cdfl->decoder); -#ifdef WANT_SUBCODE - zlib_codec_free(&cdfl->subcode_decompressor); -#endif - if (cdfl->buffer) - free(cdfl->buffer); -} - -chd_error cdfl_codec_decompress(void *codec, const uint8_t *src, uint32_t complen, uint8_t *dest, uint32_t destlen) -{ - uint32_t framenum; - uint8_t *buffer; -#ifdef WANT_SUBCODE - uint32_t offset; - chd_error ret; -#endif - cdfl_codec_data *cdfl = (cdfl_codec_data*)codec; - - /* reset and decode */ - uint32_t frames = destlen / CD_FRAME_SIZE; - - if (!flac_decoder_reset(&cdfl->decoder, 44100, 2, cdfl_codec_blocksize(frames * CD_MAX_SECTOR_DATA), src, complen)) - return CHDERR_DECOMPRESSION_ERROR; - buffer = &cdfl->buffer[0]; - if (!flac_decoder_decode_interleaved(&cdfl->decoder, (int16_t *)(buffer), frames * CD_MAX_SECTOR_DATA/4, cdfl->swap_endian)) - return CHDERR_DECOMPRESSION_ERROR; - -#ifdef WANT_SUBCODE - /* inflate the subcode data */ - offset = flac_decoder_finish(&cdfl->decoder); - ret = zlib_codec_decompress(&cdfl->subcode_decompressor, src + offset, complen - offset, &cdfl->buffer[frames * CD_MAX_SECTOR_DATA], frames * CD_MAX_SUBCODE_DATA); - if (ret != CHDERR_NONE) - return ret; -#else - flac_decoder_finish(&cdfl->decoder); -#endif - - /* reassemble the data */ - for (framenum = 0; framenum < frames; framenum++) - { - memcpy(&dest[framenum * CD_FRAME_SIZE], &cdfl->buffer[framenum * CD_MAX_SECTOR_DATA], CD_MAX_SECTOR_DATA); -#ifdef WANT_SUBCODE - memcpy(&dest[framenum * CD_FRAME_SIZE + CD_MAX_SECTOR_DATA], &cdfl->buffer[frames * CD_MAX_SECTOR_DATA + framenum * CD_MAX_SUBCODE_DATA], CD_MAX_SUBCODE_DATA); -#endif - } - - return CHDERR_NONE; -} /*************************************************************************** CODEC INTERFACES ***************************************************************************/ @@ -447,6 +330,7 @@ static const codec_interface codec_interfaces[] = }, #endif +#ifdef HAVE_FLAC /* V5 CD flac compression */ { CHD_CODEC_CD_FLAC, @@ -457,6 +341,7 @@ static const codec_interface codec_interfaces[] = cdfl_codec_decompress, NULL }, +#endif }; /*************************************************************************** @@ -967,12 +852,14 @@ chd_error chd_open_file(RFILE *file, int mode, chd_file *parent, chd_file **chd) if (intfnum == ARRAY_SIZE(codec_interfaces)) EARLY_EXIT(err = CHDERR_UNSUPPORTED_FORMAT); +#ifdef HAVE_ZLIB /* initialize the codec */ if (newchd->codecintf[0]->init != NULL) - { - err = (*newchd->codecintf[0]->init)(&newchd->zlib_codec_data, newchd->header.hunkbytes); - (void)err; - } + { + err = (*newchd->codecintf[0]->init)(&newchd->zlib_codec_data, newchd->header.hunkbytes); + (void)err; + } +#endif } else { @@ -998,15 +885,21 @@ chd_error chd_open_file(RFILE *file, int mode, chd_file *parent, chd_file **chd) switch (newchd->header.compression[decompnum]) { case CHD_CODEC_CD_ZLIB: +#ifdef HAVE_ZLIB codec = &newchd->cdzl_codec_data; +#endif break; case CHD_CODEC_CD_LZMA: +#ifdef HAVE_7ZIP codec = &newchd->cdlz_codec_data; +#endif break; case CHD_CODEC_CD_FLAC: +#ifdef HAVE_FLAC codec = &newchd->cdfl_codec_data; +#endif break; } if (codec != NULL) @@ -1122,35 +1015,41 @@ void chd_close(chd_file *chd) /* deinit the codec */ if (chd->header.version < 5) { +#ifdef HAVE_ZLIB if (chd->codecintf[0] != NULL && chd->codecintf[0]->free != NULL) (*chd->codecintf[0]->free)(&chd->zlib_codec_data); +#endif } else { int i; /* Free the codecs */ for (i = 0 ; i < 4 ; i++) - { - void* codec = NULL; - switch (chd->codecintf[i]->compression) - { - case CHD_CODEC_CD_LZMA: - codec = &chd->cdlz_codec_data; - break; + { + void* codec = NULL; + switch (chd->codecintf[i]->compression) + { + case CHD_CODEC_CD_LZMA: +#ifdef HAVE_7ZIP + codec = &chd->cdlz_codec_data; +#endif + break; - case CHD_CODEC_CD_ZLIB: - codec = &chd->cdzl_codec_data; - break; + case CHD_CODEC_CD_ZLIB: +#ifdef HAVE_ZLIB + codec = &chd->cdzl_codec_data; +#endif + break; - case CHD_CODEC_CD_FLAC: - codec = &chd->cdfl_codec_data; - break; - } - if (codec) - { - (*chd->codecintf[i]->free)(codec); - } - } + case CHD_CODEC_CD_FLAC: +#ifdef HAVE_FLAC + codec = &chd->cdfl_codec_data; +#endif + break; + } + if (codec) + (*chd->codecintf[i]->free)(codec); + } /* Free the raw map */ if (chd->header.rawmap != NULL) @@ -1686,6 +1585,7 @@ static chd_error hunk_read_into_memory(chd_file *chd, UINT32 hunknum, UINT8 *des if (bytes == NULL) return CHDERR_READ_ERROR; +#ifdef HAVE_ZLIB /* now decompress using the codec */ err = CHDERR_NONE; codec = &chd->zlib_codec_data; @@ -1693,6 +1593,7 @@ static chd_error hunk_read_into_memory(chd_file *chd, UINT32 hunknum, UINT8 *des err = (*chd->codecintf[0]->decompress)(codec, chd->compressed, entry->length, dest, chd->header.hunkbytes); if (err != CHDERR_NONE) return err; +#endif } break; @@ -1774,15 +1675,21 @@ static chd_error hunk_read_into_memory(chd_file *chd, UINT32 hunknum, UINT8 *des switch (chd->codecintf[rawmap[0]]->compression) { case CHD_CODEC_CD_LZMA: +#ifdef HAVE_7ZIP codec = &chd->cdlz_codec_data; +#endif break; case CHD_CODEC_CD_ZLIB: +#ifdef HAVE_ZLIB codec = &chd->cdzl_codec_data; +#endif break; case CHD_CODEC_CD_FLAC: +#ifdef HAVE_FLAC codec = &chd->cdfl_codec_data; +#endif break; } if (codec==NULL) diff --git a/libretro-common/formats/libchdr/libchdr_flac_codec.c b/libretro-common/formats/libchdr/libchdr_flac_codec.c new file mode 100644 index 0000000000..83abadd3f2 --- /dev/null +++ b/libretro-common/formats/libchdr/libchdr_flac_codec.c @@ -0,0 +1,163 @@ +/*************************************************************************** + + libchdr_flac_codec.c + + MAME Compressed Hunks of Data file format + +**************************************************************************** + + Copyright Aaron Giles + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + * Neither the name 'MAME' nor the names of its contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +***************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#define TRUE 1 +#define FALSE 0 + +/*************************************************************************** + * CD FLAC DECOMPRESSOR + *************************************************************************** + */ + +/*------------------------------------------------------ + * cdfl_codec_blocksize - return the optimal block size + *------------------------------------------------------ + */ + +static uint32_t cdfl_codec_blocksize(uint32_t bytes) +{ + /* determine FLAC block size, which must be 16-65535 + * clamp to 2k since that's supposed to be the sweet spot */ + uint32_t hunkbytes = bytes / 4; + while (hunkbytes > 2048) + hunkbytes /= 2; + return hunkbytes; +} + +chd_error cdfl_codec_init(void *codec, uint32_t hunkbytes) +{ +#ifdef WANT_SUBCODE + chd_error ret; +#endif + uint16_t native_endian = 0; + cdfl_codec_data *cdfl = (cdfl_codec_data*)codec; + + /* make sure the CHD's hunk size is an even multiple of the frame size */ + if (hunkbytes % CD_FRAME_SIZE != 0) + return CHDERR_CODEC_ERROR; + + cdfl->buffer = (uint8_t*)malloc(sizeof(uint8_t) * hunkbytes); + if (cdfl->buffer == NULL) + return CHDERR_OUT_OF_MEMORY; + + /* determine whether we want native or swapped samples */ + *(uint8_t *)(&native_endian) = 1; + cdfl->swap_endian = (native_endian & 1); + +#ifdef WANT_SUBCODE + /* init zlib inflater */ + ret = zlib_codec_init(&cdfl->subcode_decompressor, (hunkbytes / CD_FRAME_SIZE) * CD_MAX_SECTOR_DATA); + if (ret != CHDERR_NONE) + return ret; +#endif + + /* flac decoder init */ + flac_decoder_init(&cdfl->decoder); + if (cdfl->decoder.decoder == NULL) + return CHDERR_OUT_OF_MEMORY; + + return CHDERR_NONE; +} + +void cdfl_codec_free(void *codec) +{ + cdfl_codec_data *cdfl = (cdfl_codec_data*)codec; + flac_decoder_free(&cdfl->decoder); +#ifdef WANT_SUBCODE + zlib_codec_free(&cdfl->subcode_decompressor); +#endif + if (cdfl->buffer) + free(cdfl->buffer); +} + +chd_error cdfl_codec_decompress(void *codec, const uint8_t *src, uint32_t complen, uint8_t *dest, uint32_t destlen) +{ + uint32_t framenum; + uint8_t *buffer; +#ifdef WANT_SUBCODE + uint32_t offset; + chd_error ret; +#endif + cdfl_codec_data *cdfl = (cdfl_codec_data*)codec; + + /* reset and decode */ + uint32_t frames = destlen / CD_FRAME_SIZE; + + if (!flac_decoder_reset(&cdfl->decoder, 44100, 2, cdfl_codec_blocksize(frames * CD_MAX_SECTOR_DATA), src, complen)) + return CHDERR_DECOMPRESSION_ERROR; + buffer = &cdfl->buffer[0]; + if (!flac_decoder_decode_interleaved(&cdfl->decoder, (int16_t *)(buffer), frames * CD_MAX_SECTOR_DATA/4, cdfl->swap_endian)) + return CHDERR_DECOMPRESSION_ERROR; + +#ifdef WANT_SUBCODE + /* inflate the subcode data */ + offset = flac_decoder_finish(&cdfl->decoder); + ret = zlib_codec_decompress(&cdfl->subcode_decompressor, src + offset, complen - offset, &cdfl->buffer[frames * CD_MAX_SECTOR_DATA], frames * CD_MAX_SUBCODE_DATA); + if (ret != CHDERR_NONE) + return ret; +#else + flac_decoder_finish(&cdfl->decoder); +#endif + + /* reassemble the data */ + for (framenum = 0; framenum < frames; framenum++) + { + memcpy(&dest[framenum * CD_FRAME_SIZE], &cdfl->buffer[framenum * CD_MAX_SECTOR_DATA], CD_MAX_SECTOR_DATA); +#ifdef WANT_SUBCODE + memcpy(&dest[framenum * CD_FRAME_SIZE + CD_MAX_SECTOR_DATA], &cdfl->buffer[frames * CD_MAX_SECTOR_DATA + framenum * CD_MAX_SUBCODE_DATA], CD_MAX_SUBCODE_DATA); +#endif + } + + return CHDERR_NONE; +} diff --git a/libretro-common/formats/libchdr/libchdr_lzma.c b/libretro-common/formats/libchdr/libchdr_lzma.c index 284afcdd42..096c6efb0f 100644 --- a/libretro-common/formats/libchdr/libchdr_lzma.c +++ b/libretro-common/formats/libchdr/libchdr_lzma.c @@ -1,6 +1,6 @@ /*************************************************************************** - chd.c + libchdr_lzma_codec.c MAME Compressed Hunks of Data file format @@ -45,7 +45,6 @@ #include #include #include -#include #include #include #include diff --git a/libretro-common/formats/libchdr/libchdr_zlib.c b/libretro-common/formats/libchdr/libchdr_zlib.c index 6446c33fa4..44c642f81e 100644 --- a/libretro-common/formats/libchdr/libchdr_zlib.c +++ b/libretro-common/formats/libchdr/libchdr_zlib.c @@ -45,8 +45,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/libretro-common/include/libchdr/flac.h b/libretro-common/include/libchdr/flac.h index a9f84962af..2ce112d27a 100644 --- a/libretro-common/include/libchdr/flac.h +++ b/libretro-common/include/libchdr/flac.h @@ -14,6 +14,7 @@ #define __FLAC_H__ #include +#include "libchdr_zlib.h" #include "FLAC/ordinals.h" #include "FLAC/stream_decoder.h" @@ -49,4 +50,21 @@ int flac_decoder_reset(flac_decoder* decoder, uint32_t sample_rate, uint8_t nu int flac_decoder_decode_interleaved(flac_decoder* decoder, int16_t *samples, uint32_t num_samples, int swap_endian); uint32_t flac_decoder_finish(flac_decoder* decoder); +/* codec-private data for the CDFL codec */ +typedef struct _cdfl_codec_data cdfl_codec_data; +struct _cdfl_codec_data { + /* internal state */ + int swap_endian; + flac_decoder decoder; +#ifdef WANT_SUBCODE + zlib_codec_data subcode_decompressor; +#endif + uint8_t* buffer; +}; + +/* cdfl compression codec */ +chd_error cdfl_codec_init(void* codec, uint32_t hunkbytes); +void cdfl_codec_free(void* codec); +chd_error cdfl_codec_decompress(void *codec, const uint8_t *src, uint32_t complen, uint8_t *dest, uint32_t destlen); + #endif /* __FLAC_H__ */ diff --git a/libretro-common/include/libchdr/libchdr_zlib.h b/libretro-common/include/libchdr/libchdr_zlib.h index e8cac0cc54..4f3f141050 100644 --- a/libretro-common/include/libchdr/libchdr_zlib.h +++ b/libretro-common/include/libchdr/libchdr_zlib.h @@ -17,6 +17,7 @@ #include #include "coretypes.h" +#include "chd.h" #define MAX_ZLIB_ALLOCS 64 diff --git a/qb/config.params.sh b/qb/config.params.sh index 6b2aec7ffb..cc23750792 100644 --- a/qb/config.params.sh +++ b/qb/config.params.sh @@ -92,6 +92,7 @@ HAVE_NEON=no # ARM NEON optimizations HAVE_SSE=no # x86 SSE optimizations (SSE, SSE2) HAVE_FLOATHARD=no # Force hard float ABI (for ARM) HAVE_FLOATSOFTFP=no # Force soft float ABI (for ARM) +HAVE_CHD=yes # Compile in chd support HAVE_7ZIP=yes # Compile in 7z support HAVE_FLAC=auto # Compile in flac support HAVE_BUILTINFLAC=yes # Bake in flac support