Here I attach a preliminary version of a patch for precompute_partition_info_sums_() function that should accelerate encoding of 24-bit input data. 1) SSE2, SSSE3 and AVX2 versions of this function should be updated, too 2) the patch also changes if(FLAC__bitmath_ilog2(default_partition_samples) + bps + FLAC__MAX_EXTRA_RESIDUAL_BPS < 32) into (in effect) if(FLAC__bitmath_ilog2(default_partition_samples) + bps + FLAC__MAX_EXTRA_RESIDUAL_BPS <= 32) So, should the value of FLAC__MAX_EXTRA_RESIDUAL_BPS be increased (to 5? or to 6?) 3) any comments? -------------- next part -------------- A non-text attachment was scrubbed... Name: precomp_partitions.patch Type: application/octet-stream Size: 3069 bytes Desc: not available Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20150523/a55b2278/attachment.obj
Erik de Castro Lopo
2015-May-25 10:09 UTC
[flac-dev] A patch for precompute_partition_info_sums_()
lvqcl wrote:> 3) any comments?Well, it compiles and passes the test suite. However, I am concerned that that the test suite may not actually fully cover this function (maybe its time to figure out gcov again). I know we had a problem in this bit of code before. Is it possible to write a unit test for this functon? Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
Erik de Castro Lopo wrote:> Is it possible to write a unit test for this functon?I'm not a programmer, so I don't know how to make a proper unit test here. And I don't know what to test. Because...> I know we had a problem in this bit of code before....the problem was not in the code itself, but in "an assumption that the average residual magnitude will not be more than "bps" bits".
Apparently Analagous Threads
- [PATCH] stream_encoder : Improve selection of residual accumulator width
- A condition in precompute_partition_info_sums_()
- [PATCH] stream_encoder : Improve selection of residual accumulator width
- [PATCH] stream_encoder : Improve selection of residual accumulator width
- [PATCH] stream_encoder : Improve selection of residual accumulator width