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
a0a23b7f
Commit
a0a23b7f
authored
Aug 03, 2016
by
Urvang Joshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make palette code faster: replace nested for loops by a single memcpy().
Change-Id: Ia14df45a35c98d680822454fbb8d1763884c1852
parent
108df24d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
10 deletions
+3
-10
vp10/encoder/rdopt.c
vp10/encoder/rdopt.c
+3
-10
No files found.
vp10/encoder/rdopt.c
View file @
a0a23b7f
...
...
@@ -1949,9 +1949,7 @@ static int rd_pick_palette_intra_sby(VP10_COMP *cpi, MACROBLOCK *x,
pmi->palette_size[0] = k;
vp10_calc_indices(data, centroids, indices, rows * cols, k, 1);
for (r = 0; r < rows; ++r)
for (c = 0; c < cols; ++c)
color_map[r * cols + c] = indices[r * cols + c];
memcpy(color_map, indices, rows * cols * sizeof(*color_map));
super_block_yrd(cpi, x, &this_rate_tokenonly, &this_distortion,
&s, NULL, bsize, *best_rd);
...
...
@@ -3825,9 +3823,7 @@ static void rd_pick_palette_intra_sbuv(VP10_COMP *cpi, MACROBLOCK *x,
clip_pixel((int)lroundf(centroids[j * 2 + i - 1]));
}
}
for (r = 0; r < rows; ++r)
for (c = 0; c < cols; ++c)
color_map[r * cols + c] = indices[r * cols + c];
memcpy(color_map, indices, rows * cols * sizeof(*color_map));
super_block_uvrd(cpi, x, &this_rate_tokenonly,
&this_distortion, &s, &this_sse, bsize, *best_rd);
...
...
@@ -8343,10 +8339,7 @@ static void restore_uv_color_map(VP10_COMP *cpi, MACROBLOCK *x) {
vp10_calc_indices(data, centroids, indices, rows * cols,
pmi->palette_size[1], 2);
for (r = 0; r < rows; ++r)
for (c = 0; c < cols; ++c)
color_map[r * cols + c] = indices[r * cols + c];
memcpy(color_map, indices, rows * cols * sizeof(*color_map));
}
#if CONFIG_EXT_INTRA
...
...
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