vp9_reconintra4x4.c 15.3 KB
Newer Older
John Koleszar's avatar
John Koleszar committed
1
/*
2
 *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
John Koleszar's avatar
John Koleszar committed
3
 *
4
 *  Use of this source code is governed by a BSD-style license
5
6
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
7
 *  in the file PATENTS.  All contributing project authors may
8
 *  be found in the AUTHORS file in the root of the source tree.
John Koleszar's avatar
John Koleszar committed
9
10
11
 */


12
#include "./vpx_config.h"
John Koleszar's avatar
John Koleszar committed
13
#include "vpx_mem/vpx_mem.h"
14
#include "vp9/common/vp9_reconintra.h"
15
#include "vp9_rtcd.h"
John Koleszar's avatar
John Koleszar committed
16

17
#if CONFIG_NEWBINTRAMODES
18
static int find_grad_measure(uint8_t *x, int stride, int n, int tx, int ty,
19
20
21
22
                             int dx, int dy) {
  int i, j;
  int count = 0, gsum = 0, gdiv;
  /* TODO: Make this code more efficient by breaking up into two loops */
23
24
  for (i = -ty; i < n; ++i)
    for (j = -tx; j < n; ++j) {
25
26
27
      int g;
      if (i >= 0 && j >= 0) continue;
      if (i + dy >= 0 && j + dx >= 0) continue;
28
      if (i + dy < -ty || i + dy >= n || j + dx < -tx || j + dx >= n) continue;
29
30
31
32
33
34
35
36
37
      g = abs(x[(i + dy) * stride + j + dx] - x[i * stride + j]);
      gsum += g * g;
      count++;
    }
  gdiv = (dx * dx + dy * dy) * count;
  return ((gsum << 8) + (gdiv >> 1)) / gdiv;
}

