Commit 055e5c8e authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '47e5a981'

* commit '47e5a981':
  ppc: hpeldsp: Move half-pel assembly from dsputil to hpeldsp

Conflicts:
	libavcodec/hpeldsp.h
	libavcodec/ppc/hpeldsp_altivec.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents d0aa60da 47e5a981
......@@ -54,6 +54,8 @@ av_cold void ff_hpeldsp_init(HpelDSPContext *c, int flags)
hpel_funcs(avg, [3], 2);
hpel_funcs(avg_no_rnd,, 16);
if (ARCH_PPC)
ff_hpeldsp_init_ppc(c, flags);
if (ARCH_X86)
ff_hpeldsp_init_x86(c, flags);
if (ARCH_ARM) ff_hpeldsp_init_arm (c, flags);
......
......@@ -444,20 +444,22 @@ static void avg_pixels8_xy2_altivec(uint8_t *block, const uint8_t *pixels, ptrdi
}
#endif /* HAVE_ALTIVEC */
void ff_hpeldsp_init_ppc(HpelDSPContext* c, int flags)
av_cold void ff_hpeldsp_init_ppc(HpelDSPContext *c, int flags)
{
#if HAVE_ALTIVEC
int mm_flags = av_get_cpu_flags();
if (mm_flags & AV_CPU_FLAG_ALTIVEC) {
c->put_pixels_tab[0][0] = ff_put_pixels16_altivec;
c->put_no_rnd_pixels_tab[0][0] = ff_put_pixels16_altivec;
c->avg_pixels_tab[0][0] = ff_avg_pixels16_altivec;
c->avg_pixels_tab[1][0] = avg_pixels8_altivec;
c->avg_pixels_tab[1][3] = avg_pixels8_xy2_altivec;
c->put_pixels_tab[0][0] = ff_put_pixels16_altivec;
c->put_pixels_tab[1][3] = put_pixels8_xy2_altivec;
c->put_no_rnd_pixels_tab[1][3] = put_no_rnd_pixels8_xy2_altivec;
c->put_pixels_tab[0][3] = put_pixels16_xy2_altivec;
c->put_no_rnd_pixels_tab[0][0] = ff_put_pixels16_altivec;
c->put_no_rnd_pixels_tab[1][3] = put_no_rnd_pixels8_xy2_altivec;
c->put_no_rnd_pixels_tab[0][3] = put_no_rnd_pixels16_xy2_altivec;
}
#endif /* HAVE_ALTIVEC */
......
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