[FFmpeg-devel] [PATCH 4/5] wma lossless: pad coeff buffer with 0

Christophe Gisquet christophe.gisquet at gmail.com
Sun Feb 9 22:38:35 CET 2014


Hi,

2013-05-10 21:52 GMT+02:00 Michael Niedermayer <michaelni at gmx.at>:
> % 16 should be replaced by & 15, otherwise performance would
> depend on the compiler making that optimization

Replace by & (WMALL_COEFF_PAD_SIZE-1) which is the same but clearer.

> and a av_assert could be added to ensure (order & 7) == 0

This is not possible because of this line:
s->cdlms[c][i].order = (get_bits(&s->gb, 7) + 1) * 8;
so no assert

> I also suggest to keep av_log_ask_for_sample() for the order & 8

Use avpriv_request_sample as it seems to be the non-deprecated way of
doing this. My usage of it may be incorrect.

The changes passes fate-lossless-wma for win32 and win64 and CPUFLAGS
in sse2/sse4.2.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-wma-lossless-reuse-scalarproduct_and_madd_int16.patch
Type: text/x-patch
Size: 6334 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140209/06784eb1/attachment.bin>


More information about the ffmpeg-devel mailing list