summaryrefslogtreecommitdiff
path: root/libavcodec/i386
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2002-08-29 23:55:32 +0000
committerMichael Niedermayer <michaelni@gmx.at>2002-08-29 23:55:32 +0000
commit28db7fce02f94c83cddc611f8811a6e8afd57050 (patch)
tree311bd4619432ddab25232c4a07a5639e45d79900 /libavcodec/i386
parente647c59840f37b6918f5315cf1f8e5c2ea03ba95 (diff)
slow but accurate integer dct from IJG (should be ok with the LGPL as the old DCT is the fast integer DCT from IJG)
per context DCT selection Originally committed as revision 878 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/i386')
-rw-r--r--libavcodec/i386/dsputil_mmx.c2
-rw-r--r--libavcodec/i386/mpegvideo_mmx.c13
-rw-r--r--libavcodec/i386/mpegvideo_mmx_template.c3
3 files changed, 11 insertions, 7 deletions
diff --git a/libavcodec/i386/dsputil_mmx.c b/libavcodec/i386/dsputil_mmx.c
index 02558604bc..f1bace79dd 100644
--- a/libavcodec/i386/dsputil_mmx.c
+++ b/libavcodec/i386/dsputil_mmx.c
@@ -424,8 +424,6 @@ void dsputil_init_mmx(void)
pix_abs8x8_y2 = pix_abs8x8_y2_mmx;
pix_abs8x8_xy2= pix_abs8x8_xy2_mmx;
- av_fdct = fdct_mmx;
-
put_pixels_tab[0] = put_pixels_mmx;
put_pixels_tab[1] = put_pixels_x2_mmx;
put_pixels_tab[2] = put_pixels_y2_mmx;
diff --git a/libavcodec/i386/mpegvideo_mmx.c b/libavcodec/i386/mpegvideo_mmx.c
index fceccf7bd2..10efc173f3 100644
--- a/libavcodec/i386/mpegvideo_mmx.c
+++ b/libavcodec/i386/mpegvideo_mmx.c
@@ -552,16 +552,21 @@ void unused_var_warning_killer(){
void MPV_common_init_mmx(MpegEncContext *s)
{
if (mm_flags & MM_MMX) {
+ const int dct_algo= s->avctx->dct_algo;
s->dct_unquantize_h263 = dct_unquantize_h263_mmx;
s->dct_unquantize_mpeg1 = dct_unquantize_mpeg1_mmx;
s->dct_unquantize_mpeg2 = dct_unquantize_mpeg2_mmx;
draw_edges = draw_edges_mmx;
- if(mm_flags & MM_MMXEXT){
- dct_quantize= dct_quantize_MMX2;
- } else {
- dct_quantize= dct_quantize_MMX;
+ if(dct_algo==FF_DCT_AUTO || dct_algo==FF_DCT_MMX){
+ s->fdct = fdct_mmx;
+
+ if(mm_flags & MM_MMXEXT){
+ s->dct_quantize= dct_quantize_MMX2;
+ } else {
+ s->dct_quantize= dct_quantize_MMX;
+ }
}
}
}
diff --git a/libavcodec/i386/mpegvideo_mmx_template.c b/libavcodec/i386/mpegvideo_mmx_template.c
index d84f253013..6c3e52ea5f 100644
--- a/libavcodec/i386/mpegvideo_mmx_template.c
+++ b/libavcodec/i386/mpegvideo_mmx_template.c
@@ -40,7 +40,8 @@ static int RENAME(dct_quantize)(MpegEncContext *s,
const UINT16 *qmat, *bias;
static __align8 INT16 temp_block[64];
- av_fdct (block);
+ //s->fdct (block);
+ fdct_mmx (block); //cant be anything else ...
if (s->mb_intra) {
int dummy;