divx4 brightness etc support patch by Adam Tla/lka

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2296 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2001-10-19 15:21:36 +00:00
parent 3640ce3005
commit d59d26f1ea
1 changed files with 17 additions and 1 deletions

View File

@ -174,10 +174,26 @@ void set_video_quality(sh_video_t *sh_video,int quality){
int set_video_colors(sh_video_t *sh_video,char *item,int value){
#ifdef USE_DIRECTSHOW
if(!strcmp(sh_video->codec->name,"divxds")){
if(sh_video->codec->driver==VFM_DSHOW){
DS_SetValue_DivX(item,value);
return 1;
}
#endif
#ifdef NEW_DECORE
#ifdef DECORE_VERSION
#if DECORE_VERSION >= 20011010
if(sh_video->codec->driver==VFM_DIVX4){
int option;
if(!strcmp(item,"Brightness")) option=DEC_GAMMA_BRIGHTNESS;
else if(!strcmp(item, "Contrast")) option=DEC_GAMMA_CONTRAST;
else if(!strcmp(item,"Saturation")) option=DEC_GAMMA_SATURATION;
else return 0;
value = (value * 256) / 100 - 128;
decore(0x123, DEC_OPT_GAMMA, (void *)option, (void *) value);
return 1;
}
#endif
#endif
#endif
return 0;
}