[FFmpeg-devel] [PATCH] dsputil: add bswap16_buf()
Måns Rullgård
mans
Fri Mar 11 13:08:45 CET 2011
Alexander Strange <astrange at ithinksw.com> writes:
> On Mar 10, 2011, at 9:05 PM, M?ns Rullg?rd wrote:
>
>> Michael Niedermayer <michaelni at gmx.at> writes:
>>
>>> On Fri, Mar 11, 2011 at 01:55:19AM +0100, Luca Barbato wrote:
>>>> On 03/11/2011 01:12 AM, Mans Rullgard wrote:
>>>>> There several places where a buffer is byte-swapped in 16-bit units.
>>>>> This allows them to share code which can be optimised for various
>>>>> architectures.
>>>>
>>>> Looks ok, which alignment constraint for it?
>>>
>>> 16
>>
>> You just made that up out of thin air.
>
> Do you need to bswap16_buf part of a malloced buffer or the entire
> thing? 16 is the natural alignment for the start of av_malloc and
> therefore is obvious for start-aligned buffer operations. And it's
> natural for pshufb, of course.
I don't know what's required since I haven't scoured the entire code for
byte-swapping loops.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list