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
ad12e9e8
Commit
ad12e9e8
authored
Apr 07, 2012
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/hflip: copy palette data in start_frame()
Fix trac ticket #1116.
parent
b0b7a89b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
vf_hflip.c
libavfilter/vf_hflip.c
+16
-0
pixfmts_hflip
tests/ref/lavfi/pixfmts_hflip
+1
-1
No files found.
libavfilter/vf_hflip.c
View file @
ad12e9e8
...
@@ -80,6 +80,21 @@ static int config_props(AVFilterLink *inlink)
...
@@ -80,6 +80,21 @@ static int config_props(AVFilterLink *inlink)
return
0
;
return
0
;
}
}
static
void
start_frame
(
AVFilterLink
*
inlink
,
AVFilterBufferRef
*
picref
)
{
AVFilterLink
*
outlink
=
inlink
->
dst
->
outputs
[
0
];
outlink
->
out_buf
=
avfilter_get_video_buffer
(
outlink
,
AV_PERM_WRITE
,
outlink
->
w
,
outlink
->
h
);
avfilter_copy_buffer_ref_props
(
outlink
->
out_buf
,
picref
);
/* copy palette if required */
if
(
av_pix_fmt_descriptors
[
inlink
->
format
].
flags
&
PIX_FMT_PAL
)
memcpy
(
inlink
->
dst
->
outputs
[
0
]
->
out_buf
->
data
[
1
],
picref
->
data
[
1
],
AVPALETTE_SIZE
);
avfilter_start_frame
(
outlink
,
avfilter_ref_buffer
(
outlink
->
out_buf
,
~
0
));
}
static
void
draw_slice
(
AVFilterLink
*
inlink
,
int
y
,
int
h
,
int
slice_dir
)
static
void
draw_slice
(
AVFilterLink
*
inlink
,
int
y
,
int
h
,
int
slice_dir
)
{
{
FlipContext
*
flip
=
inlink
->
dst
->
priv
;
FlipContext
*
flip
=
inlink
->
dst
->
priv
;
...
@@ -152,6 +167,7 @@ AVFilter avfilter_vf_hflip = {
...
@@ -152,6 +167,7 @@ AVFilter avfilter_vf_hflip = {
.
inputs
=
(
const
AVFilterPad
[])
{{
.
name
=
"default"
,
.
inputs
=
(
const
AVFilterPad
[])
{{
.
name
=
"default"
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
start_frame
=
start_frame
,
.
draw_slice
=
draw_slice
,
.
draw_slice
=
draw_slice
,
.
config_props
=
config_props
,
.
config_props
=
config_props
,
.
min_perms
=
AV_PERM_READ
,
},
.
min_perms
=
AV_PERM_READ
,
},
...
...
tests/ref/lavfi/pixfmts_hflip
View file @
ad12e9e8
...
@@ -15,7 +15,7 @@ bgra 01ca21e7e6a8d1281b4553bde8e8a404
...
@@ -15,7 +15,7 @@ bgra 01ca21e7e6a8d1281b4553bde8e8a404
gray 03efcb4ab52a24c0af0e03cfd26c9377
gray 03efcb4ab52a24c0af0e03cfd26c9377
gray16be 632535b46edec78a6534ef18d37f2b71
gray16be 632535b46edec78a6534ef18d37f2b71
gray16le 5c24e6f847bf9a41a40760c0d15df161
gray16le 5c24e6f847bf9a41a40760c0d15df161
pal8
6c1545bb295e9289add1760851a3d9c9
pal8
0fda4178d2613bb90484770b31e1891d
rgb24 754f1722fc738590cc407ac65749bfe8
rgb24 754f1722fc738590cc407ac65749bfe8
rgb444be d18c1c99abe11dd8347ce8cbc9676bb5
rgb444be d18c1c99abe11dd8347ce8cbc9676bb5
rgb444le 889fff491a853a114b1a8d07fca2c6f2
rgb444le 889fff491a853a114b1a8d07fca2c6f2
...
...
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