History

Merge commit '7a7df34c91e16ea8936f59524145a2cdd6b790f9'

* commit '7a7df34c91e16ea8936f59524145a2cdd6b790f9': blowfish: add av_blowfish_alloc() Conflicts: doc/APIchanges libavutil/version.h

Hendrik Leppkes committed 11 years ago

Commit 9ed59f12 parents 988ddfe 7a7df344 files · +32 −1Browse files

Unified · Split

4 files
  1. doc/APIchanges +3 −0
  2. libavutil/blowfish.c +15 −0
  3. libavutil/blowfish.h +10 −0
  4. libavutil/version.h +4 −1
doc/APIchanges+3−0
@@ -15,6 +15,9 @@ libavutil: 2014-08-09 · 14 unmodified lines
15 15
16API changes, most recent first:16API changes, most recent first:
17 17
182015-xx-xx - lavu 54.30.0
19 xxxxxxx - Add av_blowfish_alloc().
20
182015-xx-xx - lavc 56.35.0 - avcodec.h212015-xx-xx - lavc 56.35.0 - avcodec.h
19 xxxxxxxxx - Rename CODEC_FLAG* defines to AV_CODEC_FLAG*.22 xxxxxxxxx - Rename CODEC_FLAG* defines to AV_CODEC_FLAG*.
20 xxxxxxxxx - Rename CODEC_CAP_* defines to AV_CODEC_CAP_*.23 xxxxxxxxx - Rename CODEC_CAP_* defines to AV_CODEC_CAP_*.
libavutil/blowfish.c+15−0
@@ -24,8 +24,18 @@ · 23 unmodified lines
24#include "avutil.h"24#include "avutil.h"
25#include "common.h"25#include "common.h"
26#include "intreadwrite.h"26#include "intreadwrite.h"
27#include "mem.h"
27#include "blowfish.h"28#include "blowfish.h"
28 29
30#if !FF_API_CRYPTO_CONTEXT
31#define AV_BF_ROUNDS 16
32
33struct AVBlowfish {
34 uint32_t p[AV_BF_ROUNDS + 2];
35 uint32_t s[4][256];
36};
37#endif
38
29static const uint32_t orig_p[AV_BF_ROUNDS + 2] = {39static const uint32_t orig_p[AV_BF_ROUNDS + 2] = {
30 0x243F6A88, 0x85A308D3, 0x13198A2E, 0x03707344,40 0x243F6A88, 0x85A308D3, 0x13198A2E, 0x03707344,
31 0xA4093822, 0x299F31D0, 0x082EFA98, 0xEC4E6C89,41 0xA4093822, 0x299F31D0, 0x082EFA98, 0xEC4E6C89,
@@ -300,6 +310,11 @@ static const uint32_t orig_s[4][256] = { · 268 unmodified lines
300 + ctx->s[3][ Xl & 0xFF])\310 + ctx->s[3][ Xl & 0xFF])\
301 ^ P;311 ^ P;
302 312
313AVBlowfish *av_blowfish_alloc(void)
314{
315 return av_mallocz(sizeof(struct AVBlowfish));
316}
317
303av_cold void av_blowfish_init(AVBlowfish *ctx, const uint8_t *key, int key_len)318av_cold void av_blowfish_init(AVBlowfish *ctx, const uint8_t *key, int key_len)
304{319{
305 uint32_t data, data_l, data_r;320 uint32_t data, data_l, data_r;
libavutil/blowfish.h+10−0
@@ -23,6 +23,7 @@ · 22 unmodified lines
23#define AVUTIL_BLOWFISH_H23#define AVUTIL_BLOWFISH_H
24 24
25#include <stdint.h>25#include <stdint.h>
26#include "version.h"
26 27
27/**28/**
28 * @defgroup lavu_blowfish Blowfish29 * @defgroup lavu_blowfish Blowfish
@@ -30,12 +31,21 @@ · 1 unmodified line
30 * @{31 * @{
31 */32 */
32 33
34#if FF_API_CRYPTO_CONTEXT
33#define AV_BF_ROUNDS 1635#define AV_BF_ROUNDS 16
34 36
35typedef struct AVBlowfish {37typedef struct AVBlowfish {
36 uint32_t p[AV_BF_ROUNDS + 2];38 uint32_t p[AV_BF_ROUNDS + 2];
37 uint32_t s[4][256];39 uint32_t s[4][256];
38} AVBlowfish;40} AVBlowfish;
41#else
42typedef struct AVBlowfish AVBlowfish;
43#endif
44
45/**
46 * Allocate an AVBlowfish context.
47 */
48AVBlowfish *av_blowfish_alloc(void);
39 49
40/**50/**
41 * Initialize an AVBlowfish context.51 * Initialize an AVBlowfish context.
libavutil/version.h+4−1
@@ -56,7 +56,7 @@ · 55 unmodified lines
56 */56 */
57 57
58#define LIBAVUTIL_VERSION_MAJOR 5458#define LIBAVUTIL_VERSION_MAJOR 54
59#define LIBAVUTIL_VERSION_MINOR 2959#define LIBAVUTIL_VERSION_MINOR 30
60#define LIBAVUTIL_VERSION_MICRO 10060#define LIBAVUTIL_VERSION_MICRO 100
61 61
62#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \62#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
@@ -125,6 +125,9 @@ · 62 unmodified lines
125#ifndef FF_API_HMAC125#ifndef FF_API_HMAC
126#define FF_API_HMAC (LIBAVUTIL_VERSION_MAJOR < 55)126#define FF_API_HMAC (LIBAVUTIL_VERSION_MAJOR < 55)
127#endif127#endif
128#ifndef FF_API_CRYPTO_CONTEXT
129#define FF_API_CRYPTO_CONTEXT (LIBAVUTIL_VERSION_MAJOR < 56)
130#endif
128 131
129#ifndef FF_CONST_AVUTIL55132#ifndef FF_CONST_AVUTIL55
130#if LIBAVUTIL_VERSION_MAJOR >= 55133#if LIBAVUTIL_VERSION_MAJOR >= 55

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t