--- mem_transfer.c 2005/06/14 13:58:21 1.14 +++ mem_transfer.c 2005/09/13 12:12:15 1.16 @@ -19,7 +19,7 @@ * along with this program ; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: mem_transfer.c,v 1.14 2005/06/14 13:58:21 Skal Exp $ + * $Id: mem_transfer.c,v 1.16 2005/09/13 12:12:15 suxen_drol Exp $ * ****************************************************************************/ @@ -38,6 +38,7 @@ TRANSFER_16TO8ADD_PTR transfer_16to8add; TRANSFER8X8_COPY_PTR transfer8x8_copy; +TRANSFER8X4_COPY_PTR transfer8x4_copy; #define USE_REFERENCE_C @@ -70,7 +71,7 @@ for (j = 0; j < 8; j++) { for (i = 0; i < 8; i++) { dst[j * 8 + i] = (int16_t) src[j * stride + i]; - } + } } } @@ -278,3 +279,27 @@ } } } + +/* + * SRC - the source buffer + * DST - the destination buffer + * + * Then the function does the 8->8 bit transfer and this serie of operations : + * + * SRC (8bit) = SRC + * DST (8bit) = SRC + */ +void +transfer8x4_copy_c(uint8_t * const dst, + const uint8_t * const src, + const uint32_t stride) +{ + uint32_t j; + + for (j = 0; j < 4; j++) { + uint32_t *d= (uint32_t*)(dst + j*stride); + const uint32_t *s = (const uint32_t*)(src + j*stride); + *(d+0) = *(s+0); + *(d+1) = *(s+1); + } +}