lvqcl
2015-Apr-19 20:36 UTC
[flac-dev] "keep qlp coeff precision such that only 32-bit math is required"
Martijn van Beurden wrote:> Yes, indeed. I removed the 17-bits part because I just matched > the code in evaluate_lpc_subframe_ with the process_subframe_ > code. It appears it only makes sense that those two pieces code > are the same.A bit of history: 1) The conditional "if(subframe_bps <= 16)" was added to evaluate_lpc_subframe_() in the commit http://git.xiph.org/?p=flac.git;a=commitdiff;h=20ac2c1cac298b8c0666e191ae913f6481e79879 2) The conditional "if(subframe_bps <= 16)" was added to process_subframe_() in the commit http://git.xiph.org/?p=flac.git;a=commitdiff;h=c9c0d130c562044e641e2cab09894213c5de4d88 3) The conditional in process_subframe_() was changed to "if(subframe_bps <= 17)" in the commit http://git.xiph.org/?p=flac.git;a=commitdiff;h=df59845d04a3c43e3caea5d9838d08b9b17ba572 So the question is: why the condition in evaluate_lpc_subframe_() wasn't changed in this commit. Maybe there were some reasons, but maybe Josh forgot about it.
Martijn van Beurden
2015-Apr-20 09:03 UTC
[flac-dev] "keep qlp coeff precision such that only 32-bit math is required"
2015-04-19 22:36 GMT+02:00 lvqcl <lvqcl.mail at gmail.com>:> So the question is: why the condition in evaluate_lpc_subframe_() wasn't > changed in this commit. > Maybe there were some reasons, but maybe Josh forgot about it. >Or maybe the question is: why is this code in evaluate_lpc_subframe anyway, i.e, why is this code duplicated? If process_subframe_ sets the qlp_precision for evaluate_lpc_subframe, why should the latter ignore that? We can only speculate about this, but I think this code has been duplicated by accident, and therefore it wasn't changed as the code shouldn't have been there in the first place. P.S.: sorry for the duplicate lvqcl -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/flac-dev/attachments/20150420/77220c36/attachment.htm
lvqcl
2015-Apr-20 16:45 UTC
[flac-dev] "keep qlp coeff precision such that only 32-bit math is required"
Martijn van Beurden wrote:> Or maybe the question is: why is this code in evaluate_lpc_subframe anyway, > i.e, why is this code duplicated? If process_subframe_ sets the > qlp_precision for evaluate_lpc_subframe, why should the latter ignore that? > > We can only speculate about this, but I think this code has been duplicated > by accident, and therefore it wasn't changed as the code shouldn't have > been there in the first place.Well, the code in process_subframe_() calculates MAX value of qlp_coeff_precision, while the code in evaluate_lpc_subframe_() adjusts CURRENT qlp_coeff_precision. It's possible to move the logic from evaluate_lpc_subframe_() into process_subframe_(), see the attached patch, but I'm not sure that the code becomes much clearer after it. -------------- next part -------------- A non-text attachment was scrubbed... Name: tmp1.patch Type: application/octet-stream Size: 1518 bytes Desc: not available Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20150420/741a6064/attachment.obj