Commit fdb1f7eb authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '78ce568e'

* commit '78ce568e':
  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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 4bdec0e7 78ce568e
......@@ -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 */
......
......@@ -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 ();
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment