[FFmpeg-devel] [PATCH 04/12] Add vector_fmul_matrix to dsputil
Måns Rullgård
mans
Sun Oct 18 23:13:20 CEST 2009
Michael Niedermayer <michaelni at gmx.at> writes:
> On Sun, Oct 18, 2009 at 09:17:48PM +0100, M?ns Rullg?rd wrote:
>> Michael Niedermayer <michaelni at gmx.at> writes:
> [...]
>> >> + }
>> >> + } else {
>> >> + for (i = 0; i < len; i++) {
>> >> + const float *m = mtx;
>> >> + for (j = 0; j < w; j++) {
>> >> + float s = 0;
>> >
>> >> + for (k = 0; k < w; k++)
>> >> + s += v[k][i] * *m++;
>> >
>> > this is quite inefficient because for(k) v[k][i] needs 2 memory reads
>> > a flat 2d array would be better
>>
>> And how will the data magically transform itself into such a layout?
>
> What is the a reason that the data is not in that layout?
> If the awnser is that some decoder is implemenetd that way then my next
> question is, would there be a disadvanatge in changing it?
Many of the audio decoders allocate the channels separately. I didn't
write them, so I can't say how difficult it would be to change that.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list