Commit 6d1e9d99 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '32ff6432'

* commit '32ff6432':
  dsputil: remove avg_no_rnd_pixels8.

Conflicts:
	libavcodec/x86/dsputil_mmx.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents ac898759 32ff6432
...@@ -308,11 +308,6 @@ void ff_dsputil_init_alpha(DSPContext* c, AVCodecContext *avctx) ...@@ -308,11 +308,6 @@ void ff_dsputil_init_alpha(DSPContext* c, AVCodecContext *avctx)
c->avg_pixels_tab[1][2] = avg_pixels_y2_axp; c->avg_pixels_tab[1][2] = avg_pixels_y2_axp;
c->avg_pixels_tab[1][3] = avg_pixels_xy2_axp; c->avg_pixels_tab[1][3] = avg_pixels_xy2_axp;
c->avg_no_rnd_pixels_tab[1][0] = avg_no_rnd_pixels_axp;
c->avg_no_rnd_pixels_tab[1][1] = avg_no_rnd_pixels_x2_axp;
c->avg_no_rnd_pixels_tab[1][2] = avg_no_rnd_pixels_y2_axp;
c->avg_no_rnd_pixels_tab[1][3] = avg_no_rnd_pixels_xy2_axp;
c->clear_blocks = clear_blocks_axp; c->clear_blocks = clear_blocks_axp;
} }
......
...@@ -58,9 +58,6 @@ void ff_avg_pixels8_xy2_neon(uint8_t *, const uint8_t *, int, int); ...@@ -58,9 +58,6 @@ void ff_avg_pixels8_xy2_neon(uint8_t *, const uint8_t *, int, int);
void ff_avg_pixels16_x2_no_rnd_neon(uint8_t *, const uint8_t *, int, int); void ff_avg_pixels16_x2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
void ff_avg_pixels16_y2_no_rnd_neon(uint8_t *, const uint8_t *, int, int); void ff_avg_pixels16_y2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
void ff_avg_pixels16_xy2_no_rnd_neon(uint8_t *, const uint8_t *, int, int); void ff_avg_pixels16_xy2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
void ff_avg_pixels8_x2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
void ff_avg_pixels8_y2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
void ff_avg_pixels8_xy2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
void ff_add_pixels_clamped_neon(const int16_t *, uint8_t *, int); void ff_add_pixels_clamped_neon(const int16_t *, uint8_t *, int);
void ff_put_pixels_clamped_neon(const int16_t *, uint8_t *, int); void ff_put_pixels_clamped_neon(const int16_t *, uint8_t *, int);
...@@ -203,10 +200,6 @@ void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx) ...@@ -203,10 +200,6 @@ void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx)
c->avg_no_rnd_pixels_tab[0][1] = ff_avg_pixels16_x2_no_rnd_neon; c->avg_no_rnd_pixels_tab[0][1] = ff_avg_pixels16_x2_no_rnd_neon;
c->avg_no_rnd_pixels_tab[0][2] = ff_avg_pixels16_y2_no_rnd_neon; c->avg_no_rnd_pixels_tab[0][2] = ff_avg_pixels16_y2_no_rnd_neon;
c->avg_no_rnd_pixels_tab[0][3] = ff_avg_pixels16_xy2_no_rnd_neon; c->avg_no_rnd_pixels_tab[0][3] = ff_avg_pixels16_xy2_no_rnd_neon;
c->avg_no_rnd_pixels_tab[1][0] = ff_avg_pixels8_neon;
c->avg_no_rnd_pixels_tab[1][1] = ff_avg_pixels8_x2_no_rnd_neon;
c->avg_no_rnd_pixels_tab[1][2] = ff_avg_pixels8_y2_no_rnd_neon;
c->avg_no_rnd_pixels_tab[1][3] = ff_avg_pixels8_xy2_no_rnd_neon;
} }
c->add_pixels_clamped = ff_add_pixels_clamped_neon; c->add_pixels_clamped = ff_add_pixels_clamped_neon;
......
...@@ -421,9 +421,9 @@ function ff_avg_h264_qpel8_mc00_neon, export=1 ...@@ -421,9 +421,9 @@ function ff_avg_h264_qpel8_mc00_neon, export=1
endfunc endfunc
pixfunc avg_, pixels8, avg=1 pixfunc avg_, pixels8, avg=1
pixfunc2 avg_, pixels8_x2, avg=1 pixfunc avg_, pixels8_x2, avg=1
pixfunc2 avg_, pixels8_y2, avg=1 pixfunc avg_, pixels8_y2, avg=1
pixfunc2 avg_, pixels8_xy2, avg=1 pixfunc avg_, pixels8_xy2, avg=1
function ff_put_pixels_clamped_neon, export=1 function ff_put_pixels_clamped_neon, export=1
vld1.16 {d16-d19}, [r0,:128]! vld1.16 {d16-d19}, [r0,:128]!
......
...@@ -2925,7 +2925,6 @@ av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx) ...@@ -2925,7 +2925,6 @@ av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx)
dspfunc1(avg , 2, 4, depth);\ dspfunc1(avg , 2, 4, depth);\
dspfunc1(avg , 3, 2, depth);\ dspfunc1(avg , 3, 2, depth);\
dspfunc1(avg_no_rnd, 0, 16, depth);\ dspfunc1(avg_no_rnd, 0, 16, depth);\
dspfunc1(avg_no_rnd, 1, 8, depth);\
\ \
dspfunc2(put_h264_qpel, 0, 16, depth);\ dspfunc2(put_h264_qpel, 0, 16, depth);\
dspfunc2(put_h264_qpel, 1, 8, depth);\ dspfunc2(put_h264_qpel, 1, 8, depth);\
......
...@@ -297,15 +297,15 @@ typedef struct DSPContext { ...@@ -297,15 +297,15 @@ typedef struct DSPContext {
/** /**
* Halfpel motion compensation with no rounding (a+b)>>1. * Halfpel motion compensation with no rounding (a+b)>>1.
* this is an array[2][4] of motion compensation functions for 2 * this is an array[4] of motion compensation functions for 1
* horizontal blocksizes (8,16) and the 4 halfpel positions<br> * horizontal blocksize (16) and the 4 halfpel positions<br>
* *pixels_tab[ 0->16xH 1->8xH ][ xhalfpel + 2*yhalfpel ] * *pixels_tab[0][ xhalfpel + 2*yhalfpel ]
* @param block destination into which the result is averaged (a+b)>>1 * @param block destination into which the result is averaged (a+b)>>1
* @param pixels source * @param pixels source
* @param line_size number of bytes in a horizontal line of block * @param line_size number of bytes in a horizontal line of block
* @param h height * @param h height
*/ */
op_pixels_func avg_no_rnd_pixels_tab[4][4]; op_pixels_func avg_no_rnd_pixels_tab[1][4];
/** /**
* Thirdpel motion compensation with rounding (a+b+1)>>1. * Thirdpel motion compensation with rounding (a+b+1)>>1.
......
...@@ -294,11 +294,8 @@ DEFFUNC(put,no_rnd,xy,16,OP_XY,PACK) ...@@ -294,11 +294,8 @@ DEFFUNC(put,no_rnd,xy,16,OP_XY,PACK)
DEFFUNC(avg, rnd,o,8,OP_C,avg32) DEFFUNC(avg, rnd,o,8,OP_C,avg32)
DEFFUNC(avg, rnd,x,8,OP_X,avg32) DEFFUNC(avg, rnd,x,8,OP_X,avg32)
DEFFUNC(avg,no_rnd,x,8,OP_X,avg32)
DEFFUNC(avg, rnd,y,8,OP_Y,avg32) DEFFUNC(avg, rnd,y,8,OP_Y,avg32)
DEFFUNC(avg,no_rnd,y,8,OP_Y,avg32)
DEFFUNC(avg, rnd,xy,8,OP_XY,PACK) DEFFUNC(avg, rnd,xy,8,OP_XY,PACK)
DEFFUNC(avg,no_rnd,xy,8,OP_XY,PACK)
DEFFUNC(avg, rnd,o,16,OP_C,avg32) DEFFUNC(avg, rnd,o,16,OP_C,avg32)
DEFFUNC(avg, rnd,x,16,OP_X,avg32) DEFFUNC(avg, rnd,x,16,OP_X,avg32)
DEFFUNC(avg,no_rnd,x,16,OP_X,avg32) DEFFUNC(avg,no_rnd,x,16,OP_X,avg32)
...@@ -311,7 +308,6 @@ DEFFUNC(avg,no_rnd,xy,16,OP_XY,PACK) ...@@ -311,7 +308,6 @@ DEFFUNC(avg,no_rnd,xy,16,OP_XY,PACK)
#define put_no_rnd_pixels8_o put_rnd_pixels8_o #define put_no_rnd_pixels8_o put_rnd_pixels8_o
#define put_no_rnd_pixels16_o put_rnd_pixels16_o #define put_no_rnd_pixels16_o put_rnd_pixels16_o
#define avg_no_rnd_pixels8_o avg_rnd_pixels8_o
#define avg_no_rnd_pixels16_o avg_rnd_pixels16_o #define avg_no_rnd_pixels16_o avg_rnd_pixels16_o
#define put_pixels8_c put_rnd_pixels8_o #define put_pixels8_c put_rnd_pixels8_o
...@@ -320,7 +316,6 @@ DEFFUNC(avg,no_rnd,xy,16,OP_XY,PACK) ...@@ -320,7 +316,6 @@ DEFFUNC(avg,no_rnd,xy,16,OP_XY,PACK)
#define avg_pixels16_c avg_rnd_pixels16_o #define avg_pixels16_c avg_rnd_pixels16_o
#define put_no_rnd_pixels8_c put_rnd_pixels8_o #define put_no_rnd_pixels8_c put_rnd_pixels8_o
#define put_no_rnd_pixels16_c put_rnd_pixels16_o #define put_no_rnd_pixels16_c put_rnd_pixels16_o
#define avg_no_rnd_pixels8_c avg_rnd_pixels8_o
#define avg_no_rnd_pixels16_c avg_rnd_pixels16_o #define avg_no_rnd_pixels16_c avg_rnd_pixels16_o
#define QPEL #define QPEL
...@@ -367,10 +362,6 @@ void ff_dsputil_init_align(DSPContext* c, AVCodecContext *avctx) ...@@ -367,10 +362,6 @@ void ff_dsputil_init_align(DSPContext* c, AVCodecContext *avctx)
c->avg_no_rnd_pixels_tab[0][1] = avg_no_rnd_pixels16_x; c->avg_no_rnd_pixels_tab[0][1] = avg_no_rnd_pixels16_x;
c->avg_no_rnd_pixels_tab[0][2] = avg_no_rnd_pixels16_y; c->avg_no_rnd_pixels_tab[0][2] = avg_no_rnd_pixels16_y;
c->avg_no_rnd_pixels_tab[0][3] = avg_no_rnd_pixels16_xy; c->avg_no_rnd_pixels_tab[0][3] = avg_no_rnd_pixels16_xy;
c->avg_no_rnd_pixels_tab[1][0] = avg_no_rnd_pixels8_o;
c->avg_no_rnd_pixels_tab[1][1] = avg_no_rnd_pixels8_x;
c->avg_no_rnd_pixels_tab[1][2] = avg_no_rnd_pixels8_y;
c->avg_no_rnd_pixels_tab[1][3] = avg_no_rnd_pixels8_xy;
} }
#ifdef QPEL #ifdef QPEL
......
This diff is collapsed.
...@@ -161,6 +161,7 @@ DECLARE_ALIGNED(16, const double, ff_pd_2)[2] = { 2.0, 2.0 }; ...@@ -161,6 +161,7 @@ DECLARE_ALIGNED(16, const double, ff_pd_2)[2] = { 2.0, 2.0 };
/***********************************/ /***********************************/
/* MMX no rounding */ /* MMX no rounding */
#define NO_RND 1
#define DEF(x, y) x ## _no_rnd_ ## y ## _mmx #define DEF(x, y) x ## _no_rnd_ ## y ## _mmx
#define SET_RND MOVQ_WONE #define SET_RND MOVQ_WONE
#define PAVGBP(a, b, c, d, e, f) PAVGBP_MMX_NO_RND(a, b, c, d, e, f) #define PAVGBP(a, b, c, d, e, f) PAVGBP_MMX_NO_RND(a, b, c, d, e, f)
...@@ -173,6 +174,7 @@ DECLARE_ALIGNED(16, const double, ff_pd_2)[2] = { 2.0, 2.0 }; ...@@ -173,6 +174,7 @@ DECLARE_ALIGNED(16, const double, ff_pd_2)[2] = { 2.0, 2.0 };
#undef SET_RND #undef SET_RND
#undef PAVGBP #undef PAVGBP
#undef PAVGB #undef PAVGB
#undef NO_RND
/***********************************/ /***********************************/
/* MMX rounding */ /* MMX rounding */
...@@ -2058,7 +2060,6 @@ static void dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx, int mm_flags) ...@@ -2058,7 +2060,6 @@ static void dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx, int mm_flags)
SET_HPEL_FUNCS(put, 1, 8, mmx); SET_HPEL_FUNCS(put, 1, 8, mmx);
SET_HPEL_FUNCS(put_no_rnd, 1, 8, mmx); SET_HPEL_FUNCS(put_no_rnd, 1, 8, mmx);
SET_HPEL_FUNCS(avg, 1, 8, mmx); SET_HPEL_FUNCS(avg, 1, 8, mmx);
SET_HPEL_FUNCS(avg_no_rnd, 1, 8, mmx);
} }
#if ARCH_X86_32 || !HAVE_YASM #if ARCH_X86_32 || !HAVE_YASM
......
...@@ -317,6 +317,7 @@ static void av_unused DEF(avg, pixels4)(uint8_t *block, const uint8_t *pixels, i ...@@ -317,6 +317,7 @@ static void av_unused DEF(avg, pixels4)(uint8_t *block, const uint8_t *pixels, i
while (--h); while (--h);
} }
#ifndef NO_RND
// in case more speed is needed - unroling would certainly help // in case more speed is needed - unroling would certainly help
static void DEF(avg, pixels8)(uint8_t *block, const uint8_t *pixels, int line_size, int h) static void DEF(avg, pixels8)(uint8_t *block, const uint8_t *pixels, int line_size, int h)
{ {
...@@ -336,6 +337,7 @@ static void DEF(avg, pixels8)(uint8_t *block, const uint8_t *pixels, int line_si ...@@ -336,6 +337,7 @@ static void DEF(avg, pixels8)(uint8_t *block, const uint8_t *pixels, int line_si
} }
while (--h); while (--h);
} }
#endif // NO_RND
static void DEF(avg, pixels16)(uint8_t *block, const uint8_t *pixels, int line_size, int h) static void DEF(avg, pixels16)(uint8_t *block, const uint8_t *pixels, int line_size, int h)
{ {
...@@ -360,6 +362,7 @@ static void DEF(avg, pixels16)(uint8_t *block, const uint8_t *pixels, int line_s ...@@ -360,6 +362,7 @@ static void DEF(avg, pixels16)(uint8_t *block, const uint8_t *pixels, int line_s
while (--h); while (--h);
} }
#ifndef NO_RND
static void DEF(avg, pixels8_x2)(uint8_t *block, const uint8_t *pixels, int line_size, int h) static void DEF(avg, pixels8_x2)(uint8_t *block, const uint8_t *pixels, int line_size, int h)
{ {
MOVQ_BFE(mm6); MOVQ_BFE(mm6);
...@@ -379,6 +382,7 @@ static void DEF(avg, pixels8_x2)(uint8_t *block, const uint8_t *pixels, int line ...@@ -379,6 +382,7 @@ static void DEF(avg, pixels8_x2)(uint8_t *block, const uint8_t *pixels, int line
block += line_size; block += line_size;
} while (--h); } while (--h);
} }
#endif // NO_RND
static av_unused void DEF(avg, pixels8_l2)(uint8_t *dst, uint8_t *src1, uint8_t *src2, int dstStride, int src1Stride, int h) static av_unused void DEF(avg, pixels8_l2)(uint8_t *dst, uint8_t *src1, uint8_t *src2, int dstStride, int src1Stride, int h)
{ {
......
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