#if CONTEXT_PRED_REPLACEMENTS == 6
38
B_PREDICTION_MODE vp9_find_dominant_direction(uint8_t *ptr,
39
40
                                              int stride, int n,
                                              int tx, int ty) {
41
  int g[8], i, imin, imax;
42
43
44
45
46
47
  g[1] = find_grad_measure(ptr, stride, n, tx, ty,  2, 1);
  g[2] = find_grad_measure(ptr, stride, n, tx, ty,  1, 1);
  g[3] = find_grad_measure(ptr, stride, n, tx, ty,  1, 2);
  g[5] = find_grad_measure(ptr, stride, n, tx, ty, -1, 2);
  g[6] = find_grad_measure(ptr, stride, n, tx, ty, -1, 1);
  g[7] = find_grad_measure(ptr, stride, n, tx, ty, -2, 1);
48
49
50
51
52
53
54
55
56
57
58
59
  imin = 1;
  for (i = 2; i < 8; i += 1 + (i == 3))
    imin = (g[i] < g[imin] ? i : imin);
  imax = 1;
  for (i = 2; i < 8; i += 1 + (i == 3))
    imax = (g[i] > g[imax] ? i : imax);
  /*
  printf("%d %d %d %d %d %d = %d %d\n",
         g[1], g[2], g[3], g[5], g[6], g[7], imin, imax);
         */
  switch (imin) {
    case 1:
Yaowu Xu's avatar
Yaowu Xu committed
60
      return B_D153_PRED;
61
    case 2:
Yaowu Xu's avatar
Yaowu Xu committed
62
      return B_D135_PRED;
63
    case 3:
Yaowu Xu's avatar
Yaowu Xu committed
64
      return B_D117_PRED;
65
    case 5:
Yaowu Xu's avatar
Yaowu Xu committed
66
      return B_D63_PRED;
67
    case 6:
Yaowu Xu's avatar
Yaowu Xu committed
68
      return B_D45_PRED;
69
    case 7:
Yaowu Xu's avatar
Yaowu Xu committed
70
      return B_D27_PRED;
71
72
73
74
75
    default:
      assert(0);
  }
}
#elif CONTEXT_PRED_REPLACEMENTS == 4
76
B_PREDICTION_MODE vp9_find_dominant_direction(uint8_t *ptr,
77
78
                                              int stride, int n,
                                              int tx, int ty) {
79
  int g[8], i, imin, imax;
80
81
82
83
  g[1] = find_grad_measure(ptr, stride, n, tx, ty,  2, 1);
  g[3] = find_grad_measure(ptr, stride, n, tx, ty,  1, 2);
  g[5] = find_grad_measure(ptr, stride, n, tx, ty, -1, 2);
  g[7] = find_grad_measure(ptr, stride, n, tx, ty, -2, 1);
84
85
86
87
88
89
90
91
92
93
94
95
  imin = 1;
  for (i = 3; i < 8; i+=2)
    imin = (g[i] < g[imin] ? i : imin);
  imax = 1;
  for (i = 3; i < 8; i+=2)
    imax = (g[i] > g[imax] ? i : imax);
  /*
  printf("%d %d %d %d = %d %d\n",
         g[1], g[3], g[5], g[7], imin, imax);
         */
  switch (imin) {
    case 1:
Yaowu Xu's avatar
Yaowu Xu committed
96
      return B_D153_PRED;
97
    case 3:
Yaowu Xu's avatar
Yaowu Xu committed
98
      return B_D117_PRED;
99
    case 5:
Yaowu Xu's avatar
Yaowu Xu committed
100
      return B_D63_PRED;
101
    case 7:
Yaowu Xu's avatar
Yaowu Xu committed
102
      return B_D27_PRED;
103
104
105
106
107
    default:
      assert(0);
  }
}
#elif CONTEXT_PRED_REPLACEMENTS == 0
108
B_PREDICTION_MODE vp9_find_dominant_direction(uint8_t *ptr,
109
110
                                              int stride, int n,
                                              int tx, int ty) {
Jim Bankoski's avatar
Jim Bankoski committed
111
  int g[8], i, imin, imax;
112
113
114
115
116
117
118
119
  g[0] = find_grad_measure(ptr, stride, n, tx, ty,  1, 0);
  g[1] = find_grad_measure(ptr, stride, n, tx, ty,  2, 1);
  g[2] = find_grad_measure(ptr, stride, n, tx, ty,  1, 1);
  g[3] = find_grad_measure(ptr, stride, n, tx, ty,  1, 2);
  g[4] = find_grad_measure(ptr, stride, n, tx, ty,  0, 1);
  g[5] = find_grad_measure(ptr, stride, n, tx, ty, -1, 2);
  g[6] = find_grad_measure(ptr, stride, n, tx, ty, -1, 1);
  g[7] = find_grad_measure(ptr, stride, n, tx, ty, -2, 1);
120
121
122
123
124
125
126
127
128
  imax = 0;
  for (i = 1; i < 8; i++)
    imax = (g[i] > g[imax] ? i : imax);
  imin = 0;
  for (i = 1; i < 8; i++)
    imin = (g[i] < g[imin] ? i : imin);

  switch (imin) {
    case 0:
Yaowu Xu's avatar
Yaowu Xu committed
129
      return B_H_PRED;
130
    case 1:
Yaowu Xu's avatar
Yaowu Xu committed
131
      return B_D153_PRED;
132
    case 2:
Yaowu Xu's avatar
Yaowu Xu committed
133
      return B_D135_PRED;
134
    case 3:
Yaowu Xu's avatar
Yaowu Xu committed
135
      return B_D117_PRED;
136
    case 4:
Yaowu Xu's avatar
Yaowu Xu committed
137
      return B_V_PRED;
138
    case 5:
Yaowu Xu's avatar
Yaowu Xu committed
139
      return B_D63_PRED;
140
    case 6:
Yaowu Xu's avatar
Yaowu Xu committed
141
      return B_D45_PRED;
142
    case 7:
Yaowu Xu's avatar
Yaowu Xu committed
143
      return B_D27_PRED;
144
145
146
147
148
149
    default:
      assert(0);
  }
}
#endif

150
151
152
153
B_PREDICTION_MODE vp9_find_bpred_context(MACROBLOCKD *xd, BLOCKD *x) {
  const int block_idx = x - xd->block;
  const int have_top = (block_idx >> 2) || xd->up_available;
  const int have_left = (block_idx & 3)  || xd->left_available;
154
  uint8_t *ptr = *(x->base_dst) + x->dst;
155
  int stride = x->dst_stride;
156
157
158
159
160
  int tx = have_left ? 4 : 0;
  int ty = have_top ? 4 : 0;
  if (!have_left && !have_top)
    return B_DC_PRED;
  return vp9_find_dominant_direction(ptr, stride, 4, tx, ty);
161
162
163
}
#endif

