Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
3cafbdc0
Commit
3cafbdc0
authored
Dec 27, 2022
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/palette: add lowbias32 hashing
parent
05192686
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
palette.c
libavfilter/palette.c
+10
-0
palette.h
libavfilter/palette.h
+5
-0
No files found.
libavfilter/palette.c
View file @
3cafbdc0
...
...
@@ -207,3 +207,13 @@ uint32_t ff_oklab_int_to_srgb_u8(struct Lab c)
return
r
<<
16
|
g
<<
8
|
b
;
}
uint32_t
ff_lowbias32
(
uint32_t
x
)
{
x
^=
x
>>
16
;
x
*=
0x7feb352d
;
x
^=
x
>>
15
;
x
*=
0x846ca68b
;
x
^=
x
>>
16
;
return
x
;
}
libavfilter/palette.h
View file @
3cafbdc0
...
...
@@ -55,4 +55,9 @@ struct Lab ff_srgb_u8_to_oklab_int(uint32_t srgb);
*/
uint32_t
ff_oklab_int_to_srgb_u8
(
struct
Lab
c
);
/*
* lowbias32 hashing from https://nullprogram.com/blog/2018/07/31/
*/
uint32_t
ff_lowbias32
(
uint32_t
x
);
#endif
/* AVFILTER_PALETTE_H */
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