fastmemcpy.h
Go to the documentation of this file.
1 /*
2  * This file is part of MPlayer.
3  *
4  * MPlayer is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * MPlayer is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with MPlayer; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 #ifndef MPLAYER_FASTMEMCPY_H
20 #define MPLAYER_FASTMEMCPY_H
21 
22 #include <inttypes.h>
23 #include <string.h>
24 #include <stddef.h>
25 
26 void * fast_memcpy(void * to, const void * from, size_t len);
27 void * mem2agpcpy(void * to, const void * from, size_t len);
28 
29 #if ! defined(CONFIG_FASTMEMCPY) || ! (HAVE_MMX || HAVE_MMX2 || HAVE_AMD3DNOW /* || HAVE_SSE || HAVE_SSE2 */)
30 #define mem2agpcpy(a,b,c) memcpy(a,b,c)
31 #define fast_memcpy(a,b,c) memcpy(a,b,c)
32 #endif
33 
34 static inline void * mem2agpcpy_pic(void * dst, const void * src, int bytesPerLine, int height, int dstStride, int srcStride)
35 {
36  int i;
37  void *retval=dst;
38 
39  if(dstStride == srcStride)
40  {
41  if (srcStride < 0) {
42  src = (const uint8_t*)src + (height-1)*srcStride;
43  dst = (uint8_t*)dst + (height-1)*dstStride;
44  srcStride = -srcStride;
45  }
46 
47  mem2agpcpy(dst, src, srcStride*height);
48  }
49  else
50  {
51  for(i=0; i<height; i++)
52  {
53  mem2agpcpy(dst, src, bytesPerLine);
54  src = (const uint8_t*)src + srcStride;
55  dst = (uint8_t*)dst + dstStride;
56  }
57  }
58 
59  return retval;
60 }
61 
62 #define memcpy_pic(d, s, b, h, ds, ss) memcpy_pic2(d, s, b, h, ds, ss, 0)
63 #define my_memcpy_pic(d, s, b, h, ds, ss) memcpy_pic2(d, s, b, h, ds, ss, 1)
64 
65 /**
66  * \param limit2width always skip data between end of line and start of next
67  * instead of copying the full block when strides are the same
68  */
69 static inline void * memcpy_pic2(void * dst, const void * src,
70  int bytesPerLine, int height,
71  int dstStride, int srcStride, int limit2width)
72 {
73  int i;
74  void *retval=dst;
75 
76  if(!limit2width && dstStride == srcStride)
77  {
78  if (srcStride < 0) {
79  src = (const uint8_t*)src + (height-1)*srcStride;
80  dst = (uint8_t*)dst + (height-1)*dstStride;
81  srcStride = -srcStride;
82  }
83 
84  fast_memcpy(dst, src, srcStride*height);
85  }
86  else
87  {
88  for(i=0; i<height; i++)
89  {
90  fast_memcpy(dst, src, bytesPerLine);
91  src = (const uint8_t*)src + srcStride;
92  dst = (uint8_t*)dst + dstStride;
93  }
94  }
95 
96  return retval;
97 }
98 
99 #endif /* MPLAYER_FASTMEMCPY_H */
static void * memcpy_pic2(void *dst, const void *src, int bytesPerLine, int height, int dstStride, int srcStride, int limit2width)
Definition: fastmemcpy.h:69
uint8_t
const char * from
#define mem2agpcpy(a, b, c)
Definition: fastmemcpy.h:30
#define fast_memcpy(a, b, c)
Definition: fastmemcpy.h:31
AVS_Value src
Definition: avisynth_c.h:523
BYTE int const BYTE int int int height
Definition: avisynth_c.h:713
synthesis window for stochastic i
FFmpeg Automated Testing Environment ************************************Table of Contents *****************FFmpeg Automated Testing Environment Introduction Using FATE from your FFmpeg source directory Submitting the results to the FFmpeg result aggregation server FATE makefile targets and variables Makefile targets Makefile variables Examples Introduction **************FATE is an extended regression suite on the client side and a means for results aggregation and presentation on the server side The first part of this document explains how you can use FATE from your FFmpeg source directory to test your ffmpeg binary The second part describes how you can run FATE to submit the results to FFmpeg s FATE server In any way you can have a look at the publicly viewable FATE results by visiting this as it can be seen if some test on some platform broke with their recent contribution This usually happens on the platforms the developers could not test on The second part of this document describes how you can run FATE to submit your results to FFmpeg s FATE server If you want to submit your results be sure to check that your combination of OS and compiler is not already listed on the above mentioned website In the third part you can find a comprehensive listing of FATE makefile targets and variables Using FATE from your FFmpeg source directory **********************************************If you want to run FATE on your machine you need to have the samples in place You can get the samples via the build target fate rsync Use this command from the top level source this will cause FATE to fail NOTE To use a custom wrapper to run the pass target exec to configure or set the TARGET_EXEC Make variable Submitting the results to the FFmpeg result aggregation server ****************************************************************To submit your results to the server you should run fate through the shell script tests fate sh from the FFmpeg sources This script needs to be invoked with a configuration file as its first argument tests fate sh path to fate_config A configuration file template with comments describing the individual configuration variables can be found at doc fate_config sh template Create a configuration that suits your based on the configuration template The slot configuration variable can be any string that is not yet but it is suggested that you name it adhering to the following pattern< arch >< os >< compiler >< compiler version > The configuration file itself will be sourced in a shell therefore all shell features may be used This enables you to setup the environment as you need it for your build For your first test runs the fate_recv variable should be empty or commented out This will run everything as normal except that it will omit the submission of the results to the server The following files should be present in $workdir as specified in the configuration it may help to try out the ssh command with one or more v options You should get detailed output concerning your SSH configuration and the authentication process The only thing left is to automate the execution of the fate sh script and the synchronisation of the samples directory FATE makefile targets and variables *************************************Makefile can be set to
Definition: fate.txt:142
int len
else dst[i][x+y *dst_stride[i]]
Definition: vf_mcdeint.c:160
static void * mem2agpcpy_pic(void *dst, const void *src, int bytesPerLine, int height, int dstStride, int srcStride)
Definition: fastmemcpy.h:34