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
4dc58803
Commit
4dc58803
authored
Feb 17, 2016
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_drawbox: reindent
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
5589698e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
42 deletions
+42
-42
vf_drawbox.c
libavfilter/vf_drawbox.c
+42
-42
No files found.
libavfilter/vf_drawbox.c
View file @
4dc58803
...
...
@@ -240,32 +240,32 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
}
}
}
else
{
for
(
y
=
FFMAX
(
yb
,
0
);
y
<
frame
->
height
&&
y
<
(
yb
+
s
->
h
);
y
++
)
{
row
[
0
]
=
frame
->
data
[
0
]
+
y
*
frame
->
linesize
[
0
];
for
(
plane
=
1
;
plane
<
3
;
plane
++
)
row
[
plane
]
=
frame
->
data
[
plane
]
+
frame
->
linesize
[
plane
]
*
(
y
>>
s
->
vsub
);
if
(
s
->
invert_color
)
{
for
(
x
=
FFMAX
(
xb
,
0
);
x
<
xb
+
s
->
w
&&
x
<
frame
->
width
;
x
++
)
if
((
y
-
yb
<
s
->
thickness
)
||
(
yb
+
s
->
h
-
1
-
y
<
s
->
thickness
)
||
(
x
-
xb
<
s
->
thickness
)
||
(
xb
+
s
->
w
-
1
-
x
<
s
->
thickness
))
row
[
0
][
x
]
=
0xff
-
row
[
0
][
x
];
}
else
{
for
(
x
=
FFMAX
(
xb
,
0
);
x
<
xb
+
s
->
w
&&
x
<
frame
->
width
;
x
++
)
{
double
alpha
=
(
double
)
s
->
yuv_color
[
A
]
/
255
;
if
((
y
-
yb
<
s
->
thickness
)
||
(
yb
+
s
->
h
-
1
-
y
<
s
->
thickness
)
||
(
x
-
xb
<
s
->
thickness
)
||
(
xb
+
s
->
w
-
1
-
x
<
s
->
thickness
))
{
row
[
0
][
x
]
=
(
1
-
alpha
)
*
row
[
0
][
x
]
+
alpha
*
s
->
yuv_color
[
Y
];
row
[
1
][
x
>>
s
->
hsub
]
=
(
1
-
alpha
)
*
row
[
1
][
x
>>
s
->
hsub
]
+
alpha
*
s
->
yuv_color
[
U
];
row
[
2
][
x
>>
s
->
hsub
]
=
(
1
-
alpha
)
*
row
[
2
][
x
>>
s
->
hsub
]
+
alpha
*
s
->
yuv_color
[
V
];
for
(
y
=
FFMAX
(
yb
,
0
);
y
<
frame
->
height
&&
y
<
(
yb
+
s
->
h
);
y
++
)
{
row
[
0
]
=
frame
->
data
[
0
]
+
y
*
frame
->
linesize
[
0
];
for
(
plane
=
1
;
plane
<
3
;
plane
++
)
row
[
plane
]
=
frame
->
data
[
plane
]
+
frame
->
linesize
[
plane
]
*
(
y
>>
s
->
vsub
);
if
(
s
->
invert_color
)
{
for
(
x
=
FFMAX
(
xb
,
0
);
x
<
xb
+
s
->
w
&&
x
<
frame
->
width
;
x
++
)
if
((
y
-
yb
<
s
->
thickness
)
||
(
yb
+
s
->
h
-
1
-
y
<
s
->
thickness
)
||
(
x
-
xb
<
s
->
thickness
)
||
(
xb
+
s
->
w
-
1
-
x
<
s
->
thickness
))
row
[
0
][
x
]
=
0xff
-
row
[
0
][
x
];
}
else
{
for
(
x
=
FFMAX
(
xb
,
0
);
x
<
xb
+
s
->
w
&&
x
<
frame
->
width
;
x
++
)
{
double
alpha
=
(
double
)
s
->
yuv_color
[
A
]
/
255
;
if
((
y
-
yb
<
s
->
thickness
)
||
(
yb
+
s
->
h
-
1
-
y
<
s
->
thickness
)
||
(
x
-
xb
<
s
->
thickness
)
||
(
xb
+
s
->
w
-
1
-
x
<
s
->
thickness
))
{
row
[
0
][
x
]
=
(
1
-
alpha
)
*
row
[
0
][
x
]
+
alpha
*
s
->
yuv_color
[
Y
];
row
[
1
][
x
>>
s
->
hsub
]
=
(
1
-
alpha
)
*
row
[
1
][
x
>>
s
->
hsub
]
+
alpha
*
s
->
yuv_color
[
U
];
row
[
2
][
x
>>
s
->
hsub
]
=
(
1
-
alpha
)
*
row
[
2
][
x
>>
s
->
hsub
]
+
alpha
*
s
->
yuv_color
[
V
];
}
}
}
}
}
}
return
ff_filter_frame
(
inlink
->
dst
->
outputs
[
0
],
frame
);
}
...
...
@@ -379,30 +379,30 @@ static int drawgrid_filter_frame(AVFilterLink *inlink, AVFrame *frame)
}
}
}
else
{
for
(
y
=
0
;
y
<
frame
->
height
;
y
++
)
{
row
[
0
]
=
frame
->
data
[
0
]
+
y
*
frame
->
linesize
[
0
];
for
(
plane
=
1
;
plane
<
3
;
plane
++
)
row
[
plane
]
=
frame
->
data
[
plane
]
+
frame
->
linesize
[
plane
]
*
(
y
>>
drawgrid
->
vsub
);
if
(
drawgrid
->
invert_color
)
{
for
(
x
=
0
;
x
<
frame
->
width
;
x
++
)
if
(
pixel_belongs_to_grid
(
drawgrid
,
x
,
y
))
row
[
0
][
x
]
=
0xff
-
row
[
0
][
x
];
}
else
{
for
(
x
=
0
;
x
<
frame
->
width
;
x
++
)
{
double
alpha
=
(
double
)
drawgrid
->
yuv_color
[
A
]
/
255
;
if
(
pixel_belongs_to_grid
(
drawgrid
,
x
,
y
))
{
row
[
0
][
x
]
=
(
1
-
alpha
)
*
row
[
0
][
x
]
+
alpha
*
drawgrid
->
yuv_color
[
Y
];
row
[
1
][
x
>>
drawgrid
->
hsub
]
=
(
1
-
alpha
)
*
row
[
1
][
x
>>
drawgrid
->
hsub
]
+
alpha
*
drawgrid
->
yuv_color
[
U
];
row
[
2
][
x
>>
drawgrid
->
hsub
]
=
(
1
-
alpha
)
*
row
[
2
][
x
>>
drawgrid
->
hsub
]
+
alpha
*
drawgrid
->
yuv_color
[
V
];
for
(
y
=
0
;
y
<
frame
->
height
;
y
++
)
{
row
[
0
]
=
frame
->
data
[
0
]
+
y
*
frame
->
linesize
[
0
];
for
(
plane
=
1
;
plane
<
3
;
plane
++
)
row
[
plane
]
=
frame
->
data
[
plane
]
+
frame
->
linesize
[
plane
]
*
(
y
>>
drawgrid
->
vsub
);
if
(
drawgrid
->
invert_color
)
{
for
(
x
=
0
;
x
<
frame
->
width
;
x
++
)
if
(
pixel_belongs_to_grid
(
drawgrid
,
x
,
y
))
row
[
0
][
x
]
=
0xff
-
row
[
0
][
x
];
}
else
{
for
(
x
=
0
;
x
<
frame
->
width
;
x
++
)
{
double
alpha
=
(
double
)
drawgrid
->
yuv_color
[
A
]
/
255
;
if
(
pixel_belongs_to_grid
(
drawgrid
,
x
,
y
))
{
row
[
0
][
x
]
=
(
1
-
alpha
)
*
row
[
0
][
x
]
+
alpha
*
drawgrid
->
yuv_color
[
Y
];
row
[
1
][
x
>>
drawgrid
->
hsub
]
=
(
1
-
alpha
)
*
row
[
1
][
x
>>
drawgrid
->
hsub
]
+
alpha
*
drawgrid
->
yuv_color
[
U
];
row
[
2
][
x
>>
drawgrid
->
hsub
]
=
(
1
-
alpha
)
*
row
[
2
][
x
>>
drawgrid
->
hsub
]
+
alpha
*
drawgrid
->
yuv_color
[
V
];
}
}
}
}
}
}
return
ff_filter_frame
(
inlink
->
dst
->
outputs
[
0
],
frame
);
}
...
...
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