2001-08-13 23:38:25 +02:00
|
|
|
/*
|
|
|
|
* ARMv4L optimized DSP utils
|
|
|
|
* Copyright (c) 2001 Lionel Ulmer.
|
|
|
|
*
|
2002-05-26 00:45:33 +02:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
2001-08-13 23:38:25 +02:00
|
|
|
*
|
2002-05-26 00:45:33 +02:00
|
|
|
* This library is distributed in the hope that it will be useful,
|
2001-08-13 23:38:25 +02:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2002-05-26 00:45:33 +02:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
2001-08-13 23:38:25 +02:00
|
|
|
*
|
2002-05-26 00:45:33 +02:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2001-08-13 23:38:25 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "../dsputil.h"
|
|
|
|
|
|
|
|
extern void j_rev_dct_ARM(DCTELEM *data);
|
|
|
|
|
2003-03-03 15:54:00 +01:00
|
|
|
/* XXX: local hack */
|
|
|
|
static void (*ff_put_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int line_size);
|
|
|
|
static void (*ff_add_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int line_size);
|
|
|
|
|
|
|
|
/* XXX: those functions should be suppressed ASAP when all IDCTs are
|
|
|
|
converted */
|
|
|
|
static void arm_idct_put(uint8_t *dest, int line_size, DCTELEM *block)
|
|
|
|
{
|
|
|
|
j_rev_dct_ARM (block);
|
|
|
|
ff_put_pixels_clamped(block, dest, line_size);
|
|
|
|
}
|
|
|
|
static void arm_idct_add(uint8_t *dest, int line_size, DCTELEM *block)
|
|
|
|
{
|
|
|
|
j_rev_dct_ARM (block);
|
|
|
|
ff_add_pixels_clamped(block, dest, line_size);
|
|
|
|
}
|
|
|
|
|
|
|
|
void dsputil_init_armv4l(DSPContext* c, AVCodecContext *avctx)
|
2001-08-13 23:38:25 +02:00
|
|
|
{
|
2003-03-03 15:54:00 +01:00
|
|
|
const int idct_algo= avctx->idct_algo;
|
|
|
|
|
|
|
|
ff_put_pixels_clamped = c->put_pixels_clamped;
|
|
|
|
ff_add_pixels_clamped = c->add_pixels_clamped;
|
|
|
|
|
|
|
|
if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_ARM){
|
|
|
|
c->idct_put= arm_idct_put;
|
|
|
|
c->idct_add= arm_idct_add;
|
|
|
|
c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;/* FF_NO_IDCT_PERM */
|
|
|
|
}
|
2001-08-13 23:38:25 +02:00
|
|
|
}
|