It's been argued that the benefits of the current implementation far outweight those of making the structs opaque. This deprecation is not present in any release, so it can be safely removed. Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>tags/n3.0
@@ -27,15 +27,6 @@ | |||||
#include "mem.h" | #include "mem.h" | ||||
#include "blowfish.h" | #include "blowfish.h" | ||||
#if !FF_API_CRYPTO_CONTEXT | |||||
#define AV_BF_ROUNDS 16 | |||||
struct AVBlowfish { | |||||
uint32_t p[AV_BF_ROUNDS + 2]; | |||||
uint32_t s[4][256]; | |||||
}; | |||||
#endif | |||||
static const uint32_t orig_p[AV_BF_ROUNDS + 2] = { | static const uint32_t orig_p[AV_BF_ROUNDS + 2] = { | ||||
0x243F6A88, 0x85A308D3, 0x13198A2E, 0x03707344, | 0x243F6A88, 0x85A308D3, 0x13198A2E, 0x03707344, | ||||
0xA4093822, 0x299F31D0, 0x082EFA98, 0xEC4E6C89, | 0xA4093822, 0x299F31D0, 0x082EFA98, 0xEC4E6C89, | ||||
@@ -23,7 +23,6 @@ | |||||
#define AVUTIL_BLOWFISH_H | #define AVUTIL_BLOWFISH_H | ||||
#include <stdint.h> | #include <stdint.h> | ||||
#include "version.h" | |||||
/** | /** | ||||
* @defgroup lavu_blowfish Blowfish | * @defgroup lavu_blowfish Blowfish | ||||
@@ -31,16 +30,12 @@ | |||||
* @{ | * @{ | ||||
*/ | */ | ||||
#if FF_API_CRYPTO_CONTEXT | |||||
#define AV_BF_ROUNDS 16 | #define AV_BF_ROUNDS 16 | ||||
typedef struct AVBlowfish { | typedef struct AVBlowfish { | ||||
uint32_t p[AV_BF_ROUNDS + 2]; | uint32_t p[AV_BF_ROUNDS + 2]; | ||||
uint32_t s[4][256]; | uint32_t s[4][256]; | ||||
} AVBlowfish; | } AVBlowfish; | ||||
#else | |||||
typedef struct AVBlowfish AVBlowfish; | |||||
#endif | |||||
/** | /** | ||||
* Allocate an AVBlowfish context. | * Allocate an AVBlowfish context. | ||||
@@ -25,13 +25,6 @@ | |||||
#include "mem.h" | #include "mem.h" | ||||
#include "des.h" | #include "des.h" | ||||
#if !FF_API_CRYPTO_CONTEXT | |||||
struct AVDES { | |||||
uint64_t round_keys[3][16]; | |||||
int triple_des; | |||||
}; | |||||
#endif | |||||
#define T(a, b, c, d, e, f, g, h) 64-a,64-b,64-c,64-d,64-e,64-f,64-g,64-h | #define T(a, b, c, d, e, f, g, h) 64-a,64-b,64-c,64-d,64-e,64-f,64-g,64-h | ||||
static const uint8_t IP_shuffle[] = { | static const uint8_t IP_shuffle[] = { | ||||
T(58, 50, 42, 34, 26, 18, 10, 2), | T(58, 50, 42, 34, 26, 18, 10, 2), | ||||
@@ -23,7 +23,6 @@ | |||||
#define AVUTIL_DES_H | #define AVUTIL_DES_H | ||||
#include <stdint.h> | #include <stdint.h> | ||||
#include "version.h" | |||||
/** | /** | ||||
* @defgroup lavu_des DES | * @defgroup lavu_des DES | ||||
@@ -31,14 +30,10 @@ | |||||
* @{ | * @{ | ||||
*/ | */ | ||||
#if FF_API_CRYPTO_CONTEXT | |||||
typedef struct AVDES { | typedef struct AVDES { | ||||
uint64_t round_keys[3][16]; | uint64_t round_keys[3][16]; | ||||
int triple_des; | int triple_des; | ||||
} AVDES; | } AVDES; | ||||
#else | |||||
typedef struct AVDES AVDES; | |||||
#endif | |||||
/** | /** | ||||
* Allocate an AVDES context. | * Allocate an AVDES context. | ||||
@@ -25,13 +25,6 @@ | |||||
#include "mem.h" | #include "mem.h" | ||||
#include "rc4.h" | #include "rc4.h" | ||||
#if !FF_API_CRYPTO_CONTEXT | |||||
struct AVRC4 { | |||||
uint8_t state[256]; | |||||
int x, y; | |||||
}; | |||||
#endif | |||||
AVRC4 *av_rc4_alloc(void) | AVRC4 *av_rc4_alloc(void) | ||||
{ | { | ||||
return av_mallocz(sizeof(struct AVRC4)); | return av_mallocz(sizeof(struct AVRC4)); | ||||
@@ -22,7 +22,6 @@ | |||||
#define AVUTIL_RC4_H | #define AVUTIL_RC4_H | ||||
#include <stdint.h> | #include <stdint.h> | ||||
#include "version.h" | |||||
/** | /** | ||||
* @defgroup lavu_rc4 RC4 | * @defgroup lavu_rc4 RC4 | ||||
@@ -30,14 +29,10 @@ | |||||
* @{ | * @{ | ||||
*/ | */ | ||||
#if FF_API_CRYPTO_CONTEXT | |||||
typedef struct AVRC4 { | typedef struct AVRC4 { | ||||
uint8_t state[256]; | uint8_t state[256]; | ||||
int x, y; | int x, y; | ||||
} AVRC4; | } AVRC4; | ||||
#else | |||||
typedef struct AVRC4 AVRC4; | |||||
#endif | |||||
/** | /** | ||||
* Allocate an AVRC4 context. | * Allocate an AVRC4 context. | ||||
@@ -96,9 +96,6 @@ | |||||
#ifndef FF_API_DLOG | #ifndef FF_API_DLOG | ||||
#define FF_API_DLOG (LIBAVUTIL_VERSION_MAJOR < 56) | #define FF_API_DLOG (LIBAVUTIL_VERSION_MAJOR < 56) | ||||
#endif | #endif | ||||
#ifndef FF_API_CRYPTO_CONTEXT | |||||
#define FF_API_CRYPTO_CONTEXT (LIBAVUTIL_VERSION_MAJOR < 56) | |||||
#endif | |||||
#ifndef FF_API_VAAPI | #ifndef FF_API_VAAPI | ||||
#define FF_API_VAAPI (LIBAVUTIL_VERSION_MAJOR < 56) | #define FF_API_VAAPI (LIBAVUTIL_VERSION_MAJOR < 56) | ||||
#endif | #endif | ||||
@@ -34,12 +34,6 @@ | |||||
#include "mem.h" | #include "mem.h" | ||||
#include "xtea.h" | #include "xtea.h" | ||||
#if !FF_API_CRYPTO_CONTEXT | |||||
struct AVXTEA { | |||||
uint32_t key[16]; | |||||
}; | |||||
#endif | |||||
AVXTEA *av_xtea_alloc(void) | AVXTEA *av_xtea_alloc(void) | ||||
{ | { | ||||
return av_mallocz(sizeof(struct AVXTEA)); | return av_mallocz(sizeof(struct AVXTEA)); | ||||
@@ -23,7 +23,6 @@ | |||||
#define AVUTIL_XTEA_H | #define AVUTIL_XTEA_H | ||||
#include <stdint.h> | #include <stdint.h> | ||||
#include "version.h" | |||||
/** | /** | ||||
* @file | * @file | ||||
@@ -33,13 +32,9 @@ | |||||
* @{ | * @{ | ||||
*/ | */ | ||||
#if FF_API_CRYPTO_CONTEXT | |||||
typedef struct AVXTEA { | typedef struct AVXTEA { | ||||
uint32_t key[16]; | uint32_t key[16]; | ||||
} AVXTEA; | } AVXTEA; | ||||
#else | |||||
typedef struct AVXTEA AVXTEA; | |||||
#endif | |||||
/** | /** | ||||
* Allocate an AVXTEA context. | * Allocate an AVXTEA context. | ||||