FFmpeg
Loading...
Searching...
No Matches
aes_init.c
Go to the documentation of this file.
1/*
2 * Copyright (c) 2015 Rodger Combs <rodger.combs@gmail.com>
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#include <stddef.h>
23#include "libavutil/x86/cpu.h"
24
25void ff_aes_decrypt_10_aesni(AVAES *a, uint8_t *dst, const uint8_t *src,
26 int count, uint8_t *iv, int rounds);
27void ff_aes_decrypt_12_aesni(AVAES *a, uint8_t *dst, const uint8_t *src,
28 int count, uint8_t *iv, int rounds);
29void ff_aes_decrypt_14_aesni(AVAES *a, uint8_t *dst, const uint8_t *src,
30 int count, uint8_t *iv, int rounds);
31void ff_aes_encrypt_10_aesni(AVAES *a, uint8_t *dst, const uint8_t *src,
32 int count, uint8_t *iv, int rounds);
33void ff_aes_encrypt_12_aesni(AVAES *a, uint8_t *dst, const uint8_t *src,
34 int count, uint8_t *iv, int rounds);
35void ff_aes_encrypt_14_aesni(AVAES *a, uint8_t *dst, const uint8_t *src,
36 int count, uint8_t *iv, int rounds);
37
38void ff_init_aes_x86(AVAES *a, int decrypt)
39{
41
43 if (a->rounds == 10)
45 else if (a->rounds == 12)
47 else if (a->rounds == 14)
49 }
50}
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Definition dsp.h:87
void ff_aes_decrypt_14_aesni(AVAES *a, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int rounds)
void ff_init_aes_x86(AVAES *a, int decrypt)
Definition aes_init.c:38
void ff_aes_encrypt_10_aesni(AVAES *a, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int rounds)
void ff_aes_encrypt_14_aesni(AVAES *a, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int rounds)
void ff_aes_encrypt_12_aesni(AVAES *a, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int rounds)
void ff_aes_decrypt_10_aesni(AVAES *a, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int rounds)
void ff_aes_decrypt_12_aesni(AVAES *a, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int rounds)
int a
static atomic_int cpu_flags
Definition cpu.c:56
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
Definition cpu.c:109
#define EXTERNAL_AESNI(flags)
Definition cpu.h:75
#define src
Definition vp8dsp.c:248