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
3d547c19
Commit
3d547c19
authored
Oct 28, 2017
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/paletteuse: fix debug_accuracy after
aba926e7
parent
3729ae65
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
vf_paletteuse.c
libavfilter/vf_paletteuse.c
+7
-7
No files found.
libavfilter/vf_paletteuse.c
View file @
3d547c19
...
...
@@ -558,16 +558,16 @@ static int debug_accuracy(const struct color_node *node, const uint32_t *palette
for
(
r
=
0
;
r
<
256
;
r
++
)
{
for
(
g
=
0
;
g
<
256
;
g
++
)
{
for
(
b
=
0
;
b
<
256
;
b
++
)
{
const
uint8_t
rgb
[]
=
{
r
,
g
,
b
};
const
int
r1
=
COLORMAP_NEAREST
(
search_method
,
palette
,
node
,
rgb
,
trans_thresh
);
const
int
r2
=
colormap_nearest_bruteforce
(
palette
,
rgb
,
trans_thresh
);
const
uint8_t
argb
[]
=
{
0xff
,
r
,
g
,
b
};
const
int
r1
=
COLORMAP_NEAREST
(
search_method
,
palette
,
node
,
a
rgb
,
trans_thresh
);
const
int
r2
=
colormap_nearest_bruteforce
(
palette
,
a
rgb
,
trans_thresh
);
if
(
r1
!=
r2
)
{
const
uint32_t
c1
=
palette
[
r1
];
const
uint32_t
c2
=
palette
[
r2
];
const
uint8_t
pal
rgb1
[]
=
{
c1
>>
16
&
0xff
,
c1
>>
8
&
0xff
,
c1
&
0xff
};
const
uint8_t
pal
rgb2
[]
=
{
c2
>>
16
&
0xff
,
c2
>>
8
&
0xff
,
c2
&
0xff
};
const
int
d1
=
diff
(
pal
rgb1
,
rgb
,
trans_thresh
);
const
int
d2
=
diff
(
pal
rgb2
,
rgb
,
trans_thresh
);
const
uint8_t
pal
argb1
[]
=
{
0xff
,
c1
>>
16
&
0xff
,
c1
>>
8
&
0xff
,
c1
&
0xff
};
const
uint8_t
pal
argb2
[]
=
{
0xff
,
c2
>>
16
&
0xff
,
c2
>>
8
&
0xff
,
c2
&
0xff
};
const
int
d1
=
diff
(
pal
argb1
,
a
rgb
,
trans_thresh
);
const
int
d2
=
diff
(
pal
argb2
,
a
rgb
,
trans_thresh
);
if
(
d1
!=
d2
)
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"/!
\\
%02X%02X%02X: %d ! %d (%06"
PRIX32
" ! %06"
PRIX32
") / dist: %d ! %d
\n
"
,
...
...
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