diff --git a/libmpcodecs/dec_video.c b/libmpcodecs/dec_video.c index 4e6d8d32c7..f7f3d8a846 100644 --- a/libmpcodecs/dec_video.c +++ b/libmpcodecs/dec_video.c @@ -62,12 +62,16 @@ int divx_quality=0; static vd_functions_t* mpvdec=NULL; int get_video_quality_max(sh_video_t *sh_video){ -// switch(sh_video->codec->driver){ + if(mpvdec){ + int ret=mpvdec->control(sh_video,VDCTRL_QUERY_MAX_PP_LEVEL); + if(ret>=0) return ret; + } return 0; } void set_video_quality(sh_video_t *sh_video,int quality){ -// switch(sh_video->codec->driver){ + if(mpvdec) + mpvdec->control(sh_video,VDCTRL_SET_PP_LEVEL, (void*)(&quality)); } int set_video_colors(sh_video_t *sh_video,char *item,int value) diff --git a/libmpcodecs/vd.h b/libmpcodecs/vd.h index 6dd6d16623..2201427fc3 100644 --- a/libmpcodecs/vd.h +++ b/libmpcodecs/vd.h @@ -35,6 +35,8 @@ extern vd_functions_t* mpcodecs_vd_drivers[]; #define CONTROL_NA -3 #define VDCTRL_QUERY_FORMAT 3 /* test for availabilty of a format */ +#define VDCTRL_QUERY_MAX_PP_LEVEL 4 /* test for postprocessing support (max level) */ +#define VDCTRL_SET_PP_LEVEL 5 /* test for postprocessing support (max level) */ // callbacks: int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int preferred_outfmt);