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
4216968f
Commit
4216968f
authored
Feb 26, 2015
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/palettegen: use a logging context for the dupped color warning
parent
ab093bde
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
vf_palettegen.c
libavfilter/vf_palettegen.c
+4
-3
No files found.
libavfilter/vf_palettegen.c
View file @
4216968f
...
...
@@ -225,8 +225,9 @@ static void split_box(PaletteGenContext *s, struct range_box *box, int n)
/**
* Write the palette into the output frame.
*/
static
void
write_palette
(
const
PaletteGenContext
*
s
,
AVFrame
*
out
)
static
void
write_palette
(
AVFilterContext
*
ctx
,
AVFrame
*
out
)
{
const
PaletteGenContext
*
s
=
ctx
->
priv
;
int
x
,
y
,
box_id
=
0
;
uint32_t
*
pal
=
(
uint32_t
*
)
out
->
data
[
0
];
const
int
pal_linesize
=
out
->
linesize
[
0
]
>>
2
;
...
...
@@ -237,7 +238,7 @@ static void write_palette(const PaletteGenContext *s, AVFrame *out)
if
(
box_id
<
s
->
nb_boxes
)
{
pal
[
x
]
=
s
->
boxes
[
box_id
++
].
color
;
if
((
x
||
y
)
&&
pal
[
x
]
==
last_color
)
av_log
(
NULL
,
AV_LOG_WARNING
,
"Dupped color: %08X
\n
"
,
pal
[
x
]);
av_log
(
ctx
,
AV_LOG_WARNING
,
"Dupped color: %08X
\n
"
,
pal
[
x
]);
last_color
=
pal
[
x
];
}
else
{
pal
[
x
]
=
0xff000000
;
// pad with black
...
...
@@ -378,7 +379,7 @@ static AVFrame *get_palette_frame(AVFilterContext *ctx)
qsort
(
s
->
boxes
,
s
->
nb_boxes
,
sizeof
(
*
s
->
boxes
),
cmp_color
);
write_palette
(
s
,
out
);
write_palette
(
ctx
,
out
);
return
out
;
}
...
...
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