arm: remove duplicate functions
[libvpx.git] / vp8 / common / recon.c
blob0b439e0540d08d6d67ee86f4fc2bda075c8e1d93
1 /*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
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
6 * 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.
9 */
12 #include "vpx_ports/config.h"
13 #include "recon.h"
14 #include "blockd.h"
16 void vp8_recon_b_c
18 unsigned char *pred_ptr,
19 short *diff_ptr,
20 unsigned char *dst_ptr,
21 int stride
24 int r, c;
26 for (r = 0; r < 4; r++)
28 for (c = 0; c < 4; c++)
30 int a = diff_ptr[c] + pred_ptr[c] ;
32 if (a < 0)
33 a = 0;
35 if (a > 255)
36 a = 255;
38 dst_ptr[c] = (unsigned char) a ;
41 dst_ptr += stride;
42 diff_ptr += 16;
43 pred_ptr += 16;
47 void vp8_recon4b_c
49 unsigned char *pred_ptr,
50 short *diff_ptr,
51 unsigned char *dst_ptr,
52 int stride
55 int r, c;
57 for (r = 0; r < 4; r++)
59 for (c = 0; c < 16; c++)
61 int a = diff_ptr[c] + pred_ptr[c] ;
63 if (a < 0)
64 a = 0;
66 if (a > 255)
67 a = 255;
69 dst_ptr[c] = (unsigned char) a ;
72 dst_ptr += stride;
73 diff_ptr += 16;
74 pred_ptr += 16;
78 void vp8_recon2b_c
80 unsigned char *pred_ptr,
81 short *diff_ptr,
82 unsigned char *dst_ptr,
83 int stride
86 int r, c;
88 for (r = 0; r < 4; r++)
90 for (c = 0; c < 8; c++)
92 int a = diff_ptr[c] + pred_ptr[c] ;
94 if (a < 0)
95 a = 0;
97 if (a > 255)
98 a = 255;
100 dst_ptr[c] = (unsigned char) a ;
103 dst_ptr += stride;
104 diff_ptr += 8;
105 pred_ptr += 8;
109 void vp8_recon16x16mby(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x)
111 int i;
113 for (i = 0; i < 16; i += 4)
115 BLOCKD *b = &x->block[i];
117 RECON_INVOKE(rtcd, recon4)(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride);
121 void vp8_recon16x16mb(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x)
123 int i;
125 for (i = 0; i < 16; i += 4)
127 BLOCKD *b = &x->block[i];
129 RECON_INVOKE(rtcd, recon4)(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride);
132 for (i = 16; i < 24; i += 2)
134 BLOCKD *b = &x->block[i];
136 RECON_INVOKE(rtcd, recon2)(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride);