Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
67eca72d
Commit
67eca72d
authored
Aug 19, 2006
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SWAP
Originally committed as revision 6030 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
0eb6817d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
mpegvideo.c
libavcodec/mpegvideo.c
+5
-5
common.h
libavutil/common.h
+2
-0
No files found.
libavcodec/mpegvideo.c
View file @
67eca72d
...
...
@@ -1687,7 +1687,7 @@ void MPV_frame_end(MpegEncContext *s)
* @param color color of the arrow
*/
static
void
draw_line
(
uint8_t
*
buf
,
int
sx
,
int
sy
,
int
ex
,
int
ey
,
int
w
,
int
h
,
int
stride
,
int
color
){
int
t
,
x
,
y
,
fr
,
f
;
int
x
,
y
,
fr
,
f
;
sx
=
clip
(
sx
,
0
,
w
-
1
);
sy
=
clip
(
sy
,
0
,
h
-
1
);
...
...
@@ -1698,8 +1698,8 @@ static void draw_line(uint8_t *buf, int sx, int sy, int ex, int ey, int w, int h
if
(
ABS
(
ex
-
sx
)
>
ABS
(
ey
-
sy
)){
if
(
sx
>
ex
){
t
=
sx
;
sx
=
ex
;
ex
=
t
;
t
=
sy
;
sy
=
ey
;
ey
=
t
;
SWAP
(
int
,
sx
,
ex
)
;
SWAP
(
int
,
sy
,
ey
)
;
}
buf
+=
sx
+
sy
*
stride
;
ex
-=
sx
;
...
...
@@ -1712,8 +1712,8 @@ static void draw_line(uint8_t *buf, int sx, int sy, int ex, int ey, int w, int h
}
}
else
{
if
(
sy
>
ey
){
t
=
sx
;
sx
=
ex
;
ex
=
t
;
t
=
sy
;
sy
=
ey
;
ey
=
t
;
SWAP
(
int
,
sx
,
ex
)
;
SWAP
(
int
,
sy
,
ey
)
;
}
buf
+=
sx
+
sy
*
stride
;
ey
-=
sy
;
...
...
libavutil/common.h
View file @
67eca72d
...
...
@@ -169,6 +169,8 @@ typedef uint64_t uint_fast64_t;
#define FFMAX(a,b) ((a) > (b) ? (a) : (b))
#define FFMIN(a,b) ((a) > (b) ? (b) : (a))
#define SWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)
/* misc math functions */
extern
FF_IMPORT_ATTR
const
uint8_t
ff_log2_tab
[
256
];
...
...
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