mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/ppc/idct_altivec: add plain idct()
Tested-by: Carl Eugen Hoyos <cehoyos@ag.or.at> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
7128a35f8c
commit
b065d0014b
@ -30,6 +30,7 @@
|
||||
void ff_fdct_altivec(int16_t *block);
|
||||
void ff_gmc1_altivec(uint8_t *dst, uint8_t *src, int stride, int h,
|
||||
int x16, int y16, int rounder);
|
||||
void ff_idct_altivec(int16_t *block);
|
||||
void ff_idct_put_altivec(uint8_t *dest, int line_size, int16_t *block);
|
||||
void ff_idct_add_altivec(uint8_t *dest, int line_size, int16_t *block);
|
||||
|
||||
|
@ -158,6 +158,7 @@ av_cold void ff_dsputil_init_ppc(DSPContext *c, AVCodecContext *avctx,
|
||||
if (avctx->lowres == 0) {
|
||||
if ((avctx->idct_algo == FF_IDCT_AUTO) ||
|
||||
(avctx->idct_algo == FF_IDCT_ALTIVEC)) {
|
||||
c->idct = ff_idct_altivec;
|
||||
c->idct_put = ff_idct_put_altivec;
|
||||
c->idct_add = ff_idct_add_altivec;
|
||||
c->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM;
|
||||
|
@ -148,6 +148,22 @@ static const vec_s16 constants[5] = {
|
||||
{ 19266, 26722, 25172, 22654, 19266, 22654, 25172, 26722 }
|
||||
};
|
||||
|
||||
void ff_idct_altivec(int16_t *blk)
|
||||
{
|
||||
vec_s16 *block = (vec_s16 *) blk;
|
||||
|
||||
IDCT;
|
||||
|
||||
block[0] = vx0;
|
||||
block[1] = vx1;
|
||||
block[2] = vx2;
|
||||
block[3] = vx3;
|
||||
block[4] = vx4;
|
||||
block[5] = vx5;
|
||||
block[6] = vx6;
|
||||
block[7] = vx7;
|
||||
}
|
||||
|
||||
void ff_idct_put_altivec(uint8_t *dest, int stride, int16_t *blk)
|
||||
{
|
||||
vec_s16 *block = (vec_s16 *) blk;
|
||||
|
Loading…
Reference in New Issue
Block a user