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
4cd724da
Commit
4cd724da
authored
Dec 26, 2012
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/tile: remove usage of link->{cur,out}_buf.
parent
3b870f97
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
vf_tile.c
libavfilter/vf_tile.c
+13
-13
No files found.
libavfilter/vf_tile.c
View file @
4cd724da
...
...
@@ -40,6 +40,7 @@ typedef struct {
unsigned
nb_frames
;
FFDrawContext
draw
;
FFDrawColor
blank
;
AVFilterBufferRef
*
out_ref
;
}
TileContext
;
#define REASONABLE_SIZE 1024
...
...
@@ -153,10 +154,9 @@ static int end_last_frame(AVFilterContext *ctx)
{
TileContext
*
tile
=
ctx
->
priv
;
AVFilterLink
*
outlink
=
ctx
->
outputs
[
0
];
AVFilterBufferRef
*
out_buf
=
outlink
->
out_bu
f
;
AVFilterBufferRef
*
out_buf
=
tile
->
out_re
f
;
int
ret
;
outlink
->
out_buf
=
NULL
;
while
(
tile
->
current
<
tile
->
nb_frames
)
draw_blank_frame
(
ctx
,
out_buf
);
ret
=
ff_filter_frame
(
outlink
,
out_buf
);
...
...
@@ -176,29 +176,29 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *picref)
unsigned
x0
,
y0
;
if
(
!
tile
->
current
)
{
outlink
->
out_bu
f
=
ff_get_video_buffer
(
outlink
,
AV_PERM_WRITE
,
outlink
->
w
,
outlink
->
h
);
if
(
!
outlink
->
out_bu
f
)
tile
->
out_re
f
=
ff_get_video_buffer
(
outlink
,
AV_PERM_WRITE
,
outlink
->
w
,
outlink
->
h
);
if
(
!
tile
->
out_re
f
)
return
AVERROR
(
ENOMEM
);
avfilter_copy_buffer_ref_props
(
outlink
->
out_bu
f
,
picref
);
outlink
->
out_bu
f
->
video
->
w
=
outlink
->
w
;
outlink
->
out_bu
f
->
video
->
h
=
outlink
->
h
;
avfilter_copy_buffer_ref_props
(
tile
->
out_re
f
,
picref
);
tile
->
out_re
f
->
video
->
w
=
outlink
->
w
;
tile
->
out_re
f
->
video
->
h
=
outlink
->
h
;
/* fill surface once for margin/padding */
if
(
tile
->
margin
||
tile
->
padding
)
ff_fill_rectangle
(
&
tile
->
draw
,
&
tile
->
blank
,
outlink
->
out_bu
f
->
data
,
outlink
->
out_bu
f
->
linesize
,
tile
->
out_re
f
->
data
,
tile
->
out_re
f
->
linesize
,
0
,
0
,
outlink
->
w
,
outlink
->
h
);
}
get_current_tile_pos
(
ctx
,
&
x0
,
&
y0
);
ff_copy_rectangle2
(
&
tile
->
draw
,
outlink
->
out_buf
->
data
,
outlink
->
out_bu
f
->
linesize
,
inlink
->
cur_buf
->
data
,
inlink
->
cur_bu
f
->
linesize
,
tile
->
out_ref
->
data
,
tile
->
out_re
f
->
linesize
,
picref
->
data
,
picre
f
->
linesize
,
x0
,
y0
,
0
,
0
,
inlink
->
w
,
inlink
->
h
);
avfilter_unref_bufferp
(
&
inlink
->
cur_bu
f
);
avfilter_unref_bufferp
(
&
picre
f
);
if
(
++
tile
->
current
==
tile
->
nb_frames
)
return
end_last_frame
(
ctx
);
...
...
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