mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
the return of the idct with 16bit output by ("Ivan Kalvachev" <ivan at cacad dot com>)
Originally committed as revision 1983 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
daab329603
commit
4fb518c392
@ -363,4 +363,5 @@ void dsputil_init_alpha(DSPContext* c, AVCodecContext *avctx)
|
||||
|
||||
c->idct_put = simple_idct_put_axp;
|
||||
c->idct_add = simple_idct_add_axp;
|
||||
c->idct_idct = simple_idct_axp;
|
||||
}
|
||||
|
@ -48,6 +48,7 @@ void dsputil_init_armv4l(DSPContext* c, AVCodecContext *avctx)
|
||||
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 = j_rev_dct_ARM;
|
||||
c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;/* FF_NO_IDCT_PERM */
|
||||
}
|
||||
}
|
||||
|
@ -2860,10 +2860,12 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx)
|
||||
if(avctx->idct_algo==FF_IDCT_INT){
|
||||
c->idct_put= ff_jref_idct_put;
|
||||
c->idct_add= ff_jref_idct_add;
|
||||
c->idct = j_rev_dct;
|
||||
c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;
|
||||
}else{ //accurate/default
|
||||
c->idct_put= simple_idct_put;
|
||||
c->idct_add= simple_idct_add;
|
||||
c->idct = simple_idct;
|
||||
c->idct_permutation_type= FF_NO_IDCT_PERM;
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,6 @@
|
||||
//#define DEBUG
|
||||
/* dct code */
|
||||
typedef short DCTELEM;
|
||||
//typedef int DCTELEM;
|
||||
|
||||
void fdct_ifast (DCTELEM *data);
|
||||
void ff_jpeg_fdct_islow (DCTELEM *data);
|
||||
@ -240,6 +239,9 @@ typedef struct DSPContext {
|
||||
/* (I)DCT */
|
||||
void (*fdct)(DCTELEM *block/* align 16*/);
|
||||
|
||||
/* IDCT really*/
|
||||
void (*idct)(DCTELEM *block/* align 16*/);
|
||||
|
||||
/**
|
||||
* block -> idct -> clip to unsigned 8 bit -> dest.
|
||||
* (-1392, 0, 0, ...) -> idct -> (-174, -174, ...) -> put -> (0, 0, ...)
|
||||
|
@ -1567,14 +1567,17 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
|
||||
if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_SIMPLEMMX){
|
||||
c->idct_put= ff_simple_idct_put_mmx;
|
||||
c->idct_add= ff_simple_idct_add_mmx;
|
||||
c->idct = ff_simple_idct_mmx;
|
||||
c->idct_permutation_type= FF_SIMPLE_IDCT_PERM;
|
||||
}else if(idct_algo==FF_IDCT_LIBMPEG2MMX){
|
||||
if(mm_flags & MM_MMXEXT){
|
||||
c->idct_put= ff_libmpeg2mmx2_idct_put;
|
||||
c->idct_add= ff_libmpeg2mmx2_idct_add;
|
||||
c->idct = ff_mmxext_idct;
|
||||
}else{
|
||||
c->idct_put= ff_libmpeg2mmx_idct_put;
|
||||
c->idct_add= ff_libmpeg2mmx_idct_add;
|
||||
c->idct = ff_mmx_idct;
|
||||
}
|
||||
c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;
|
||||
}
|
||||
|
@ -221,6 +221,11 @@ static void ff_idct_add_mlib(uint8_t *dest, int line_size, DCTELEM *data)
|
||||
mlib_VideoAddBlock_U8_S16(dest, (mlib_s16 *)data, line_size);
|
||||
}
|
||||
|
||||
static void ff_idct_mlib(uint8_t *dest, int line_size, DCTELEM *data)
|
||||
{
|
||||
mlib_VideoIDCT8x8_S16_S16 (data, data);
|
||||
}
|
||||
|
||||
static void ff_fdct_mlib(DCTELEM *data)
|
||||
{
|
||||
mlib_VideoDCT8x8_S16_S16 (data, data);
|
||||
@ -264,6 +269,7 @@ void MPV_common_init_mlib(MpegEncContext *s)
|
||||
if(s->avctx->idct_algo==FF_IDCT_AUTO || s->avctx->idct_algo==FF_IDCT_MLIB){
|
||||
s->dsp.idct_put= ff_idct_put_mlib;
|
||||
s->dsp.idct_add= ff_idct_add_mlib;
|
||||
s->dsp.idct = ff_idct_mlib;
|
||||
s->dsp.idct_permutation_type= FF_NO_IDCT_PERM;
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
void ff_mmi_idct_put(uint8_t *dest, int line_size, DCTELEM *block);
|
||||
void ff_mmi_idct_add(uint8_t *dest, int line_size, DCTELEM *block);
|
||||
|
||||
void ff_mmi_idct(DCTELEM *block);
|
||||
|
||||
static void clear_blocks_mmi(DCTELEM * blocks)
|
||||
{
|
||||
@ -154,6 +154,7 @@ void dsputil_init_mmi(DSPContext* c, AVCodecContext *avctx)
|
||||
if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_PS2){
|
||||
c->idct_put= ff_mmi_idct_put;
|
||||
c->idct_add= ff_mmi_idct_add;
|
||||
c->idct = ff_mmi_idct;
|
||||
c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;
|
||||
}
|
||||
}
|
||||
|
@ -112,6 +112,7 @@ void dsputil_init_sh4(DSPContext* c, AVCodecContext *avctx)
|
||||
if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_SH4){
|
||||
c->idct_put = idct_put;
|
||||
c->idct_add = idct_add;
|
||||
c->idct = idct_sh4;
|
||||
c->idct_permutation_type= FF_NO_IDCT_PERM; //FF_SIMPLE_IDCT_PERM; //FF_LIBMPEG2_IDCT_PERM;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user