[FFmpeg-devel] [PATCH] x86: vc1dsp: Convert vc1_inv_trans_*_dc to NASM format
James Almer
jamrial at gmail.com
Sun Jan 31 22:30:34 CET 2016
On 1/31/2016 6:18 PM, James Almer wrote:
> On 1/31/2016 4:48 PM, Timothy Gu wrote:
>> +; ff_vc1_inv_trans_?x?_dc_mmxext(uint8_t *dest, int linesize, int16_t *block)
>> +INIT_MMX mmxext
>> +cglobal vc1_inv_trans_4x4_dc, 3,4,0, dest, linesize, block
>> + movsx r3d, WORD [blockq]
>
> Can this value be negative? Because you're using it as an argument
> for lea using native size after movsx sign extended the value to 32
> bits, which means that on x86_64 the upper bits of the register will
> be zeroed.
>
> If it can you'll have to use blockq/r3q everywhere, and if it can't
> then use movzx and shr.
Or not... Seems to work as is and using movzx breaks it.
>
>> + mov blockd, r3d ; dc
>> + shl blockd, 4 ; 16 * dc
>> + lea blockd, [blockq+r3+4] ; 17 * dc + 4
>> + sar blockd, 3 ; >> 3
>> + mov r3d, blockd ; dc
>> + shl blockd, 4 ; 16 * dc
>> + lea blockd, [blockq+r3+64] ; 17 * dc + 64
>> + sar blockd, 7 ; >> 7
>
More information about the ffmpeg-devel
mailing list