1
0
mirror of https://git.ffmpeg.org/ffmpeg.git synced 2026-10-24 02:09:03 +03:00
Files
ffmpeg/libavcodec
dgavriloff 57f9d96cac avcodec/x86/me_cmp: Port 8-wide SAD/VSAD functions from MMXEXT to SSE2
Continues the work from d91b1559e0 and 8157aa1a3f which ported the
16-wide and (n)sse functions. The remaining 8-wide MMXEXT functions
(sad8, sad8_x2, sad8_y2, sad8_approx_xy2, vsad_intra8, vsad8_approx)
are always overridden on x86-64 where SSE2 is baseline.

For SAD, SAD_X2, SAD_Y2 and SAD_APPROX_XY2 two consecutive 8-byte
rows are packed into one xmm register (movh + movhps, or movh +
punpcklqdq when a row is carried across iterations); a single psadbw
then produces both row SADs in the low and high qwords, combined by
movhlps + paddw at the end.

VSAD_INTRA and VSAD_APPROX consume each row in two consecutive pairs
(N-1, N) and (N, N+1), so packing would require duplicating loads or
restructuring the carry-forward; these use movh loads with register-
register psadbw without packing.

Old benchmarks (MMXEXT):
pix_abs_1_0_c:                                           8.9 ( 1.00x)
pix_abs_1_0_mmxext:                                      6.4 ( 1.38x)
pix_abs_1_1_c:                                          85.3 ( 1.00x)
pix_abs_1_1_mmxext:                                      9.2 ( 9.29x)
pix_abs_1_2_c:                                           9.9 ( 1.00x)
pix_abs_1_2_mmxext:                                      9.5 ( 1.04x)
sad_1_c:                                                12.8 ( 1.00x)
sad_1_mmxext:                                            6.5 ( 1.98x)
vsad_5_c:                                               45.7 ( 1.00x)
vsad_5_mmxext:                                           4.9 ( 9.39x)

New benchmarks (SSE2):
pix_abs_1_0_c:                                           7.9 ( 1.00x)
pix_abs_1_0_sse2:                                        6.0 ( 1.32x)
pix_abs_1_1_c:                                          89.5 ( 1.00x)
pix_abs_1_1_sse2:                                        9.1 ( 9.84x)
pix_abs_1_2_c:                                          10.4 ( 1.00x)
pix_abs_1_2_sse2:                                        7.6 ( 1.37x)
sad_1_c:                                                 7.7 ( 1.00x)
sad_1_sse2:                                              5.9 ( 1.30x)
vsad_5_c:                                               53.2 ( 1.00x)
vsad_5_sse2:                                             5.3 (10.04x)

Signed-off-by: dgavriloff <denis.gavriloff@gmail.com>
2026-09-20 12:29:38 +00:00
..
2026-06-17 17:34:24 +09:00
2026-09-02 22:31:34 +02:00
2026-09-10 18:23:50 +00:00
…
2026-09-02 22:31:34 +02:00
…
2026-09-12 23:52:20 +00:00
…
…
…
…
…
2026-09-12 23:52:20 +00:00
2026-09-12 23:52:20 +00:00
2026-09-12 23:52:20 +00:00
2026-07-01 21:05:27 +09:00
2026-07-01 21:05:27 +09:00
2026-09-12 23:52:20 +00:00
…
…
2026-09-12 23:52:20 +00:00
2026-09-12 23:52:20 +00:00
…
…
…
2026-09-12 23:52:20 +00:00
…
2026-09-02 22:31:34 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-09-12 23:52:20 +00:00
2026-09-12 23:52:20 +00:00
…
…
…
…
…
…
2026-06-23 19:15:57 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
2026-09-10 18:23:50 +00:00
…
…
…
…
…
…
…
…
…
2026-09-12 23:52:20 +00:00
2026-09-12 23:52:20 +00:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-04-28 14:31:19 +02:00
…
…
…
…
…
…
…
2026-04-28 12:29:37 +00:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-09-12 23:52:20 +00:00
…
2026-05-03 16:56:43 +02:00
…
…
2026-08-09 17:26:53 +02:00
…
…
2026-04-28 12:29:37 +00:00
…
2026-09-06 00:48:26 +02:00
…
2026-04-28 12:29:37 +00:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-09-12 23:52:20 +00:00
…
…
…
…
2026-06-03 14:12:50 +09:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-06-23 19:15:57 +02:00
…
…
…
…
…
…
2026-03-10 13:52:19 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-06-23 19:15:57 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-09-12 23:52:20 +00:00
…
…
…
…
…
…
…
…
…
…
…
2026-09-12 23:52:20 +00:00
…
…
…
…
…
2026-05-03 18:23:03 +02:00
…
…
…
…
2026-07-07 17:35:58 +00:00
2026-07-07 17:35:58 +00:00
…
…
…
…
…
…
…
…
…
…
2026-06-13 15:55:40 +00:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-09-12 23:52:20 +00:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-05-02 21:39:02 +00:00
…
…
…
…
…
…
…
…
…
…
2026-06-23 17:15:02 +02:00
…
2026-07-28 17:54:07 +02:00
…
…
…
…
…
…
…
…
…
…
2026-09-12 23:52:20 +00:00
…
…
…
2026-07-01 21:05:27 +09:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-03-10 13:52:19 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-03-28 11:25:38 +01:00
2026-03-28 11:25:38 +01:00
2026-03-28 11:25:38 +01:00
…
…
…
…
…
…
2026-05-03 18:22:24 +02:00
…
…
2026-09-12 23:52:20 +00:00
2026-09-12 23:52:20 +00:00
…
…
…
…
…
…
…
…
…
…
…
2026-03-02 19:01:46 +01:00
2026-09-12 23:52:20 +00:00
…
…
…
…
…
…
…
…
…
…
…
2026-08-13 13:17:59 +02:00
…
…
…
…
…
…
…
…
2026-09-12 23:52:20 +00:00
…
…
…
…
…
…
…
2026-08-09 17:25:23 +02:00
…
2026-08-09 17:25:23 +02:00
2026-08-09 17:25:23 +02:00
2026-08-09 17:25:23 +02:00
2026-08-09 17:25:23 +02:00
2026-08-09 17:25:23 +02:00
…
…
…
…
…
…
…
…
2026-03-10 13:52:18 +01:00
…
…
…
2026-06-23 19:15:57 +02:00
…
2026-04-28 12:29:37 +00:00
…
…
…
…
…
2026-04-28 12:29:37 +00:00
…
…
…
…
…
…
…
…
2026-07-28 17:54:07 +02:00
…
…
…
…
…
…
…
…
…
…
2026-03-10 13:52:19 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-06-23 19:15:57 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-03-16 10:24:33 +00:00
…
…
…
…
…
…
…