mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
trying to fix the non-x86 IDCTs (untested)
Originally committed as revision 1006 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
6c38306600
commit
676e200cff
@ -55,7 +55,7 @@ endif
|
|||||||
# armv4l specific stuff
|
# armv4l specific stuff
|
||||||
ifeq ($(TARGET_ARCH_ARMV4L),yes)
|
ifeq ($(TARGET_ARCH_ARMV4L),yes)
|
||||||
ASM_OBJS += armv4l/jrevdct_arm.o
|
ASM_OBJS += armv4l/jrevdct_arm.o
|
||||||
OBJS += armv4l/dsputil_arm.o
|
OBJS += armv4l/dsputil_arm.o armv4l/mpegvideo_arm.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# sun mediaLib specific stuff
|
# sun mediaLib specific stuff
|
||||||
|
@ -23,5 +23,5 @@ extern void j_rev_dct_ARM(DCTELEM *data);
|
|||||||
|
|
||||||
void dsputil_init_armv4l(void)
|
void dsputil_init_armv4l(void)
|
||||||
{
|
{
|
||||||
ff_idct = j_rev_dct_ARM;
|
// ff_idct = j_rev_dct_ARM;
|
||||||
}
|
}
|
||||||
|
50
libavcodec/armv4l/mpegvideo_arm.c
Normal file
50
libavcodec/armv4l/mpegvideo_arm.c
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2002 Michael Niedermayer
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "../dsputil.h"
|
||||||
|
#include "../mpegvideo.h"
|
||||||
|
#include "../avcodec.h"
|
||||||
|
|
||||||
|
extern void j_rev_dct_ARM(DCTELEM *data);
|
||||||
|
|
||||||
|
/* XXX: those functions should be suppressed ASAP when all IDCTs are
|
||||||
|
converted */
|
||||||
|
static void arm_idct_put(UINT8 *dest, int line_size, DCTELEM *block)
|
||||||
|
{
|
||||||
|
j_rev_dct_ARM (block);
|
||||||
|
put_pixels_clamped(block, dest, line_size);
|
||||||
|
}
|
||||||
|
static void arm_idct_add(UINT8 *dest, int line_size, DCTELEM *block)
|
||||||
|
{
|
||||||
|
j_rev_dct_ARM (block);
|
||||||
|
add_pixels_clamped(block, dest, line_size);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MPV_common_init_armv4l(MpegEncContext *s)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
const int idct_algo= s->avctx->idct_algo;
|
||||||
|
|
||||||
|
if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_ARM){
|
||||||
|
s->idct_put= arm_idct_put;
|
||||||
|
s->idct_add= arm_idct_add;
|
||||||
|
for(i=0; i<64; i++)
|
||||||
|
s->idct_permutation[i]= i;
|
||||||
|
}
|
||||||
|
}
|
@ -112,12 +112,18 @@ static void add_pixels_clamped_mlib(const DCTELEM *block, UINT8 *pixels, int lin
|
|||||||
mlib_VideoAddBlock_U8_S16(pixels, (mlib_s16 *)block, line_size);
|
mlib_VideoAddBlock_U8_S16(pixels, (mlib_s16 *)block, line_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* XXX: those functions should be suppressed ASAP when all IDCTs are
|
||||||
void ff_idct_mlib(DCTELEM *data)
|
converted */
|
||||||
|
static void mlib_idct_put(UINT8 *dest, int line_size, DCTELEM *block)
|
||||||
{
|
{
|
||||||
mlib_VideoIDCT8x8_S16_S16 (data, data);
|
mlib_VideoIDCT8x8_S16_S16 (data, data);
|
||||||
|
put_pixels_clamped(block, dest, line_size);
|
||||||
|
}
|
||||||
|
static void mlib_idct_add(UINT8 *dest, int line_size, DCTELEM *block)
|
||||||
|
{
|
||||||
|
mlib_VideoIDCT8x8_S16_S16 (data, data);
|
||||||
|
add_pixels_clamped(block, dest, line_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ff_fdct_mlib(DCTELEM *data)
|
void ff_fdct_mlib(DCTELEM *data)
|
||||||
{
|
{
|
||||||
@ -126,8 +132,6 @@ void ff_fdct_mlib(DCTELEM *data)
|
|||||||
|
|
||||||
void dsputil_init_mlib(void)
|
void dsputil_init_mlib(void)
|
||||||
{
|
{
|
||||||
ff_idct = ff_idct_mlib;
|
|
||||||
|
|
||||||
put_pixels_tab[1][0] = put_pixels_mlib;
|
put_pixels_tab[1][0] = put_pixels_mlib;
|
||||||
put_pixels_tab[1][1] = put_pixels_x2_mlib;
|
put_pixels_tab[1][1] = put_pixels_x2_mlib;
|
||||||
put_pixels_tab[1][2] = put_pixels_y2_mlib;
|
put_pixels_tab[1][2] = put_pixels_y2_mlib;
|
||||||
@ -145,7 +149,18 @@ void dsputil_init_mlib(void)
|
|||||||
|
|
||||||
void MPV_common_init_mlib(MpegEncContext *s)
|
void MPV_common_init_mlib(MpegEncContext *s)
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
|
const int idct_algo= s->avctx->idct_algo;
|
||||||
|
|
||||||
if(s->avctx->dct_algo==FF_DCT_AUTO || s->avctx->dct_algo==FF_DCT_MLIB){
|
if(s->avctx->dct_algo==FF_DCT_AUTO || s->avctx->dct_algo==FF_DCT_MLIB){
|
||||||
s->fdct = ff_fdct_mlib;
|
s->fdct = ff_fdct_mlib;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_MLIB){
|
||||||
|
s->idct_put= mlib_idct_put;
|
||||||
|
s->idct_add= mlib_idct_add;
|
||||||
|
for(i=0; i<64; i++)
|
||||||
|
s->idct_permutation[i]= i;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -218,6 +218,10 @@ int DCT_common_init(MpegEncContext *s)
|
|||||||
#ifdef HAVE_MMI
|
#ifdef HAVE_MMI
|
||||||
MPV_common_init_mmi(s);
|
MPV_common_init_mmi(s);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef ARCH_ARMV4L
|
||||||
|
MPV_common_init_armv4l();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* load & permutate scantables
|
/* load & permutate scantables
|
||||||
note: only wmv uses differnt ones
|
note: only wmv uses differnt ones
|
||||||
|
Loading…
Reference in New Issue
Block a user