diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-04-20 15:11:06 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-04-20 15:11:06 +0200 |
commit | fdb1f7eb7a802eec63a051499110842f3056cf9b (patch) | |
tree | c4421b73f26a9e16602438641af598b48958a82b | |
parent | 4bdec0e71edc3b46793908eaca26864657497cc1 (diff) | |
parent | 78ce568e43a7f3993c33100aa8f5d56c4c4bd493 (diff) | |
download | ffmpeg-fdb1f7eb7a802eec63a051499110842f3056cf9b.tar.gz |
Merge commit '78ce568e43a7f3993c33100aa8f5d56c4c4bd493'
* commit '78ce568e43a7f3993c33100aa8f5d56c4c4bd493':
sparc: hpeldsp: Move vis half-pel assembly from dsputil to hpeldsp
Conflicts:
libavcodec/hpeldsp.h
libavcodec/sparc/dsputil_vis.c
libavcodec/sparc/hpeldsp_vis.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/sparc/dsputil_vis.c | 22 | ||||
-rw-r--r-- | libavcodec/sparc/hpeldsp_vis.c | 23 | ||||
-rw-r--r-- | libavcodec/sparc/vis.h | 11 |
3 files changed, 16 insertions, 40 deletions
diff --git a/libavcodec/sparc/dsputil_vis.c b/libavcodec/sparc/dsputil_vis.c index 9c3494bc45..414d6ca50e 100644 --- a/libavcodec/sparc/dsputil_vis.c +++ b/libavcodec/sparc/dsputil_vis.c @@ -18,33 +18,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -/* The *no_round* functions have been added by James A. Morrison, 2003,2004. - The vis code from libmpeg2 was adapted for libavcodec by James A. Morrison. - */ - -#include "config.h" - -#include <inttypes.h> - #include "libavutil/attributes.h" #include "libavcodec/dsputil.h" -#include "libavutil/mem.h" #include "dsputil_vis.h" - #include "vis.h" -#define ACCEL_SPARC_VIS 1 -#define ACCEL_SPARC_VIS2 2 - -static int vis_level(void) -{ - int accel = 0; - accel |= ACCEL_SPARC_VIS; - accel |= ACCEL_SPARC_VIS2; - return accel; -} - -/* libavcodec initialization code */ av_cold void ff_dsputil_init_vis(DSPContext *c, AVCodecContext *avctx) { /* VIS-specific optimizations */ diff --git a/libavcodec/sparc/hpeldsp_vis.c b/libavcodec/sparc/hpeldsp_vis.c index da2d47e266..be2a85d8f6 100644 --- a/libavcodec/sparc/hpeldsp_vis.c +++ b/libavcodec/sparc/hpeldsp_vis.c @@ -22,13 +22,12 @@ The vis code from libmpeg2 was adapted for libavcodec by James A. Morrison. */ -#include "config.h" +#include <stddef.h> +#include <stdint.h> -#include <inttypes.h> - -#include "libavcodec/hpeldsp.h" +#include "libavutil/attributes.h" #include "libavutil/mem.h" - +#include "libavcodec/hpeldsp.h" #include "vis.h" /* The trick used in some of this file is the formula from the MMX @@ -3481,19 +3480,7 @@ static void MC_avg_no_round_xy_16_vis (uint8_t * dest, const uint8_t * ref, /* End of no rounding code */ -#define ACCEL_SPARC_VIS 1 -#define ACCEL_SPARC_VIS2 2 - -static int vis_level(void) -{ - int accel = 0; - accel |= ACCEL_SPARC_VIS; - accel |= ACCEL_SPARC_VIS2; - return accel; -} - -/* libavcodec initialization code */ -void ff_hpeldsp_init_vis(HpelDSPContext* c, int flags) +av_cold void ff_hpeldsp_init_vis(HpelDSPContext *c, int flags) { /* VIS-specific optimizations */ int accel = vis_level (); diff --git a/libavcodec/sparc/vis.h b/libavcodec/sparc/vis.h index adee91bd6f..af5b5fa79e 100644 --- a/libavcodec/sparc/vis.h +++ b/libavcodec/sparc/vis.h @@ -42,6 +42,17 @@ #ifndef AVCODEC_SPARC_VIS_H #define AVCODEC_SPARC_VIS_H +#define ACCEL_SPARC_VIS 1 +#define ACCEL_SPARC_VIS2 2 + +static inline int vis_level(void) +{ + int accel = 0; + accel |= ACCEL_SPARC_VIS; + accel |= ACCEL_SPARC_VIS2; + return accel; +} + #define vis_opc_base ((0x1 << 31) | (0x36 << 19)) #define vis_opf(X) ((X) << 5) #define vis_sreg(X) (X) |