Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
aom-rav1e
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
aom-rav1e
Commits
016a5daa
Commit
016a5daa
authored
Aug 03, 2016
by
Urvang Joshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Palette code: simpler and faster duplicate removal
Change-Id: I0c1baa5ca73c1f067d69239d3e31d1050b4706d2
parent
cbed16b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
12 deletions
+4
-12
vp10/encoder/rdopt.c
vp10/encoder/rdopt.c
+4
-12
No files found.
vp10/encoder/rdopt.c
View file @
016a5daa
...
...
@@ -1921,21 +1921,13 @@ static int rd_pick_palette_intra_sby(VP10_COMP *cpi, MACROBLOCK *x,
centroids[i] = roundf(centroids[i]);
// remove duplicates
i = 1;
k = n;
while (i < k) {
if (centroids[i] == centroids[i - 1]) {
j = i;
while (j < k - 1) {
assert((j + 1) < PALETTE_MAX_SIZE);
assert(j > 0);
centroids[j] = centroids[j + 1];
++j;
}
--k;
} else {
for (j = 1; j < n; ++j) {
if (centroids[j] != centroids[j - 1]) { // found a new unique centroid
centroids[i] = centroids[j];
++i;
}
}
k = i; // number of unique centroids
#if CONFIG_VP9_HIGHBITDEPTH
if (cpi->common.use_highbitdepth)
...
...
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