[FFmpeg-devel] [PATCH 2/5] truehd: break out part of rematrix_channels into platform-specific callback.

Ben Avison bavison at riscosopen.org
Thu Mar 20 17:06:12 CET 2014


On Thu, 20 Mar 2014 15:21:04 -0000, Michael Niedermayer <michaelni at gmx.at> wrote:
> I think Christophe meant the s->channel_params[channel].coeff in
> mlp_filter_channel()
>
> I meant the matrix_coeff in rematrix_channels()

Good point, yes. But it's a very similar situation - repeated multiply-
accumulates of a (changing) array of 32-bit values by a (relatively
constant) array of values which are currently 32-bit but could fit into
signed 16-bit values. The interleaved pattern of loads and multiply-
accumulates I generate are basically the same too, as the same interlocks
apply.

> what i meant was that many of the values look like they might fit into
> 32bit arithmetic, avoiding the need for dealing with 64bit results
> that is when the coefficients are shfted down

rematrix_channels does (accum >> 14) afterwards though, so unlike
mlp_filter_channel (where sometimes the post-accumulate shift is 0) I
think you always need the upper 32 bits of the product.

>> Well, the matrices I can see look more like
>>
>> / F880, 05C0, 0000, FE40, C000, 0000 \
>> | 08E0, F8E0, 00C0, FF80, 1040, C000 |
>> | D900, C600, C000, FD00, DB00, CF00 |
>> | 0000, C000, D2B0, 0000, 0000, C000 |
>> \ C000, 0CD4, DBC4, 0000, C000, 0CD4 /
>
> Is this for a real world file or some reference file ?

That particular example was from a ripped Blu-Ray, as it happens.

Ben


More information about the ffmpeg-devel mailing list