[FFmpeg-devel] [PATCH] mmx implementation of vc-1 inverse transformations

Victor Pollex victor.pollex
Tue Jul 29 22:59:38 CEST 2008


Kostya schrieb:
> On Mon, Jul 28, 2008 at 09:27:24PM +0200, Victor Pollex wrote:
> [...]
>   
>>>  
>>>       
>> changed the other scantables aswell, though i haven't tested the 8x4 and 
>> 4x8 for the advanced profile, as I haven't found a progressive video 
>> encoded with the advanced profile.
>>     
>
> try http://samples.mplayerhq.hu/evob/sample.evo or
> http://samples.mplayerhq.hu/evob/sample-long.evo
>
> also please use -f crc to make sure output is the same
>   

I used the first 300 frames of sample.evo, as at some point later on 
there is a bits overconsumption error and i end up with different CRCs. 
The result I got for both normal and transponsed scantables is 
CRC=0x158632f5

> [...]
>   
>> 00_constants.patch:
>> changes the ff_pw_4 and ff_pw_64 constants to be able to use them with sse2
>>
>> 01_dsputil_mmx.patch:
>> adds an parameter to the LOAD4 / STORE4 macros to specify a mov mnemonic 
>> suffix
>>
>> 02_vc1dsp.patch:
>> the new "transposed" scantables and altered code to use them
>>
>> 03_vc1dsp_mmx.patch:
>> adds a new header file with macros for the transformations and adds an 
>> mmx version for the transformations
>>
>> 04_vc1dsp_sse2.path:
>> adds an sse2/mmx version for the transformations and uses a bit of sse 
>> instructions. I hope this is acceptable.
>> someone should benchmark the 4x8 and 8x4 versions, as for me the former 
>> was slower and the latter a bit faster compared to the mmx versions
>>     
>  
> Hmm, I'm ok with transposed scantables if that does not change decoded frames.
>   

It only changes the data layout in "block", everything in "dest" should 
be the same as before.

> As for the rest - I'm not a maintainer but your files did not compile on Core2.
> Here's a snippet (same for vc1dsp_mmx.c):
>
> libavcodec/i386/vc1dsp_sse2.c: Assembler messages:
> libavcodec/i386/vc1dsp_sse2.c:299: Error: suffix or operands invalid for `add'
> libavcodec/i386/vc1dsp_sse2.c:305: Error: suffix or operands invalid for `add'
> libavcodec/i386/vc1dsp_sse2.c:311: Error: suffix or operands invalid for `add'
> libavcodec/i386/vc1dsp_sse2.c:232: Error: `(%rdi,%eax)' is not a valid base/index expression
> libavcodec/i386/vc1dsp_sse2.c:236: Error: `(%rdi,%eax)' is not a valid base/index expression
> libavcodec/i386/vc1dsp_sse2.c:237: Error: `(%rdi,%esi,4)' is not a valid base/index expression
> libavcodec/i386/vc1dsp_sse2.c:241: Error: `(%rdi,%esi,4)' is not a valid base/index expression
> libavcodec/i386/vc1dsp_sse2.c:242: Error: suffix or operands invalid for `add'
> libavcodec/i386/vc1dsp_sse2.c:243: Error: `(%rdi,%eax,2)' is not a valid base/index expression
> libavcodec/i386/vc1dsp_sse2.c:247: Error: `(%rdi,%eax,2)' is not a valid base/index expression
> libavcodec/i386/vc1dsp_sse2.c:331: Error: `(%rdi,%esi)' is not a valid base/index expression
> libavcodec/i386/vc1dsp_sse2.c:335: Error: `(%rdi,%esi)' is not a valid base/index expression
> libavcodec/i386/vc1dsp_sse2.c:336: Error: `(%rdi,%esi,4)' is not a valid base/index expression
> libavcodec/i386/vc1dsp_sse2.c:340: Error: `(%rdi,%esi,4)' is not a valid base/index expression
> libavcodec/i386/vc1dsp_sse2.c:341: Error: suffix or operands invalid for `add'
> libavcodec/i386/vc1dsp_sse2.c:342: Error: `(%rdi,%esi,4)' is not a valid base/index expression
> libavcodec/i386/vc1dsp_sse2.c:346: Error: `(%rdi,%esi,4)' is not a valid base/index expression
> make: *** [libavcodec/i386/vc1dsp_sse2.o] Error 1 
>   

I guess I forgot to add portability for the x86_64 architecture. 
Hopefully it is fixed now.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 00_vc1dsp.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080729/6fe9825f/attachment.asc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 01_constants.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080729/6fe9825f/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 02_dsputil_mmx.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080729/6fe9825f/attachment-0001.asc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 03_vc1dsp_mmx.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080729/6fe9825f/attachment-0001.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 04_vc1dsp_sse2.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080729/6fe9825f/attachment-0002.asc>



More information about the ffmpeg-devel mailing list