0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

integrated new postproc code

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2185 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2001-10-13 15:33:13 +00:00
parent 377dda939f
commit 84bf387404
3 changed files with 21 additions and 7 deletions

View File

@ -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)

2
configure vendored
View File

@ -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

View File

@ -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;