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.
12 #include "vpx_ports/config.h"
18 unsigned char *pred_ptr
,
20 unsigned char *dst_ptr
,
26 for (r
= 0; r
< 4; r
++)
28 for (c
= 0; c
< 4; c
++)
30 int a
= diff_ptr
[c
] + pred_ptr
[c
] ;
38 dst_ptr
[c
] = (unsigned char) a
;
49 unsigned char *pred_ptr
,
51 unsigned char *dst_ptr
,
57 for (r
= 0; r
< 4; r
++)
59 for (c
= 0; c
< 16; c
++)
61 int a
= diff_ptr
[c
] + pred_ptr
[c
] ;
69 dst_ptr
[c
] = (unsigned char) a
;
80 unsigned char *pred_ptr
,
82 unsigned char *dst_ptr
,
88 for (r
= 0; r
< 4; r
++)
90 for (c
= 0; c
< 8; c
++)
92 int a
= diff_ptr
[c
] + pred_ptr
[c
] ;
100 dst_ptr
[c
] = (unsigned char) a
;
109 void vp8_recon_mby_c(const vp8_recon_rtcd_vtable_t
*rtcd
, MACROBLOCKD
*x
)
112 BLOCKD
*b
= &x
->block
[0];
113 RECON_INVOKE(rtcd
, recon4
)(b
->predictor
, b
->diff
, *(b
->base_dst
) + b
->dst
, b
->dst_stride
);
115 /*b = &x->block[4];*/
117 RECON_INVOKE(rtcd
, recon4
)(b
->predictor
, b
->diff
, *(b
->base_dst
) + b
->dst
, b
->dst_stride
);
119 /*b = &x->block[8];*/
121 RECON_INVOKE(rtcd
, recon4
)(b
->predictor
, b
->diff
, *(b
->base_dst
) + b
->dst
, b
->dst_stride
);
123 /*b = &x->block[12];*/
125 RECON_INVOKE(rtcd
, recon4
)(b
->predictor
, b
->diff
, *(b
->base_dst
) + b
->dst
, b
->dst_stride
);
129 for (i
= 0; i
< 16; i
+= 4)
131 BLOCKD
*b
= &x
->block
[i
];
133 RECON_INVOKE(rtcd
, recon4
)(b
->predictor
, b
->diff
, *(b
->base_dst
) + b
->dst
, b
->dst_stride
);
138 void vp8_recon_mb_c(const vp8_recon_rtcd_vtable_t
*rtcd
, MACROBLOCKD
*x
)
141 BLOCKD
*b
= &x
->block
[0];
143 RECON_INVOKE(rtcd
, recon4
)(b
->predictor
, b
->diff
, *(b
->base_dst
) + b
->dst
, b
->dst_stride
);
145 RECON_INVOKE(rtcd
, recon4
)(b
->predictor
, b
->diff
, *(b
->base_dst
) + b
->dst
, b
->dst_stride
);
147 RECON_INVOKE(rtcd
, recon4
)(b
->predictor
, b
->diff
, *(b
->base_dst
) + b
->dst
, b
->dst_stride
);
149 RECON_INVOKE(rtcd
, recon4
)(b
->predictor
, b
->diff
, *(b
->base_dst
) + b
->dst
, b
->dst_stride
);
152 /*b = &x->block[16];*/
154 RECON_INVOKE(rtcd
, recon2
)(b
->predictor
, b
->diff
, *(b
->base_dst
) + b
->dst
, b
->dst_stride
);
157 RECON_INVOKE(rtcd
, recon2
)(b
->predictor
, b
->diff
, *(b
->base_dst
) + b
->dst
, b
->dst_stride
);
160 RECON_INVOKE(rtcd
, recon2
)(b
->predictor
, b
->diff
, *(b
->base_dst
) + b
->dst
, b
->dst_stride
);
163 RECON_INVOKE(rtcd
, recon2
)(b
->predictor
, b
->diff
, *(b
->base_dst
) + b
->dst
, b
->dst_stride
);
167 for (i
= 0; i
< 16; i
+= 4)
169 BLOCKD
*b
= &x
->block
[i
];
171 RECON_INVOKE(rtcd
, recon4
)(b
->predictor
, b
->diff
, *(b
->base_dst
) + b
->dst
, b
->dst_stride
);
174 for (i
= 16; i
< 24; i
+= 2)
176 BLOCKD
*b
= &x
->block
[i
];
178 RECON_INVOKE(rtcd
, recon2
)(b
->predictor
, b
->diff
, *(b
->base_dst
) + b
->dst
, b
->dst_stride
);