[flac-dev] [PATCH] Support 64-bit brword/bwword

Erik de Castro Lopo mle+la at mega-nerd.com
Sun Jan 3 16:49:34 PST 2016

lvqcl wrote:

> Here is the patch that allows to set FLAC__BYTES_PER_WORD to 8.
> This is disabled by default though. To test FLAC__BYTES_PER_WORD==8:
> open src/libFLAC/bitreader.c, src/libFLAC/bitwriter.c, src/test_libFLAC/bitwriter.c
> and change '#if 1' to '#if 0'.
> The value of FLAC__BYTES_PER_WORD must be the same in src/libFLAC/bitwriter.c
> and src/test_libFLAC/bitwriter.c.
> OTOH, their value in src/libFLAC/bitwriter.c and src/libFLAC/bitwriter.c
> are independent, so sizeof(brword) can be 4 while sizeof(bwword)==8.
> Please check the definition of ENDSWAP_64(x): I don't know when it's available
> on Linux, and what's the best non-intrinsic version of this function.
> Performance tests, correctness tests, comments are welcome.

Applied. Thanks.

I also add a `--enable-64-bit-words` configure option to make messing with
this easier.

Erik de Castro Lopo

More information about the flac-dev mailing list