mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-08-10 07:37:43 +00:00
avcodec/x86/ttadsp: Optimize updating dl[4..7]
ttaencdsp old: filter_process_c: 15.0 filter_process_ssse3: 9.0 ( 1.66x) filter_process_sse4: 6.9 ( 2.18x) ttaencdsp new: filter_process_c: 14.9 filter_process_ssse3: 8.3 ( 1.79x) filter_process_sse4: 6.4 ( 2.32x) ttadsp old: filter_process_c: 14.7 filter_process_ssse3: 8.7 ( 1.70x) filter_process_sse4: 6.6 ( 2.24x) ttadsp new: filter_process_c: 14.6 filter_process_ssse3: 8.1 ( 1.81x) filter_process_sse4: 6.3 ( 2.30x) Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -107,6 +107,7 @@ cglobal tta%3_filter_process, 5,5,%2, qm, dx, dl, error, in, shift, round
|
||||
movd m2, shiftm ;
|
||||
movd m0, [inq] ;
|
||||
psrad m4, m2 ;
|
||||
psrldq m1, 4 ; dl5, dl6, dl7, 0
|
||||
psubd m3, m0, m4 ;
|
||||
movd [inq], m3 ; *in -= (sum >> filter->shift);
|
||||
movd [errorq], m3 ; filter->error = *in;
|
||||
@@ -116,19 +117,17 @@ cglobal tta%3_filter_process, 5,5,%2, qm, dx, dl, error, in, shift, round
|
||||
|
||||
movd m2, shiftm ; *in += (sum >> filter->shift);
|
||||
psrad m4, m2 ;
|
||||
psrldq m1, 4 ; dl5, dl6, dl7, 0
|
||||
paddd m0, m4 ;
|
||||
movd [inq], m0 ;
|
||||
%endif
|
||||
|
||||
psrldq m1, 4 ;
|
||||
pslldq m0, 12 ; filter->dl[4] = -filter->dl[5];
|
||||
pshufd m0, m0, 0xf0 ; filter->dl[5] = -filter->dl[6];
|
||||
psubd m0, m1 ; filter->dl[6] = *in - filter->dl[7];
|
||||
psrldq m1, m0, 4 ; filter->dl[7] = *in;
|
||||
pshufd m1, m1, 0xf4 ; filter->dl[5] += filter->dl[6];
|
||||
paddd m0, m1 ; filter->dl[4] += filter->dl[5];
|
||||
psrldq m1, 4 ;
|
||||
paddd m0, m1 ;
|
||||
pshufd m2, m1, q3321 ; dl6, dl7, 0, 0
|
||||
pshufd m0, m0, 0
|
||||
paddd m1, m2 ; dl5+dl6, dl6+dl7, dl7, 0
|
||||
psrldq m2, 4 ; dl7
|
||||
paddd m1, m2 ; dl5+dl6+dl7, dl5+dl6+dl7, dl6+dl7, dl7
|
||||
psubd m0, m1
|
||||
mova [dlq + 0x10], m0 ;
|
||||
RET
|
||||
%endmacro
|
||||
|
||||
Reference in New Issue
Block a user