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

Side by Side Diff: source/libvpx/vp9/common/vp9_blockd.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_blockd.h ('k') | source/libvpx/vp9/common/vp9_entropy.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) 2014 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2014 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
11 #include "vp9/common/vp9_blockd.h" 11 #include "vp9/common/vp9_blockd.h"
12 12
13 MB_PREDICTION_MODE vp9_left_block_mode(const MODE_INFO *cur_mi, 13 MB_PREDICTION_MODE vp9_left_block_mode(const MODE_INFO *cur_mi,
14 const MODE_INFO *left_mi, int b) { 14 const MODE_INFO *left_mi, int b) {
15 if (b == 0 || b == 2) { 15 if (b == 0 || b == 2) {
16 if (!left_mi || is_inter_block(&left_mi->mbmi)) 16 if (!left_mi || is_inter_block(&left_mi->mbmi))
17 return DC_PRED; 17 return DC_PRED;
18 18
19 return left_mi->mbmi.sb_type < BLOCK_8X8 ? left_mi->bmi[b + 1].as_mode 19 return get_y_mode(left_mi, b + 1);
20 : left_mi->mbmi.mode;
21 } else { 20 } else {
22 assert(b == 1 || b == 3); 21 assert(b == 1 || b == 3);
23 return cur_mi->bmi[b - 1].as_mode; 22 return cur_mi->bmi[b - 1].as_mode;
24 } 23 }
25 } 24 }
26 25
27 MB_PREDICTION_MODE vp9_above_block_mode(const MODE_INFO *cur_mi, 26 MB_PREDICTION_MODE vp9_above_block_mode(const MODE_INFO *cur_mi,
28 const MODE_INFO *above_mi, int b) { 27 const MODE_INFO *above_mi, int b) {
29 if (b == 0 || b == 1) { 28 if (b == 0 || b == 1) {
30 if (!above_mi || is_inter_block(&above_mi->mbmi)) 29 if (!above_mi || is_inter_block(&above_mi->mbmi))
31 return DC_PRED; 30 return DC_PRED;
32 31
33 return above_mi->mbmi.sb_type < BLOCK_8X8 ? above_mi->bmi[b + 2].as_mode 32 return get_y_mode(above_mi, b + 2);
34 : above_mi->mbmi.mode;
35 } else { 33 } else {
36 assert(b == 2 || b == 3); 34 assert(b == 2 || b == 3);
37 return cur_mi->bmi[b - 2].as_mode; 35 return cur_mi->bmi[b - 2].as_mode;
38 } 36 }
39 } 37 }
40 38
41 void vp9_foreach_transformed_block_in_plane( 39 void vp9_foreach_transformed_block_in_plane(
42 const MACROBLOCKD *const xd, BLOCK_SIZE bsize, int plane, 40 const MACROBLOCKD *const xd, BLOCK_SIZE bsize, int plane,
43 foreach_transformed_block_visitor visit, void *arg) { 41 foreach_transformed_block_visitor visit, void *arg) {
44 const struct macroblockd_plane *const pd = &xd->plane[plane]; 42 const struct macroblockd_plane *const pd = &xd->plane[plane];
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 xd->plane[i].subsampling_x = i ? ss_x : 0; 146 xd->plane[i].subsampling_x = i ? ss_x : 0;
149 xd->plane[i].subsampling_y = i ? ss_y : 0; 147 xd->plane[i].subsampling_y = i ? ss_y : 0;
150 } 148 }
151 #if CONFIG_ALPHA 149 #if CONFIG_ALPHA
152 // TODO(jkoleszar): Using the Y w/h for now 150 // TODO(jkoleszar): Using the Y w/h for now
153 xd->plane[3].plane_type = PLANE_TYPE_Y; 151 xd->plane[3].plane_type = PLANE_TYPE_Y;
154 xd->plane[3].subsampling_x = 0; 152 xd->plane[3].subsampling_x = 0;
155 xd->plane[3].subsampling_y = 0; 153 xd->plane[3].subsampling_y = 0;
156 #endif 154 #endif
157 } 155 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/common/vp9_blockd.h ('k') | source/libvpx/vp9/common/vp9_entropy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698