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
6bc20e84
Commit
6bc20e84
authored
Feb 24, 2016
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/drawutils: Fix ff_fill_rectangle() on big endian
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
0d65a7d0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
drawutils.c
libavfilter/drawutils.c
+8
-1
No files found.
libavfilter/drawutils.c
View file @
6bc20e84
...
...
@@ -298,6 +298,7 @@ void ff_fill_rectangle(FFDrawContext *draw, FFDrawColor *color,
{
int
plane
,
x
,
y
,
wp
,
hp
;
uint8_t
*
p0
,
*
p
;
FFDrawColor
color_tmp
=
*
color
;
for
(
plane
=
0
;
plane
<
draw
->
nb_planes
;
plane
++
)
{
p0
=
pointer_at
(
draw
,
dst
,
dst_linesize
,
plane
,
dst_x
,
dst_y
);
...
...
@@ -306,9 +307,15 @@ void ff_fill_rectangle(FFDrawContext *draw, FFDrawColor *color,
if
(
!
hp
)
return
;
p
=
p0
;
if
(
HAVE_BIGENDIAN
&&
draw
->
desc
->
comp
[
0
].
depth
>
8
)
{
for
(
x
=
0
;
2
*
x
<
draw
->
pixelstep
[
plane
];
x
++
)
color_tmp
.
comp
[
plane
].
u16
[
x
]
=
av_bswap16
(
color_tmp
.
comp
[
plane
].
u16
[
x
]);
}
/* copy first line from color */
for
(
x
=
0
;
x
<
wp
;
x
++
)
{
memcpy
(
p
,
color
->
comp
[
plane
].
u8
,
draw
->
pixelstep
[
plane
]);
memcpy
(
p
,
color
_tmp
.
comp
[
plane
].
u8
,
draw
->
pixelstep
[
plane
]);
p
+=
draw
->
pixelstep
[
plane
];
}
wp
*=
draw
->
pixelstep
[
plane
];
...
...
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