diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-06-05 14:27:54 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-06-05 14:27:54 +0000 |
commit | 6a09e8e2ed913cb44d74cac9c9e7a4cf7f4a18c1 (patch) | |
tree | ef08af22a70727d8ee9a902f622cf1d5042f5344 /libmpcodecs | |
parent | ac87b4a173d2aee564e7cdca3037f101d946fbad (diff) |
Replace implicit use of fast_memcpy via macro by explicit use to allow
for future optimization.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23475 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/ad_mpc.c | 2 | ||||
-rw-r--r-- | libmpcodecs/native/nuppelvideo.c | 6 | ||||
-rw-r--r-- | libmpcodecs/vd_mpng.c | 2 | ||||
-rw-r--r-- | libmpcodecs/vd_mtga.c | 10 | ||||
-rw-r--r-- | libmpcodecs/vf_bmovl.c | 6 | ||||
-rw-r--r-- | libmpcodecs/vf_detc.c | 2 | ||||
-rw-r--r-- | libmpcodecs/vf_down3dright.c | 2 | ||||
-rw-r--r-- | libmpcodecs/vf_filmdint.c | 12 | ||||
-rw-r--r-- | libmpcodecs/vf_fspp.c | 12 | ||||
-rw-r--r-- | libmpcodecs/vf_il.c | 12 | ||||
-rw-r--r-- | libmpcodecs/vf_ivtc.c | 2 | ||||
-rw-r--r-- | libmpcodecs/vf_kerndeint.c | 12 | ||||
-rw-r--r-- | libmpcodecs/vf_noise.c | 4 | ||||
-rw-r--r-- | libmpcodecs/vf_phase.c | 4 | ||||
-rw-r--r-- | libmpcodecs/vf_pp7.c | 6 | ||||
-rw-r--r-- | libmpcodecs/vf_pullup.c | 10 | ||||
-rw-r--r-- | libmpcodecs/vf_softpulldown.c | 2 | ||||
-rw-r--r-- | libmpcodecs/vf_spp.c | 8 | ||||
-rw-r--r-- | libmpcodecs/vf_telecine.c | 2 | ||||
-rw-r--r-- | libmpcodecs/vf_tfields.c | 26 | ||||
-rw-r--r-- | libmpcodecs/vf_tinterlace.c | 2 | ||||
-rw-r--r-- | libmpcodecs/vf_unsharp.c | 4 | ||||
-rw-r--r-- | libmpcodecs/vf_uspp.c | 6 | ||||
-rw-r--r-- | libmpcodecs/vf_yadif.c | 4 | ||||
-rw-r--r-- | libmpcodecs/vf_yvu9.c | 2 |
25 files changed, 80 insertions, 80 deletions
diff --git a/libmpcodecs/ad_mpc.c b/libmpcodecs/ad_mpc.c index e91998df7b..435a6cb0e5 100644 --- a/libmpcodecs/ad_mpc.c +++ b/libmpcodecs/ad_mpc.c @@ -54,7 +54,7 @@ static mpc_int32_t cb_read(void *data, void *buf, mpc_int32_t size) { if (d->pos < d->header_len) { if (s > d->header_len - d->pos) s = d->header_len - d->pos; - memcpy(p, &d->header[d->pos], s); + fast_memcpy(p, &d->header[d->pos], s); } else s = 0; memset(&p[s], 0, size - s); diff --git a/libmpcodecs/native/nuppelvideo.c b/libmpcodecs/native/nuppelvideo.c index c7d88eca66..cac116f3eb 100644 --- a/libmpcodecs/native/nuppelvideo.c +++ b/libmpcodecs/native/nuppelvideo.c @@ -67,7 +67,7 @@ void decode_nuv( unsigned char *encoded, int encoded_size, switch(encodedh->comptype) { case '0': /* raw YUV420 */ - memcpy(decoded, encoded + 12, out_len); + fast_memcpy(decoded, encoded + 12, out_len); break; case '1': /* RTJpeg */ RTjpeg_decompressYUV420 ( ( __s8 * ) encoded + 12, decoded ); @@ -102,13 +102,13 @@ void decode_nuv( unsigned char *encoded, int encoded_size, break; case 'L': /* copy last frame */ #ifdef KEEP_BUFFER - memcpy ( decoded, previous_buffer, width*height*3/2); + fast_memcpy ( decoded, previous_buffer, width*height*3/2); #endif break; } #ifdef KEEP_BUFFER - memcpy(previous_buffer, decoded, width*height*3/2); + fast_memcpy(previous_buffer, decoded, width*height*3/2); #endif break; } diff --git a/libmpcodecs/vd_mpng.c b/libmpcodecs/vd_mpng.c index d8725f7c08..f4af973e8d 100644 --- a/libmpcodecs/vd_mpng.c +++ b/libmpcodecs/vd_mpng.c @@ -58,7 +58,7 @@ static void pngReadFN( png_structp pngstr,png_bytep buffer,png_size_t size ) { char * p = pngstr->io_ptr; if(size>pngLength-pngPointer && pngLength>=pngPointer) size=pngLength-pngPointer; - memcpy( buffer,(char *)&p[pngPointer],size ); + fast_memcpy( buffer,(char *)&p[pngPointer],size ); pngPointer+=size; } diff --git a/libmpcodecs/vd_mtga.c b/libmpcodecs/vd_mtga.c index a328ab037c..f9f2301da2 100644 --- a/libmpcodecs/vd_mtga.c +++ b/libmpcodecs/vd_mtga.c @@ -110,20 +110,20 @@ static void decode_rle_tga(TGAInfo *info, unsigned char *data, mp_image_t *mpi) if (packet_header & 0x80) /* runlength encoded packet */ { - memcpy(final, data, num_bytes); + fast_memcpy(final, data, num_bytes); // Note: this will be slow when DR to vram! i=num_bytes; while(2*i<=replen){ - memcpy(final+i,final,i); + fast_memcpy(final+i,final,i); i*=2; } - memcpy(final+i,final,replen-i); + fast_memcpy(final+i,final,replen-i); data += num_bytes; } else /* raw packet */ { - memcpy(final, data, replen); + fast_memcpy(final, data, replen); data += replen; } @@ -144,7 +144,7 @@ static void decode_uncompressed_tga(TGAInfo *info, unsigned char *data, mp_image for (row = info->start_row; (!info->origin && row) || (info->origin && row < info->height); row += info->increment) { final = mpi->planes[0] + mpi->stride[0] * row; - memcpy(final, data, info->width * num_bytes); + fast_memcpy(final, data, info->width * num_bytes); data += info->width * num_bytes; } diff --git a/libmpcodecs/vf_bmovl.c b/libmpcodecs/vf_bmovl.c index 90b6ccd15e..ef7ce19ce9 100644 --- a/libmpcodecs/vf_bmovl.c +++ b/libmpcodecs/vf_bmovl.c @@ -388,14 +388,14 @@ put_image(struct vf_instance_s* vf, mp_image_t* mpi, double pts){ if(vf->priv->opaque) { // Just copy buffer memory to screen for( ypos=vf->priv->y1 ; ypos < vf->priv->y2 ; ypos++ ) { - memcpy( dmpi->planes[0] + (ypos*dmpi->stride[0]) + vf->priv->x1, + fast_memcpy( dmpi->planes[0] + (ypos*dmpi->stride[0]) + vf->priv->x1, vf->priv->bitmap.y + (ypos*vf->priv->w) + vf->priv->x1, vf->priv->x2 - vf->priv->x1 ); if(ypos%2) { - memcpy( dmpi->planes[1] + ((ypos/2)*dmpi->stride[1]) + (vf->priv->x1/2), + fast_memcpy( dmpi->planes[1] + ((ypos/2)*dmpi->stride[1]) + (vf->priv->x1/2), vf->priv->bitmap.u + (((ypos/2)*(vf->priv->w)/2)) + (vf->priv->x1/2), (vf->priv->x2 - vf->priv->x1)/2 ); - memcpy( dmpi->planes[2] + ((ypos/2)*dmpi->stride[2]) + (vf->priv->x1/2), + fast_memcpy( dmpi->planes[2] + ((ypos/2)*dmpi->stride[2]) + (vf->priv->x1/2), vf->priv->bitmap.v + (((ypos/2)*(vf->priv->w)/2)) + (vf->priv->x1/2), (vf->priv->x2 - vf->priv->x1)/2 ); } diff --git a/libmpcodecs/vf_detc.c b/libmpcodecs/vf_detc.c index 52932d8d6b..27be5d393c 100644 --- a/libmpcodecs/vf_detc.c +++ b/libmpcodecs/vf_detc.c @@ -60,7 +60,7 @@ static inline void *my_memcpy_pic(void * dst, void * src, int bytesPerLine, int for(i=0; i<height; i++) { - memcpy(dst, src, bytesPerLine); + fast_memcpy(dst, src, bytesPerLine); src+= srcStride; dst+= dstStride; } diff --git a/libmpcodecs/vf_down3dright.c b/libmpcodecs/vf_down3dright.c index 84e2f693b2..8bccf0cb84 100644 --- a/libmpcodecs/vf_down3dright.c +++ b/libmpcodecs/vf_down3dright.c @@ -67,7 +67,7 @@ static void toright(unsigned char *dst[3], unsigned char *src[3], *t++ = *sR++; } if (p->scaleh == 1) { - memcpy(to + dst, to, dst); + fast_memcpy(to + dst, to, dst); to += dst; } to += dst; diff --git a/libmpcodecs/vf_filmdint.c b/libmpcodecs/vf_filmdint.c index 26896626e2..0fb8ea69d1 100644 --- a/libmpcodecs/vf_filmdint.c +++ b/libmpcodecs/vf_filmdint.c @@ -97,7 +97,7 @@ static inline void *my_memcpy_pic(void * dst, void * src, int bytesPerLine, int for(i=0; i<height; i++) { - memcpy(dst, src, bytesPerLine); + fast_memcpy(dst, src, bytesPerLine); src+= srcStride; dst+= dstStride; } @@ -711,7 +711,7 @@ dint_copy_plane(unsigned char *d, unsigned char *a, unsigned char *b, long bos = b - a; long cos = c - a; if (field) { - memcpy(d, b, w); + fast_memcpy(d, b, w); h--; d += ds; a += ss; @@ -720,8 +720,8 @@ dint_copy_plane(unsigned char *d, unsigned char *a, unsigned char *b, cos += ss; while (h > 2) { if (threshold >= 128) { - memcpy(d, a, w); - memcpy(d+ds, a+bos, w); + fast_memcpy(d, a, w); + fast_memcpy(d+ds, a+bos, w); } else if (mmx2 == 1) { ret += dint_copy_line_mmx2(d, a, bos, cos, ds, ss, w, threshold); } else @@ -730,9 +730,9 @@ dint_copy_plane(unsigned char *d, unsigned char *a, unsigned char *b, d += 2*ds; a += 2*ss; } - memcpy(d, a, w); + fast_memcpy(d, a, w); if (h == 2) - memcpy(d+ds, a+bos, w); + fast_memcpy(d+ds, a+bos, w); return ret; } diff --git a/libmpcodecs/vf_fspp.c b/libmpcodecs/vf_fspp.c index 541dfb6564..acb39f5c56 100644 --- a/libmpcodecs/vf_fspp.c +++ b/libmpcodecs/vf_fspp.c @@ -421,15 +421,15 @@ static void filter(struct vf_priv_s *p, uint8_t *dst, uint8_t *src, if (!src || !dst) return; // HACK avoid crash for Y8 colourspace for(y=0; y<height; y++){ int index= 8 + 8*stride + y*stride; - memcpy(p->src + index, src + y*src_stride, width);//this line can be avoided by using DR & user fr.buffers + fast_memcpy(p->src + index, src + y*src_stride, width);//this line can be avoided by using DR & user fr.buffers for(x=0; x<8; x++){ p->src[index - x - 1]= p->src[index + x ]; p->src[index + width + x ]= p->src[index + width - x - 1]; } } for(y=0; y<8; y++){ - memcpy(p->src + ( 7-y)*stride, p->src + ( y+8)*stride, stride); - memcpy(p->src + (height+8+y)*stride, p->src + (height-y+7)*stride, stride); + fast_memcpy(p->src + ( 7-y)*stride, p->src + ( y+8)*stride, stride); + fast_memcpy(p->src + (height+8+y)*stride, p->src + (height-y+7)*stride, stride); } //FIXME (try edge emu) @@ -456,8 +456,8 @@ static void filter(struct vf_priv_s *p, uint8_t *dst, uint8_t *src, column_fidct_s((int16_t*)(&p->threshold_mtx[0]), block+x*8, block3+x*8, 8); //yes, this is a HOTSPOT } row_idct_s(block3+0*8, p->temp + (y&15)*stride+x0+2-(y&1), stride, 2*(BLOCKSZ-1)); - memcpy(block, block+(BLOCKSZ-1)*64, 8*8*sizeof(DCTELEM)); //cycling - memcpy(block3, block3+(BLOCKSZ-1)*64, 6*8*sizeof(DCTELEM)); + fast_memcpy(block, block+(BLOCKSZ-1)*64, 8*8*sizeof(DCTELEM)); //cycling + fast_memcpy(block3, block3+(BLOCKSZ-1)*64, 6*8*sizeof(DCTELEM)); } // es=width+8-x0; // 8, ... @@ -532,7 +532,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts) if(mpi->pict_type != 3 && mpi->qscale && !vf->priv->qp){ if(!vf->priv->non_b_qp) vf->priv->non_b_qp= malloc(mpi->qstride * ((mpi->h + 15) >> 4)); - memcpy(vf->priv->non_b_qp, mpi->qscale, mpi->qstride * ((mpi->h + 15) >> 4)); + fast_memcpy(vf->priv->non_b_qp, mpi->qscale, mpi->qstride * ((mpi->h + 15) >> 4)); } if(vf->priv->log2_count || !(mpi->flags&MP_IMGFLAG_DIRECT)){ char *qp_tab= vf->priv->non_b_qp; diff --git a/libmpcodecs/vf_il.c b/libmpcodecs/vf_il.c index edc847ccff..a5af511c6e 100644 --- a/libmpcodecs/vf_il.c +++ b/libmpcodecs/vf_il.c @@ -58,20 +58,20 @@ static void interleave(uint8_t *dst, uint8_t *src, int w, int h, int dstStride, switch(interleave){ case -1: for(y=0; y < m; y++){ - memcpy(dst + dstStride* y , src + srcStride*(y*2 + a), w); - memcpy(dst + dstStride*(y + m), src + srcStride*(y*2 + b), w); + fast_memcpy(dst + dstStride* y , src + srcStride*(y*2 + a), w); + fast_memcpy(dst + dstStride*(y + m), src + srcStride*(y*2 + b), w); } break; case 0: for(y=0; y < m; y++){ - memcpy(dst + dstStride* y*2 , src + srcStride*(y*2 + a), w); - memcpy(dst + dstStride*(y*2+1), src + srcStride*(y*2 + b), w); + fast_memcpy(dst + dstStride* y*2 , src + srcStride*(y*2 + a), w); + fast_memcpy(dst + dstStride*(y*2+1), src + srcStride*(y*2 + b), w); } break; case 1: for(y=0; y < m; y++){ - memcpy(dst + dstStride*(y*2+a), src + srcStride* y , w); - memcpy(dst + dstStride*(y*2+b), src + srcStride*(y + m), w); + fast_memcpy(dst + dstStride*(y*2+a), src + srcStride* y , w); + fast_memcpy(dst + dstStride*(y*2+b), src + srcStride*(y + m), w); } break; } diff --git a/libmpcodecs/vf_ivtc.c b/libmpcodecs/vf_ivtc.c index 9c30a02477..4f9ca36d7c 100644 --- a/libmpcodecs/vf_ivtc.c +++ b/libmpcodecs/vf_ivtc.c @@ -47,7 +47,7 @@ static inline void *my_memcpy_pic(void * dst, void * src, int bytesPerLine, int for(i=0; i<height; i++) { - memcpy(dst, src, bytesPerLine); + fast_memcpy(dst, src, bytesPerLine); src+= srcStride; dst+= dstStride; } diff --git a/libmpcodecs/vf_kerndeint.c b/libmpcodecs/vf_kerndeint.c index f512601fb3..41da44ebfb 100644 --- a/libmpcodecs/vf_kerndeint.c +++ b/libmpcodecs/vf_kerndeint.c @@ -128,16 +128,16 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){ dstp = dstp_saved + (1-order) * dst_pitch; for (y=0; y<h; y+=2) { - memcpy(dstp, srcp, w); + fast_memcpy(dstp, srcp, w); srcp += 2*src_pitch; dstp += 2*dst_pitch; } // Copy through the lines that will be missed below. - memcpy(dstp_saved + order*dst_pitch, srcp_saved + (1-order)*src_pitch, w); - memcpy(dstp_saved + (2+order)*dst_pitch, srcp_saved + (3-order)*src_pitch, w); - memcpy(dstp_saved + (h-2+order)*dst_pitch, srcp_saved + (h-1-order)*src_pitch, w); - memcpy(dstp_saved + (h-4+order)*dst_pitch, srcp_saved + (h-3-order)*src_pitch, w); + fast_memcpy(dstp_saved + order*dst_pitch, srcp_saved + (1-order)*src_pitch, w); + fast_memcpy(dstp_saved + (2+order)*dst_pitch, srcp_saved + (3-order)*src_pitch, w); + fast_memcpy(dstp_saved + (h-2+order)*dst_pitch, srcp_saved + (h-1-order)*src_pitch, w); + fast_memcpy(dstp_saved + (h-4+order)*dst_pitch, srcp_saved + (h-3-order)*src_pitch, w); /* For the other field choose adaptively between using the previous field or the interpolant from the current field. */ @@ -270,7 +270,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){ srcp = mpi->planes[z]; dstp = pmpi->planes[z]; for (y=0; y<h; y++) { - memcpy(dstp, srcp, w); + fast_memcpy(dstp, srcp, w); srcp += src_pitch; dstp += psrc_pitch; } diff --git a/libmpcodecs/vf_noise.c b/libmpcodecs/vf_noise.c index d430ef3281..360cd4dfec 100644 --- a/libmpcodecs/vf_noise.c +++ b/libmpcodecs/vf_noise.c @@ -278,12 +278,12 @@ static void noise(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int { if(src==dst) return; - if(dstStride==srcStride) memcpy(dst, src, srcStride*height); + if(dstStride==srcStride) fast_memcpy(dst, src, srcStride*height); else { for(y=0; y<height; y++) { - memcpy(dst, src, width); + fast_memcpy(dst, src, width); dst+= dstStride; src+= srcStride; } diff --git a/libmpcodecs/vf_phase.c b/libmpcodecs/vf_phase.c index 42957cd77e..45c76a1466 100644 --- a/libmpcodecs/vf_phase.c +++ b/libmpcodecs/vf_phase.c @@ -45,8 +45,8 @@ static void do_plane(unsigned char *to, unsigned char *from, for(end=to+h*ts, buf=*bufp, top=1; to<end; from+=fs, to+=ts, buf+=w, top^=1) { - memcpy(to, mode==(top?BOTTOM_FIRST:TOP_FIRST)?buf:from, w); - memcpy(buf, from, w); + fast_memcpy(to, mode==(top?BOTTOM_FIRST:TOP_FIRST)?buf:from, w); + fast_memcpy(buf, from, w); } } diff --git a/libmpcodecs/vf_pp7.c b/libmpcodecs/vf_pp7.c index cecb4c4423..1624787274 100644 --- a/libmpcodecs/vf_pp7.c +++ b/libmpcodecs/vf_pp7.c @@ -290,15 +290,15 @@ static void filter(struct vf_priv_s *p, uint8_t *dst, uint8_t *src, int dst_stri if (!src || !dst) return; // HACK avoid crash for Y8 colourspace for(y=0; y<height; y++){ int index= 8 + 8*stride + y*stride; - memcpy(p_src + index, src + y*src_stride, width); + fast_memcpy(p_src + index, src + y*src_stride, width); for(x=0; x<8; x++){ p_src[index - x - 1]= p_src[index + x ]; p_src[index + width + x ]= p_src[index + width - x - 1]; } } for(y=0; y<8; y++){ - memcpy(p_src + ( 7-y)*stride, p_src + ( y+8)*stride, stride); - memcpy(p_src + (height+8+y)*stride, p_src + (height-y+7)*stride, stride); + fast_memcpy(p_src + ( 7-y)*stride, p_src + ( y+8)*stride, stride); + fast_memcpy(p_src + (height+8+y)*stride, p_src + (height-y+7)*stride, stride); } //FIXME (try edge emu) diff --git a/libmpcodecs/vf_pullup.c b/libmpcodecs/vf_pullup.c index af56791362..4746d3a957 100644 --- a/libmpcodecs/vf_pullup.c +++ b/libmpcodecs/vf_pullup.c @@ -31,7 +31,7 @@ static inline void *my_memcpy_pic(void * dst, void * src, int bytesPerLine, int for(i=0; i<height; i++) { - memcpy(dst, src, bytesPerLine); + fast_memcpy(dst, src, bytesPerLine); src+= srcStride; dst+= dstStride; } @@ -47,10 +47,10 @@ static inline void *il_memcpy_pic(void *dst, void *src0, void *src1, int w, int for(i=h>>1; i; i--) { - memcpy(dst, src0, w); + fast_memcpy(dst, src0, w); src0 += ss; dst += ds; - memcpy(dst, src1, w); + fast_memcpy(dst, src1, w); src1 += ss; dst += ds; } @@ -153,8 +153,8 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts) } } if (mpi->qscale) { - memcpy(b->planes[3], mpi->qscale, c->w[3]); - memcpy(b->planes[3]+c->w[3], mpi->qscale, c->w[3]); + fast_memcpy(b->planes[3], mpi->qscale, c->w[3]); + fast_memcpy(b->planes[3]+c->w[3], mpi->qscale, c->w[3]); } p = mpi->fields & MP_IMGFIELD_TOP_FIRST ? 0 : diff --git a/libmpcodecs/vf_softpulldown.c b/libmpcodecs/vf_softpulldown.c index b261d906f0..493d3502cb 100644 --- a/libmpcodecs/vf_softpulldown.c +++ b/libmpcodecs/vf_softpulldown.c @@ -24,7 +24,7 @@ static inline void *my_memcpy_pic(void * dst, void * src, int bytesPerLine, int for(i=0; i<height; i++) { - memcpy(dst, src, bytesPerLine); + fast_memcpy(dst, src, bytesPerLine); src+= srcStride; dst+= dstStride; } diff --git a/libmpcodecs/vf_spp.c b/libmpcodecs/vf_spp.c index dd6ca5a2b1..fc789397f7 100644 --- a/libmpcodecs/vf_spp.c +++ b/libmpcodecs/vf_spp.c @@ -380,15 +380,15 @@ static void filter(struct vf_priv_s *p, uint8_t *dst, uint8_t *src, int dst_stri if (!src || !dst) return; // HACK avoid crash for Y8 colourspace for(y=0; y<height; y++){ int index= 8 + 8*stride + y*stride; - memcpy(p->src + index, src + y*src_stride, width); + fast_memcpy(p->src + index, src + y*src_stride, width); for(x=0; x<8; x++){ p->src[index - x - 1]= p->src[index + x ]; p->src[index + width + x ]= p->src[index + width - x - 1]; } } for(y=0; y<8; y++){ - memcpy(p->src + ( 7-y)*stride, p->src + ( y+8)*stride, stride); - memcpy(p->src + (height+8+y)*stride, p->src + (height-y+7)*stride, stride); + fast_memcpy(p->src + ( 7-y)*stride, p->src + ( y+8)*stride, stride); + fast_memcpy(p->src + (height+8+y)*stride, p->src + (height-y+7)*stride, stride); } //FIXME (try edge emu) @@ -478,7 +478,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){ if(mpi->pict_type != 3 && mpi->qscale && !vf->priv->qp){ if(!vf->priv->non_b_qp) vf->priv->non_b_qp= malloc(mpi->qstride * ((mpi->h + 15) >> 4)); - memcpy(vf->priv->non_b_qp, mpi->qscale, mpi->qstride * ((mpi->h + 15) >> 4)); + fast_memcpy(vf->priv->non_b_qp, mpi->qscale, mpi->qstride * ((mpi->h + 15) >> 4)); } if(vf->priv->log2_count || !(mpi->flags&MP_IMGFLAG_DIRECT)){ char *qp_tab= vf->priv->non_b_qp; diff --git a/libmpcodecs/vf_telecine.c b/libmpcodecs/vf_telecine.c index f75ccfa40f..e16c9fab20 100644 --- a/libmpcodecs/vf_telecine.c +++ b/libmpcodecs/vf_telecine.c @@ -22,7 +22,7 @@ static inline void *my_memcpy_pic(void * dst, void * src, int bytesPerLine, int for(i=0; i<height; i++) { - memcpy(dst, src, bytesPerLine); + fast_memcpy(dst, src, bytesPerLine); src+= srcStride; dst+= dstStride; } diff --git a/libmpcodecs/vf_tfields.c b/libmpcodecs/vf_tfields.c index 07d79546a6..5f6a761599 100644 --- a/libmpcodecs/vf_tfields.c +++ b/libmpcodecs/vf_tfields.c @@ -27,7 +27,7 @@ static inline void *my_memcpy_pic(void * dst, void * src, int bytesPerLine, int for(i=0; i<height; i++) { - memcpy(dst, src, bytesPerLine); + fast_memcpy(dst, src, bytesPerLine); src+= srcStride; dst+= dstStride; } @@ -68,7 +68,7 @@ static void qpel_li_3DNOW(unsigned char *d, unsigned char *s, int w, int h, int long crap1, crap2; if (up) { ssd = -ss; - memcpy(d, s, w); + fast_memcpy(d, s, w); d += ds; s += ss; } @@ -92,7 +92,7 @@ static void qpel_li_3DNOW(unsigned char *d, unsigned char *s, int w, int h, int d += ds; s += ss; } - if (!up) memcpy(d, s, w); + if (!up) fast_memcpy(d, s, w); asm volatile("emms \n\t" : : : "memory"); } #endif @@ -104,7 +104,7 @@ static void qpel_li_MMX2(unsigned char *d, unsigned char *s, int w, int h, int d long crap1, crap2; if (up) { ssd = -ss; - memcpy(d, s, w); + fast_memcpy(d, s, w); d += ds; s += ss; } @@ -129,7 +129,7 @@ static void qpel_li_MMX2(unsigned char *d, unsigned char *s, int w, int h, int d d += ds; s += ss; } - if (!up) memcpy(d, s, w); + if (!up) fast_memcpy(d, s, w); asm volatile("emms \n\t" : : : "memory"); } #endif @@ -141,7 +141,7 @@ static void qpel_li_MMX(unsigned char *d, unsigned char *s, int w, int h, int ds int crap1, crap2; if (up) { ssd = -ss; - memcpy(d, s, w); + fast_memcpy(d, s, w); d += ds; s += ss; } @@ -179,7 +179,7 @@ static void qpel_li_MMX(unsigned char *d, unsigned char *s, int w, int h, int ds d += ds; s += ss; } - if (!up) memcpy(d, s, w); + if (!up) fast_memcpy(d, s, w); asm volatile("emms \n\t" : : : "memory"); } @@ -193,7 +193,7 @@ static void qpel_4tap_MMX(unsigned char *d, unsigned char *s, int w, int h, int int crap1, crap2; if (up) { ssd = -ss; - memcpy(d, s, w); + fast_memcpy(d, s, w); d += ds; s += ss; } for (j=0; j<w; j++) @@ -259,7 +259,7 @@ static void qpel_4tap_MMX(unsigned char *d, unsigned char *s, int w, int h, int for (j=0; j<w; j++) d[j] = (s[j+ssd] + 3*s[j])>>2; d += ds; s += ss; - if (!up) memcpy(d, s, w); + if (!up) fast_memcpy(d, s, w); asm volatile("emms \n\t" : : : "memory"); } #endif @@ -276,7 +276,7 @@ static void qpel_li_C(unsigned char *d, unsigned char *s, int w, int h, int ds, int i, j, ssd=ss; if (up) { ssd = -ss; - memcpy(d, s, w); + fast_memcpy(d, s, w); d += ds; s += ss; } @@ -286,7 +286,7 @@ static void qpel_li_C(unsigned char *d, unsigned char *s, int w, int h, int ds, d += ds; s += ss; } - if (!up) memcpy(d, s, w); + if (!up) fast_memcpy(d, s, w); } static void qpel_4tap_C(unsigned char *d, unsigned char *s, int w, int h, int ds, int ss, int up) @@ -294,7 +294,7 @@ static void qpel_4tap_C(unsigned char *d, unsigned char *s, int w, int h, int ds int i, j, ssd=ss; if (up) { ssd = -ss; - memcpy(d, s, w); + fast_memcpy(d, s, w); d += ds; s += ss; } for (j=0; j<w; j++) @@ -308,7 +308,7 @@ static void qpel_4tap_C(unsigned char *d, unsigned char *s, int w, int h, int ds for (j=0; j<w; j++) d[j] = (s[j+ssd] + 3*s[j] + 2)>>2; d += ds; s += ss; - if (!up) memcpy(d, s, w); + if (!up) fast_memcpy(d, s, w); } static void (*qpel_li)(unsigned char *d, unsigned char *s, int w, int h, int ds, int ss, int up); diff --git a/libmpcodecs/vf_tinterlace.c b/libmpcodecs/vf_tinterlace.c index eb02872b0e..351cde3a47 100644 --- a/libmpcodecs/vf_tinterlace.c +++ b/libmpcodecs/vf_tinterlace.c @@ -43,7 +43,7 @@ static inline void *my_memcpy_pic(void * dst, void * src, int bytesPerLine, int for(i=0; i<height; i++) { - memcpy(dst, src, bytesPerLine); + fast_memcpy(dst, src, bytesPerLine); src+= srcStride; dst+= dstStride; } diff --git a/libmpcodecs/vf_unsharp.c b/libmpcodecs/vf_unsharp.c index e87a35c0e6..9907f4ac3e 100644 --- a/libmpcodecs/vf_unsharp.c +++ b/libmpcodecs/vf_unsharp.c @@ -85,10 +85,10 @@ static void unsharp( uint8_t *dst, uint8_t *src, int dstStride, int srcStride, i if( src == dst ) return; if( dstStride == srcStride ) - memcpy( dst, src, srcStride*height ); + fast_memcpy( dst, src, srcStride*height ); else for( y=0; y<height; y++, dst+=dstStride, src+=srcStride ) - memcpy( dst, src, width ); + fast_memcpy( dst, src, width ); return; } diff --git a/libmpcodecs/vf_uspp.c b/libmpcodecs/vf_uspp.c index 068a19b9a5..e76669459c 100644 --- a/libmpcodecs/vf_uspp.c +++ b/libmpcodecs/vf_uspp.c @@ -154,15 +154,15 @@ static void filter(struct vf_priv_s *p, uint8_t *dst[3], uint8_t *src[3], int ds continue; // HACK avoid crash for Y8 colourspace for(y=0; y<h; y++){ int index= block + block*stride + y*stride; - memcpy(p->src[i] + index, src[i] + y*src_stride[i], w); + fast_memcpy(p->src[i] + index, src[i] + y*src_stride[i], w); for(x=0; x<block; x++){ p->src[i][index - x - 1]= p->src[i][index + x ]; p->src[i][index + w + x ]= p->src[i][index + w - x - 1]; } } for(y=0; y<block; y++){ - memcpy(p->src[i] + ( block-1-y)*stride, p->src[i] + ( y+block )*stride, stride); - memcpy(p->src[i] + (h+block +y)*stride, p->src[i] + (h-y+block-1)*stride, stride); + fast_memcpy(p->src[i] + ( block-1-y)*stride, p->src[i] + ( y+block )*stride, stride); + fast_memcpy(p->src[i] + (h+block +y)*stride, p->src[i] + (h-y+block-1)*stride, stride); } p->frame->linesize[i]= stride; diff --git a/libmpcodecs/vf_yadif.c b/libmpcodecs/vf_yadif.c index 0b37731464..89c1a8b6bd 100644 --- a/libmpcodecs/vf_yadif.c +++ b/libmpcodecs/vf_yadif.c @@ -62,7 +62,7 @@ static void (*filter_line)(struct vf_priv_s *p, uint8_t *dst, uint8_t *prev, uin static void store_ref(struct vf_priv_s *p, uint8_t *src[3], int src_stride[3], int width, int height){ int i; - memcpy (p->ref[3], p->ref[0], sizeof(uint8_t *)*3); + fast_memcpy (p->ref[3], p->ref[0], sizeof(uint8_t *)*3); memmove(p->ref[0], p->ref[1], sizeof(uint8_t *)*3*3); for(i=0; i<3; i++){ @@ -363,7 +363,7 @@ static void filter(struct vf_priv_s *p, uint8_t *dst[3], int dst_stride[3], int uint8_t *dst2= &dst[i][y*dst_stride[i]]; filter_line(p, dst2, prev, cur, next, w, refs, parity ^ tff); }else{ - memcpy(&dst[i][y*dst_stride[i]], &p->ref[1][i][y*refs], w); + fast_memcpy(&dst[i][y*dst_stride[i]], &p->ref[1][i][y*refs], w); } } } diff --git a/libmpcodecs/vf_yvu9.c b/libmpcodecs/vf_yvu9.c index f22053934c..03bf9a135d 100644 --- a/libmpcodecs/vf_yvu9.c +++ b/libmpcodecs/vf_yvu9.c @@ -37,7 +37,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){ mpi->w, mpi->h); for(y=0;y<mpi->h;y++) - memcpy(dmpi->planes[0]+dmpi->stride[0]*y, + fast_memcpy(dmpi->planes[0]+dmpi->stride[0]*y, mpi->planes[0]+mpi->stride[0]*y, mpi->w); |