19 |
* along with this program ; if not, write to the Free Software |
* along with this program ; if not, write to the Free Software |
20 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 |
* |
* |
22 |
* $Id: mem_transfer.c,v 1.11 2004-07-14 23:26:06 edgomez Exp $ |
* $Id: mem_transfer.c,v 1.12 2004-12-19 13:16:50 syskin Exp $ |
23 |
* |
* |
24 |
****************************************************************************/ |
****************************************************************************/ |
25 |
|
|
34 |
TRANSFER_8TO16SUB_PTR transfer_8to16sub; |
TRANSFER_8TO16SUB_PTR transfer_8to16sub; |
35 |
TRANSFER_8TO16SUBRO_PTR transfer_8to16subro; |
TRANSFER_8TO16SUBRO_PTR transfer_8to16subro; |
36 |
TRANSFER_8TO16SUB2_PTR transfer_8to16sub2; |
TRANSFER_8TO16SUB2_PTR transfer_8to16sub2; |
37 |
|
TRANSFER_8TO16SUB2RO_PTR transfer_8to16sub2ro; |
38 |
TRANSFER_16TO8ADD_PTR transfer_16to8add; |
TRANSFER_16TO8ADD_PTR transfer_16to8add; |
39 |
|
|
40 |
TRANSFER8X8_COPY_PTR transfer8x8_copy; |
TRANSFER8X8_COPY_PTR transfer8x8_copy; |
194 |
} |
} |
195 |
} |
} |
196 |
|
|
197 |
|
void |
198 |
|
transfer_8to16sub2ro_c(int16_t * const dct, |
199 |
|
const uint8_t * const cur, |
200 |
|
const uint8_t * ref1, |
201 |
|
const uint8_t * ref2, |
202 |
|
const uint32_t stride) |
203 |
|
{ |
204 |
|
uint32_t i, j; |
205 |
|
|
206 |
|
for (j = 0; j < 8; j++) { |
207 |
|
for (i = 0; i < 8; i++) { |
208 |
|
uint8_t c = cur[j * stride + i]; |
209 |
|
int r = (ref1[j * stride + i] + ref2[j * stride + i] + 1) / 2; |
210 |
|
dct[j * 8 + i] = (int16_t) c - (int16_t) r; |
211 |
|
} |
212 |
|
} |
213 |
|
} |
214 |
|
|
215 |
|
|
216 |
/* |
/* |
217 |
* SRC - the source buffer |
* SRC - the source buffer |