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

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

Issue 181493009: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 9 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_reconinter.c ('k') | source/libvpx/vp9/common/vp9_rtcd_defs.sh » ('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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 } 375 }
376 376
377 // TODO(hkuang) do not extend 2*bs pixels for all modes. 377 // TODO(hkuang) do not extend 2*bs pixels for all modes.
378 // above 378 // above
379 if (up_available) { 379 if (up_available) {
380 const uint8_t *above_ref = ref - ref_stride; 380 const uint8_t *above_ref = ref - ref_stride;
381 if (xd->mb_to_right_edge < 0) { 381 if (xd->mb_to_right_edge < 0) {
382 /* slower path if the block needs border extension */ 382 /* slower path if the block needs border extension */
383 if (x0 + 2 * bs <= frame_width) { 383 if (x0 + 2 * bs <= frame_width) {
384 if (right_available && bs == 4) { 384 if (right_available && bs == 4) {
385 vpx_memcpy(above_row - 1, above_ref - 1, 2 * bs + 1); 385 vpx_memcpy(above_row, above_ref, 2 * bs);
386 } else { 386 } else {
387 vpx_memcpy(above_row - 1, above_ref - 1, bs + 1); 387 vpx_memcpy(above_row, above_ref, bs);
388 vpx_memset(above_row + bs, above_row[bs - 1], bs); 388 vpx_memset(above_row + bs, above_row[bs - 1], bs);
389 } 389 }
390 } else if (x0 + bs <= frame_width) { 390 } else if (x0 + bs <= frame_width) {
391 const int r = frame_width - x0; 391 const int r = frame_width - x0;
392 if (right_available && bs == 4) { 392 if (right_available && bs == 4) {
393 vpx_memcpy(above_row - 1, above_ref - 1, r + 1); 393 vpx_memcpy(above_row, above_ref, r);
394 vpx_memset(above_row + r, above_row[r - 1], 394 vpx_memset(above_row + r, above_row[r - 1],
395 x0 + 2 * bs - frame_width); 395 x0 + 2 * bs - frame_width);
396 } else { 396 } else {
397 vpx_memcpy(above_row - 1, above_ref - 1, bs + 1); 397 vpx_memcpy(above_row, above_ref, bs);
398 vpx_memset(above_row + bs, above_row[bs - 1], bs); 398 vpx_memset(above_row + bs, above_row[bs - 1], bs);
399 } 399 }
400 } else if (x0 <= frame_width) { 400 } else if (x0 <= frame_width) {
401 const int r = frame_width - x0; 401 const int r = frame_width - x0;
402 if (right_available && bs == 4) { 402 if (right_available && bs == 4) {
403 vpx_memcpy(above_row - 1, above_ref - 1, r + 1); 403 vpx_memcpy(above_row, above_ref, r);
404 vpx_memset(above_row + r, above_row[r - 1], 404 vpx_memset(above_row + r, above_row[r - 1],
405 x0 + 2 * bs - frame_width); 405 x0 + 2 * bs - frame_width);
406 } else { 406 } else {
407 vpx_memcpy(above_row - 1, above_ref - 1, r + 1); 407 vpx_memcpy(above_row, above_ref, r);
408 vpx_memset(above_row + r, above_row[r - 1], 408 vpx_memset(above_row + r, above_row[r - 1],
409 x0 + 2 * bs - frame_width); 409 x0 + 2 * bs - frame_width);
410 } 410 }
411 above_row[-1] = left_available ? above_ref[-1] : 129;
412 } 411 }
412 above_row[-1] = left_available ? above_ref[-1] : 129;
413 } else { 413 } else {
414 /* faster path if the block does not need extension */ 414 /* faster path if the block does not need extension */
415 if (bs == 4 && right_available && left_available) { 415 if (bs == 4 && right_available && left_available) {
416 const_above_row = above_ref; 416 const_above_row = above_ref;
417 } else { 417 } else {
418 vpx_memcpy(above_row, above_ref, bs); 418 vpx_memcpy(above_row, above_ref, bs);
419 if (bs == 4 && right_available) 419 if (bs == 4 && right_available)
420 vpx_memcpy(above_row + bs, above_ref + bs, bs); 420 vpx_memcpy(above_row + bs, above_ref + bs, bs);
421 else 421 else
422 vpx_memset(above_row + bs, above_row[bs - 1], bs); 422 vpx_memset(above_row + bs, above_row[bs - 1], bs);
(...skipping 24 matching lines...) Expand all
447 const int have_top = (block_idx >> bwl) || xd->up_available; 447 const int have_top = (block_idx >> bwl) || xd->up_available;
448 const int have_left = (block_idx & wmask) || xd->left_available; 448 const int have_left = (block_idx & wmask) || xd->left_available;
449 const int have_right = ((block_idx & wmask) != wmask); 449 const int have_right = ((block_idx & wmask) != wmask);
450 const int x = aoff * 4; 450 const int x = aoff * 4;
451 const int y = loff * 4; 451 const int y = loff * 4;
452 452
453 assert(bwl >= 0); 453 assert(bwl >= 0);
454 build_intra_predictors(xd, ref, ref_stride, dst, dst_stride, mode, tx_size, 454 build_intra_predictors(xd, ref, ref_stride, dst, dst_stride, mode, tx_size,
455 have_top, have_left, have_right, x, y, plane); 455 have_top, have_left, have_right, x, y, plane);
456 } 456 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/common/vp9_reconinter.c ('k') | source/libvpx/vp9/common/vp9_rtcd_defs.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698