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

lvqcl lvqcl.mail at gmail.com
Thu Dec 31 03:36:53 PST 2015

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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: word_64bit.patch
Type: application/octet-stream
Size: 34267 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20151231/396ac627/attachment-0001.obj 

More information about the flac-dev mailing list