Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(514)

Side by Side Diff: source/libvpx/vp9/common/vp9_postproc.c

Issue 554673004: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/vp9/common/vp9_onyxc_int.h ('k') | source/libvpx/vp9/common/vp9_reconintra.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 state->last_noise = a; 359 state->last_noise = a;
360 } 360 }
361 361
362 void vp9_plane_add_noise_c(uint8_t *start, char *noise, 362 void vp9_plane_add_noise_c(uint8_t *start, char *noise,
363 char blackclamp[16], 363 char blackclamp[16],
364 char whiteclamp[16], 364 char whiteclamp[16],
365 char bothclamp[16], 365 char bothclamp[16],
366 unsigned int width, unsigned int height, int pitch) { 366 unsigned int width, unsigned int height, int pitch) {
367 unsigned int i, j; 367 unsigned int i, j;
368 368
369 // TODO(jbb): why does simd code use both but c doesn't, normalize and
370 // fix..
371 (void) bothclamp;
369 for (i = 0; i < height; i++) { 372 for (i = 0; i < height; i++) {
370 uint8_t *pos = start + i * pitch; 373 uint8_t *pos = start + i * pitch;
371 char *ref = (char *)(noise + (rand() & 0xff)); // NOLINT 374 char *ref = (char *)(noise + (rand() & 0xff)); // NOLINT
372 375
373 for (j = 0; j < width; j++) { 376 for (j = 0; j < width; j++) {
374 if (pos[j] < blackclamp[0]) 377 if (pos[j] < blackclamp[0])
375 pos[j] = blackclamp[0]; 378 pos[j] = blackclamp[0];
376 379
377 if (pos[j] > 255 + whiteclamp[0]) 380 if (pos[j] > 255 + whiteclamp[0])
378 pos[j] = 255 + whiteclamp[0]; 381 pos[j] = 255 + whiteclamp[0];
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 435
433 /* handle problem with extending borders */ 436 /* handle problem with extending borders */
434 dest->y_width = cm->width; 437 dest->y_width = cm->width;
435 dest->y_height = cm->height; 438 dest->y_height = cm->height;
436 dest->uv_width = dest->y_width >> cm->subsampling_x; 439 dest->uv_width = dest->y_width >> cm->subsampling_x;
437 dest->uv_height = dest->y_height >> cm->subsampling_y; 440 dest->uv_height = dest->y_height >> cm->subsampling_y;
438 441
439 return 0; 442 return 0;
440 } 443 }
441 #endif 444 #endif
OLDNEW
« no previous file with comments | « source/libvpx/vp9/common/vp9_onyxc_int.h ('k') | source/libvpx/vp9/common/vp9_reconintra.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698