164
165
void vp9_intra4x4_predict(MACROBLOCKD *xd,
                          BLOCKD *x,
166
                          int b_mode,
167
168
                          uint8_t *predictor,
                          int ps) {
John Koleszar's avatar
John Koleszar committed
169
  int i, r, c;
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
  const int block_idx = x - xd->block;
  const int have_top = (block_idx >> 2) || xd->up_available;
  const int have_left = (block_idx & 3)  || xd->left_available;
  const int have_right = (block_idx & 3) != 3 || xd->right_available;
  uint8_t left[4], above[8], top_left;
  /*
   * 127 127 127 .. 127 127 127 127 127 127
   * 129  A   B  ..  Y   Z
   * 129  C   D  ..  W   X
   * 129  E   F  ..  U   V
   * 129  G   H  ..  S   T   T   T   T   T
   *  ..
   */

  if (have_left) {
    uint8_t *left_ptr = *(x->base_dst) + x->dst - 1;
    const int stride = x->dst_stride;

    left[0] = left_ptr[0 * stride];
    left[1] = left_ptr[1 * stride];
    left[2] = left_ptr[2 * stride];
    left[3] = left_ptr[3 * stride];
  } else {
    left[0] = left[1] = left[2] = left[3] = 129;
  }

  if (have_top) {
    uint8_t *above_ptr = *(x->base_dst) + x->dst - x->dst_stride;
198
    top_left = have_left ? above_ptr[-1] : 127;
John Koleszar's avatar
John Koleszar committed
199

200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
    above[0] = above_ptr[0];
    above[1] = above_ptr[1];
    above[2] = above_ptr[2];
    above[3] = above_ptr[3];
    if (((block_idx & 3) != 3) ||
        (have_right && block_idx == 3 &&
         ((xd->mb_index != 3 && xd->sb_index != 3) ||
          ((xd->mb_index & 1) == 0 && xd->sb_index == 3)))) {
      above[4] = above_ptr[4];
      above[5] = above_ptr[5];
      above[6] = above_ptr[6];
      above[7] = above_ptr[7];
    } else if (have_right) {
      uint8_t *above_right = above_ptr + 4;

      if (xd->sb_index == 3 && (xd->mb_index & 1))
        above_right -= 32 * x->dst_stride;
      if (xd->mb_index == 3)
        above_right -= 16 * x->dst_stride;
      above_right -= (block_idx & ~3) * x->dst_stride;

      /* use a more distant above-right (from closest available top-right
       * corner), but with a "localized DC" (similar'ish to TM-pred):
       *
       *  A   B   C   D   E   F   G   H
       *  I   J   K   L
       *  M   N   O   P
       *  Q   R   S   T
       *  U   V   W   X   x1  x2  x3  x4
       *
       * Where:
       * x1 = clip_pixel(E + X - D)
       * x2 = clip_pixel(F + X - D)
       * x3 = clip_pixel(G + X - D)
       * x4 = clip_pixel(H + X - D)
       *
       * This is applied anytime when we use a "distant" above-right edge
       * that is not immediately top-right to the block that we're going
       * to do intra prediction for.
       */
      above[4] = clip_pixel(above_right[0] + above_ptr[3] - above_right[-1]);
      above[5] = clip_pixel(above_right[1] + above_ptr[3] - above_right[-1]);
      above[6] = clip_pixel(above_right[2] + above_ptr[3] - above_right[-1]);
      above[7] = clip_pixel(above_right[3] + above_ptr[3] - above_right[-1]);
    } else {
      // extend edge
      above[4] = above[5] = above[6] = above[7] = above[3];
    }
  } else {
    above[0] = above[1] = above[2] = above[3] = 127;
    above[4] = above[5] = above[6] = above[7] = 127;
    top_left = 127;
  }
John Koleszar's avatar
John Koleszar committed
253

254
255
256
257
258
#if CONFIG_NEWBINTRAMODES
  if (b_mode == B_CONTEXT_PRED)
    b_mode = x->bmi.as_mode.context;
#endif

John Koleszar's avatar
John Koleszar committed
259
260
  switch (b_mode) {
    case B_DC_PRED: {
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
      int expected_dc = 128;
      if (have_top || have_left) {
        int average = 0;
        int count = 0;
        if (have_top) {
          for (i = 0; i < 4; i++)
            average += above[i];
          count += 4;
        }
        if (have_left) {
          for (i = 0; i < 4; i++)
            average += left[i];
          count += 4;
        }
        expected_dc = (average + (count >> 1)) / count;
John Koleszar's avatar
John Koleszar committed
276
277
      }
      for (r = 0; r < 4; r++) {
278
        for (c = 0; c < 4; c++)
John Koleszar's avatar
John Koleszar committed
279
          predictor[c] = expected_dc;
280
        predictor += ps;
John Koleszar's avatar
John Koleszar committed
281
      }
John Koleszar's avatar
John Koleszar committed
282
283
    }
    break;
John Koleszar's avatar
John Koleszar committed
284
285
286
    case B_TM_PRED: {
      /* prediction similar to true_motion prediction */
      for (r = 0; r < 4; r++) {
287
        for (c = 0; c < 4; c++)
288
          predictor[c] = clip_pixel(above[c] - top_left + left[r]);
289
        predictor += ps;
John Koleszar's avatar
John Koleszar committed
290
      }
John Koleszar's avatar
John Koleszar committed
291
292
    }
    break;
293
    case B_V_PRED:
John Koleszar's avatar
John Koleszar committed
294
      for (r = 0; r < 4; r++) {
295
296
        for (c = 0; c < 4; c++)
          predictor[c] = above[c];
297
        predictor += ps;
John Koleszar's avatar
John Koleszar committed
298
      }
299
300
      break;
    case B_H_PRED:
John Koleszar's avatar
John Koleszar committed
301
      for (r = 0; r < 4; r++) {
302
303
        for (c = 0; c < 4; c++)
          predictor[c] = left[r];
304
        predictor += ps;
John Koleszar's avatar
John Koleszar committed
305
      }
306
      break;
Yaowu Xu's avatar
Yaowu Xu committed
307
    case B_D45_PRED: {
308
      uint8_t *p = above;
309

310
      predictor[0 * ps + 0] = ROUND_POWER_OF_TWO(p[0] + p[1] * 2 + p[2], 2);
311
      predictor[0 * ps + 1] =
312
        predictor[1 * ps + 0] = ROUND_POWER_OF_TWO(p[1] + p[2] * 2 + p[3], 2);
313
314
      predictor[0 * ps + 2] =
        predictor[1 * ps + 1] =
315
          predictor[2 * ps + 0] = ROUND_POWER_OF_TWO(p[2] + p[3] * 2 + p[4], 2);
316
317
318
      predictor[0 * ps + 3] =
        predictor[1 * ps + 2] =
          predictor[2 * ps + 1] =
319
320
            predictor[3 * ps + 0] =
              ROUND_POWER_OF_TWO(p[3] + p[4] * 2 + p[5], 2);
321
322
      predictor[1 * ps + 3] =
        predictor[2 * ps + 2] =
323
          predictor[3 * ps + 1] = ROUND_POWER_OF_TWO(p[4] + p[5] * 2 + p[6], 2);
324
      predictor[2 * ps + 3] =
325
326
        predictor[3 * ps + 2] = ROUND_POWER_OF_TWO(p[5] + p[6] * 2 + p[7], 2);
      predictor[3 * ps + 3] = ROUND_POWER_OF_TWO(p[6] + p[7] * 2 + p[7], 2);
John Koleszar's avatar
John Koleszar committed
327
328
329

    }
    break;
Yaowu Xu's avatar
Yaowu Xu committed
330
    case B_D135_PRED: {
331
332
333
      uint8_t p[9] = { left[3], left[2], left[1], left[0],
                       top_left,
                       above[0], above[1], above[2], above[3] };
John Koleszar's avatar
John Koleszar committed
334

335
      predictor[3 * ps + 0] = ROUND_POWER_OF_TWO(p[0] + p[1] * 2 + p[2], 2);
336
      predictor[3 * ps + 1] =
337
        predictor[2 * ps + 0] = ROUND_POWER_OF_TWO(p[1] + p[2] * 2 + p[3], 2);
338
339
      predictor[3 * ps + 2] =
        predictor[2 * ps + 1] =
340
          predictor[1 * ps + 0] = ROUND_POWER_OF_TWO(p[2] + p[3] * 2 + p[4], 2);
341
342
343
      predictor[3 * ps + 3] =
        predictor[2 * ps + 2] =
          predictor[1 * ps + 1] =
344
345
            predictor[0 * ps + 0] =
              ROUND_POWER_OF_TWO(p[3] + p[4] * 2 + p[5], 2);
346
347
      predictor[2 * ps + 3] =
        predictor[1 * ps + 2] =
348
          predictor[0 * ps + 1] = ROUND_POWER_OF_TWO(p[4] + p[5] * 2 + p[6], 2);
349
      predictor[1 * ps + 3] =
350
351
        predictor[0 * ps + 2] = ROUND_POWER_OF_TWO(p[5] + p[6] * 2 + p[7], 2);
      predictor[0 * ps + 3] = ROUND_POWER_OF_TWO(p[6] + p[7] * 2 + p[8], 2);
John Koleszar's avatar
John Koleszar committed
352
353
354

    }
    break;
Yaowu Xu's avatar
Yaowu Xu committed
355
    case B_D117_PRED: {
356
357
358
      uint8_t p[9] = { left[3], left[2], left[1], left[0],
                       top_left,
                       above[0], above[1], above[2], above[3] };
John Koleszar's avatar
John Koleszar committed
359

360
361
      predictor[3 * ps + 0] = ROUND_POWER_OF_TWO(p[1] + p[2] * 2 + p[3], 2);
      predictor[2 * ps + 0] = ROUND_POWER_OF_TWO(p[2] + p[3] * 2 + p[4], 2);
362
      predictor[3 * ps + 1] =
363
        predictor[1 * ps + 0] = ROUND_POWER_OF_TWO(p[3] + p[4] * 2 + p[5], 2);
364
      predictor[2 * ps + 1] =
365
        predictor[0 * ps + 0] = ROUND_POWER_OF_TWO(p[4] + p[5], 1);
366
      predictor[3 * ps + 2] =
367
        predictor[1 * ps + 1] = ROUND_POWER_OF_TWO(p[4] + p[5] * 2 + p[6], 2);
368
      predictor[2 * ps + 2] =
369
        predictor[0 * ps + 1] = ROUND_POWER_OF_TWO(p[5] + p[6], 1);
370
      predictor[3 * ps + 3] =
371
        predictor[1 * ps + 2] = ROUND_POWER_OF_TWO(p[5] + p[6] * 2 + p[7], 2);
372
      predictor[2 * ps + 3] =
373
374
375
        predictor[0 * ps + 2] = ROUND_POWER_OF_TWO(p[6] + p[7], 1);
      predictor[1 * ps + 3] = ROUND_POWER_OF_TWO(p[6] + p[7] * 2 + p[8], 2);
      predictor[0 * ps + 3] = ROUND_POWER_OF_TWO(p[7] + p[8], 1);
John Koleszar's avatar
John Koleszar committed
376

John Koleszar's avatar
John Koleszar committed
377
378
    }
    break;
Yaowu Xu's avatar
Yaowu Xu committed
379
    case B_D63_PRED: {
380
      uint8_t *p = above;
John Koleszar's avatar
John Koleszar committed
381

382
383
      predictor[0 * ps + 0] = ROUND_POWER_OF_TWO(p[0] + p[1], 1);
      predictor[1 * ps + 0] = ROUND_POWER_OF_TWO(p[0] + p[1] * 2 + p[2], 2);
384
      predictor[2 * ps + 0] =
385
        predictor[0 * ps + 1] = ROUND_POWER_OF_TWO(p[1] + p[2], 1);
386
      predictor[1 * ps + 1] =
387
        predictor[3 * ps + 0] = ROUND_POWER_OF_TWO(p[1] + p[2] * 2 + p[3], 2);
388
      predictor[2 * ps + 1] =
389
        predictor[0 * ps + 2] = ROUND_POWER_OF_TWO(p[2] + p[3], 1);
390
      predictor[3 * ps + 1] =
391
        predictor[1 * ps + 2] = ROUND_POWER_OF_TWO(p[2] + p[3] * 2 + p[4], 2);
392
      predictor[0 * ps + 3] =
393
        predictor[2 * ps + 2] = ROUND_POWER_OF_TWO(p[3] + p[4], 1);
394
      predictor[1 * ps + 3] =
395
396
397
        predictor[3 * ps + 2] = ROUND_POWER_OF_TWO(p[3] + p[4] * 2 + p[5], 2);
      predictor[2 * ps + 3] = ROUND_POWER_OF_TWO(p[4] + p[5] * 2 + p[6], 2);
      predictor[3 * ps + 3] = ROUND_POWER_OF_TWO(p[5] + p[6] * 2 + p[7], 2);
John Koleszar's avatar
John Koleszar committed
398
399
    }
    break;
Yaowu Xu's avatar
Yaowu Xu committed
400
    case B_D153_PRED: {
401
402
403
      uint8_t p[9] = { left[3], left[2], left[1], left[0],
                       top_left,
                       above[0], above[1], above[2], above[3] };
John Koleszar's avatar
John Koleszar committed
404

405
406
      predictor[3 * ps + 0] = ROUND_POWER_OF_TWO(p[0] + p[1], 1);
      predictor[3 * ps + 1] = ROUND_POWER_OF_TWO(p[0] + p[1] * 2 + p[2], 2);
407
      predictor[2 * ps + 0] =
408
        predictor[3 * ps + 2] = ROUND_POWER_OF_TWO(p[1] + p[2], 1);
409
      predictor[2 * ps + 1] =
410
        predictor[3 * ps + 3] = ROUND_POWER_OF_TWO(p[1] + p[2] * 2 + p[3], 2);
411
      predictor[2 * ps + 2] =
412
        predictor[1 * ps + 0] = ROUND_POWER_OF_TWO(p[2] + p[3], 1);
413
      predictor[2 * ps + 3] =
414
        predictor[1 * ps + 1] = ROUND_POWER_OF_TWO(p[2] + p[3] * 2 + p[4], 2);
415
      predictor[1 * ps + 2] =
416
        predictor[0 * ps + 0] = ROUND_POWER_OF_TWO(p[3] + p[4], 1);
417
      predictor[1 * ps + 3] =
418
419
420
        predictor[0 * ps + 1] = ROUND_POWER_OF_TWO(p[3] + p[4] * 2 + p[5], 2);
      predictor[0 * ps + 2] = ROUND_POWER_OF_TWO(p[4] + p[5] * 2 + p[6], 2);
      predictor[0 * ps + 3] = ROUND_POWER_OF_TWO(p[5] + p[6] * 2 + p[7], 2);
John Koleszar's avatar
John Koleszar committed
421
422
    }
    break;
Yaowu Xu's avatar
Yaowu Xu committed
423
    case B_D27_PRED: {
424
425
426
      uint8_t *p = left;
      predictor[0 * ps + 0] = ROUND_POWER_OF_TWO(p[0] + p[1], 1);
      predictor[0 * ps + 1] = ROUND_POWER_OF_TWO(p[0] + p[1] * 2 + p[2], 2);
427
      predictor[0 * ps + 2] =
428
        predictor[1 * ps + 0] = ROUND_POWER_OF_TWO(p[1] + p[2], 1);
429
      predictor[0 * ps + 3] =
430
        predictor[1 * ps + 1] = ROUND_POWER_OF_TWO(p[1] + p[2] * 2 + p[3], 2);
431
      predictor[1 * ps + 2] =
432
        predictor[2 * ps + 0] = ROUND_POWER_OF_TWO(p[2] + p[3], 1);
433
      predictor[1 * ps + 3] =
434
        predictor[2 * ps + 1] = ROUND_POWER_OF_TWO(p[2] + p[3] * 2 + p[3], 2);
435
436
437
438
439
      predictor[2 * ps + 2] =
        predictor[2 * ps + 3] =
          predictor[3 * ps + 0] =
            predictor[3 * ps + 1] =
              predictor[3 * ps + 2] =
440
                predictor[3 * ps + 3] = p[3];
John Koleszar's avatar
John Koleszar committed
441
442
443
    }
    break;

444
445
446
447
448
#if CONFIG_NEWBINTRAMODES
    case B_CONTEXT_PRED:
    break;
    /*
    case B_CORNER_PRED:
449
    corner_predictor(predictor, 16, 4, above, left);
450
451
452
    break;
    */
#endif
John Koleszar's avatar
John Koleszar committed
453
  }
John Koleszar's avatar
John Koleszar committed
454
}