Files
FFmpeg/libavutil
James Almer a039726c2a avutil/x86/aes: remove a few branches
The rounds value is constant and can be one of three hardcoded values, so
instead of checking it on every loop, just split the function into three
different implementations for each value.

Before:
aes_decrypt_128_aesni:                                  93.8 (47.58x)
aes_decrypt_192_aesni:                                 106.9 (49.30x)
aes_decrypt_256_aesni:                                 109.8 (56.50x)
aes_encrypt_128_aesni:                                  93.2 (47.70x)
aes_encrypt_192_aesni:                                 111.1 (48.36x)
aes_encrypt_256_aesni:                                 113.6 (56.27x)

After:
aes_decrypt_128_aesni:                                  71.5 (63.31x)
aes_decrypt_192_aesni:                                  96.8 (55.64x)
aes_decrypt_256_aesni:                                 106.1 (58.51x)
aes_encrypt_128_aesni:                                  81.3 (55.92x)
aes_encrypt_192_aesni:                                  91.2 (59.78x)
aes_encrypt_256_aesni:                                 109.0 (58.26x)

Signed-off-by: James Almer <jamrial@gmail.com>
2025-04-10 12:02:34 -03:00
..
2024-12-04 16:43:06 +08:00
2025-04-10 12:02:34 -03:00
2021-04-27 10:43:13 -03:00
2025-04-10 12:02:34 -03:00
2023-07-12 15:35:37 +02:00
2024-07-21 17:02:12 +02:00
2024-03-04 17:45:00 +01:00
2024-12-04 16:43:06 +08:00
2025-04-07 01:02:35 +02:00
2023-11-18 19:55:42 +01:00
2024-03-15 12:51:15 +01:00
2021-07-22 14:34:31 +02:00
2023-09-07 00:42:10 +02:00
2021-07-22 14:34:31 +02:00
2025-02-04 00:14:14 +01:00
2025-02-04 00:14:14 +01:00
2025-02-04 00:14:14 +01:00
2024-05-04 21:31:33 -03:00
2022-10-17 09:56:47 +02:00
2024-06-01 18:05:58 +03:00
2024-06-01 18:05:58 +03:00
2021-07-21 16:35:27 +02:00
2023-09-07 00:42:10 +02:00
2021-07-22 14:34:31 +02:00
2023-09-07 00:42:10 +02:00
2023-09-07 00:42:10 +02:00
2021-07-22 14:34:31 +02:00
2024-10-16 16:46:29 +02:00
2024-03-31 00:08:43 +01:00
2025-03-17 08:49:04 +01:00
2025-03-17 08:49:04 +01:00
2021-07-22 14:34:31 +02:00
2024-01-16 01:34:57 +01:00
2021-07-22 14:34:31 +02:00
2021-07-22 14:34:31 +02:00
2021-07-22 14:34:31 +02:00
2022-10-17 09:51:47 +02:00
2023-09-07 00:42:10 +02:00
2024-03-31 00:08:43 +01:00
2023-09-01 23:59:10 +02:00
2023-08-08 09:46:11 +02:00
2023-08-08 09:46:11 +02:00