summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-13 15:33:13 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-13 15:33:13 +0000
commit84bf387404abde1317457e3e6f9ded69f3e547ec (patch)
treedd3a82454b9e5c36fd082c832ad4d4554b8972db
parent377dda939f4583ab7ba06475eef047ff8d3401ba (diff)
downloadmpv-84bf387404abde1317457e3e6f9ded69f3e547ec.tar.bz2
mpv-84bf387404abde1317457e3e6f9ded69f3e547ec.tar.xz
integrated new postproc code
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2185 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--Makefile2
-rwxr-xr-xconfigure2
-rw-r--r--dec_video.c24
3 files changed, 21 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 15c6320a26..6b989f96c5 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ PRG_CFG = codec-cfg
#prefix = /usr/local
BINDIR = ${prefix}/bin
# BINDIR = /usr/local/bin
-SRCS = mp_msg.c open.c parse_es.c ac3-iec958.c find_sub.c aviprint.c dec_audio.c dec_video.c aviwrite.c aviheader.c asfheader.c demux_avi.c demux_asf.c demux_mpg.c demux_mov.c demuxer.c stream.c codec-cfg.c subreader.c linux/getch2.c linux/timer-lx.c linux/shmem.c xa/xa_gsm.c xa/rle8.c lirc_mp.c cfgparser.c mixer.c dvdauth.c spudec.c $(STREAM_SRCS)
+SRCS = postproc/postprocess.c mp_msg.c open.c parse_es.c ac3-iec958.c find_sub.c aviprint.c dec_audio.c dec_video.c aviwrite.c aviheader.c asfheader.c demux_avi.c demux_asf.c demux_mpg.c demux_mov.c demuxer.c stream.c codec-cfg.c subreader.c linux/getch2.c linux/timer-lx.c linux/shmem.c xa/xa_gsm.c xa/rle8.c lirc_mp.c cfgparser.c mixer.c dvdauth.c spudec.c $(STREAM_SRCS)
OBJS = $(SRCS:.c=.o)
CFLAGS = $(OPTFLAGS) -Iloader -Ilibvo $(CSS_INC) $(EXTRA_INC) # -Wall
A_LIBS = -Lmp3lib -lMP3 -Llibac3 -lac3 $(ALSA_LIB) $(ESD_LIB)
diff --git a/configure b/configure
index bffb4f42b3..f6709e05a7 100755
--- a/configure
+++ b/configure
@@ -2393,6 +2393,8 @@ $_cssdef
/* Define this to enable MPEG 1/2 image postprocessing (requires FAST cpu!) */
#define MPEG12_POSTPROC
+#define HAVE_ODIVX_POSTPROCESS
+
/* Win32 DLL support */
$_win32dll
diff --git a/dec_video.c b/dec_video.c
index a6c70bf2d8..b669d8a1a1 100644
--- a/dec_video.c
+++ b/dec_video.c
@@ -43,6 +43,8 @@ extern int frameratecode2framerate[16];
#include "libmpeg2/mpeg2.h"
#include "libmpeg2/mpeg2_internal.h"
+#include "postproc/postprocess.h"
+
extern picture_t *picture; // exported from libmpeg2/decode.c
@@ -98,7 +100,7 @@ int get_video_quality_max(sh_video_t *sh_video){
#ifdef USE_WIN32DLL
case VFM_VFW:
case VFM_VFWEX:
- return 6;
+ return 9; // for Divx.dll (divx4)
#endif
#ifdef USE_DIRECTSHOW
case VFM_DSHOW:
@@ -106,10 +108,15 @@ int get_video_quality_max(sh_video_t *sh_video){
#endif
#ifdef MPEG12_POSTPROC
case VFM_MPEG:
+ return GET_PP_QUALITY_MAX;
#endif
case VFM_DIVX4:
case VFM_ODIVX:
- return 6;
+#ifdef NEW_DECORE
+ return 9; // for divx4linux
+#else
+ return GET_PP_QUALITY_MAX; // for opendivx
+#endif
}
return 0;
}
@@ -131,16 +138,21 @@ void set_video_quality(sh_video_t *sh_video,int quality){
#endif
#ifdef MPEG12_POSTPROC
case VFM_MPEG: {
- if(quality<0 || quality>6) quality=6;
- picture->pp_options=(1<<quality)-1;
+ if(quality<0 || quality>GET_PP_QUALITY_MAX) quality=GET_PP_QUALITY_MAX;
+ picture->pp_options=getPpModeForQuality(quality);
}
break;
#endif
case VFM_DIVX4:
case VFM_ODIVX: {
DEC_SET dec_set;
- if(quality<0 || quality>6) quality=6;
- dec_set.postproc_level=(1<<quality)-1;
+#ifdef NEW_DECORE
+ if(quality<0 || quality>9) quality=9;
+ dec_set.postproc_level=quality*10;
+#else
+ if(quality<0 || quality>GET_PP_QUALITY_MAX) quality=GET_PP_QUALITY_MAX;
+ dec_set.postproc_level=getPpModeForQuality(quality);
+#endif
decore(0x123,DEC_OPT_SETPP,&dec_set,NULL);
}
break;