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
d82f1885
Commit
d82f1885
authored
Oct 23, 2012
by
Mans Rullgard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove need for padding in av_memcpy_backptr()
Signed-off-by:
Mans Rullgard
<
mans@mansr.com
>
parent
ceb754d0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
lzo.c
libavutil/lzo.c
+8
-8
lzo.h
libavutil/lzo.h
+1
-1
No files found.
libavutil/lzo.c
View file @
d82f1885
...
@@ -132,13 +132,14 @@ static inline void memcpy_backptr(uint8_t *dst, int back, int cnt)
...
@@ -132,13 +132,14 @@ static inline void memcpy_backptr(uint8_t *dst, int back, int cnt)
if
(
back
==
1
)
{
if
(
back
==
1
)
{
memset
(
dst
,
*
src
,
cnt
);
memset
(
dst
,
*
src
,
cnt
);
}
else
{
}
else
{
#ifdef OUTBUF_PADDED
if
(
cnt
>=
4
)
{
AV_COPY16U
(
dst
,
src
);
AV_COPY16U
(
dst
,
src
);
AV_COPY16U
(
dst
+
2
,
src
+
2
);
AV_COPY16U
(
dst
+
2
,
src
+
2
);
src
+=
4
;
src
+=
4
;
dst
+=
4
;
dst
+=
4
;
cnt
-=
4
;
cnt
-=
4
;
if
(
cnt
>
0
)
{
}
if
(
cnt
>=
8
)
{
AV_COPY16U
(
dst
,
src
);
AV_COPY16U
(
dst
,
src
);
AV_COPY16U
(
dst
+
2
,
src
+
2
);
AV_COPY16U
(
dst
+
2
,
src
+
2
);
AV_COPY16U
(
dst
+
4
,
src
+
4
);
AV_COPY16U
(
dst
+
4
,
src
+
4
);
...
@@ -147,7 +148,6 @@ static inline void memcpy_backptr(uint8_t *dst, int back, int cnt)
...
@@ -147,7 +148,6 @@ static inline void memcpy_backptr(uint8_t *dst, int back, int cnt)
dst
+=
8
;
dst
+=
8
;
cnt
-=
8
;
cnt
-=
8
;
}
}
#endif
if
(
cnt
>
0
)
{
if
(
cnt
>
0
)
{
int
blocklen
=
back
;
int
blocklen
=
back
;
while
(
cnt
>
blocklen
)
{
while
(
cnt
>
blocklen
)
{
...
...
libavutil/lzo.h
View file @
d82f1885
...
@@ -61,7 +61,7 @@ int av_lzo1x_decode(void *out, int *outlen, const void *in, int *inlen);
...
@@ -61,7 +61,7 @@ int av_lzo1x_decode(void *out, int *outlen, const void *in, int *inlen);
/**
/**
* @brief deliberately overlapping memcpy implementation
* @brief deliberately overlapping memcpy implementation
* @param dst destination buffer
; must be padded with 12 additional bytes
* @param dst destination buffer
* @param back how many bytes back we start (the initial size of the overlapping window)
* @param back how many bytes back we start (the initial size of the overlapping window)
* @param cnt number of bytes to copy, must be >= 0
* @param cnt number of bytes to copy, must be >= 0
*
*
...
...
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