Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
f6687bf5
Commit
f6687bf5
authored
Jul 05, 2012
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xtea: invert branch and loop precedence
Should slightly improve performance depending on the compiler used.
parent
669bbedf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
xtea.c
libavutil/xtea.c
+12
-7
No files found.
libavutil/xtea.c
View file @
f6687bf5
...
...
@@ -71,8 +71,8 @@ void av_xtea_crypt(AVXTEA *ctx, uint8_t *dst, const uint8_t *src, int count,
{
int
i
;
while
(
count
>
0
)
{
if
(
decrypt
)
{
if
(
decrypt
)
{
while
(
count
>
0
)
{
xtea_crypt_ecb
(
ctx
,
dst
,
src
,
decrypt
);
if
(
iv
)
{
...
...
@@ -80,7 +80,13 @@ void av_xtea_crypt(AVXTEA *ctx, uint8_t *dst, const uint8_t *src, int count,
dst
[
i
]
=
dst
[
i
]
^
iv
[
i
];
memcpy
(
iv
,
src
,
8
);
}
}
else
{
src
+=
8
;
dst
+=
8
;
count
-=
8
;
}
}
else
{
while
(
count
>
0
)
{
if
(
iv
)
{
for
(
i
=
0
;
i
<
8
;
i
++
)
dst
[
i
]
=
src
[
i
]
^
iv
[
i
];
...
...
@@ -89,11 +95,10 @@ void av_xtea_crypt(AVXTEA *ctx, uint8_t *dst, const uint8_t *src, int count,
}
else
{
xtea_crypt_ecb
(
ctx
,
dst
,
src
,
decrypt
);
}
src
+=
8
;
dst
+=
8
;
count
-=
8
;
}
src
+=
8
;
dst
+=
8
;
count
-=
8
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment