summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/dec_video.c
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-07-24 18:14:21 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-07-24 18:14:21 +0000
commit2de7e088118b83235262483041d556c16410cbce (patch)
tree6fd692aada4fd7c1c4488c86dd1b3f5103123ffe /libmpcodecs/dec_video.c
parentee5c104bd4f1da26ac689375feaf229b56f98eee (diff)
downloadmpv-2de7e088118b83235262483041d556c16410cbce.tar.bz2
mpv-2de7e088118b83235262483041d556c16410cbce.tar.xz
equalizer reworked
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6781 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/dec_video.c')
-rw-r--r--libmpcodecs/dec_video.c66
1 files changed, 18 insertions, 48 deletions
diff --git a/libmpcodecs/dec_video.c b/libmpcodecs/dec_video.c
index 37917a4608..6727013553 100644
--- a/libmpcodecs/dec_video.c
+++ b/libmpcodecs/dec_video.c
@@ -76,53 +76,23 @@ void set_video_quality(sh_video_t *sh_video,int quality){
int set_video_colors(sh_video_t *sh_video,char *item,int value)
{
- if(vo_vaa.get_video_eq)
- {
- vidix_video_eq_t veq;
- if(vo_vaa.get_video_eq(&veq) == 0)
- {
- int v_hw_equ_cap = veq.cap;
- if(v_hw_equ_cap != 0)
- {
- if(vo_vaa.set_video_eq)
- {
- veq.flags = VEQ_FLG_ITU_R_BT_601; /* Fixme please !!! */
- if(strcmp(item,"Brightness") == 0)
- {
- if(!(v_hw_equ_cap & VEQ_CAP_BRIGHTNESS)) goto try_sw_control;
- veq.brightness = value*10;
- veq.cap = VEQ_CAP_BRIGHTNESS;
- }
- else
- if(strcmp(item,"Contrast") == 0)
- {
- if(!(v_hw_equ_cap & VEQ_CAP_CONTRAST)) goto try_sw_control;
- veq.contrast = value*10;
- veq.cap = VEQ_CAP_CONTRAST;
- }
- else
- if(strcmp(item,"Saturation") == 0)
- {
- if(!(v_hw_equ_cap & VEQ_CAP_SATURATION)) goto try_sw_control;
- veq.saturation = value*10;
- veq.cap = VEQ_CAP_SATURATION;
- }
- else
- if(strcmp(item,"Hue") == 0)
- {
- if(!(v_hw_equ_cap & VEQ_CAP_HUE)) goto try_sw_control;
- veq.hue = value*10;
- veq.cap = VEQ_CAP_HUE;
- }
- else goto try_sw_control;;
- vo_vaa.set_video_eq(&veq);
- }
- return 1;
- }
- }
- }
- try_sw_control:
- if(mpvdec) return mpvdec->control(sh_video,VDCTRL_SET_EQUALIZER,item,(int)value);
+ vf_instance_t* vf=sh_video->vfilter;
+
+ if (vf->control(vf, VFCTRL_SET_EQUALIZER, item, (int *)value) == CONTROL_TRUE)
+ return 1;
+ /* try software control */
+ if(mpvdec) return mpvdec->control(sh_video,VDCTRL_SET_EQUALIZER, item, (int *)value);
+ return 0;
+}
+
+int get_video_colors(sh_video_t *sh_video,char *item,int *value)
+{
+ vf_instance_t* vf=sh_video->vfilter;
+
+ if (vf->control(vf, VFCTRL_GET_EQUALIZER, item, value) == CONTROL_TRUE)
+ return 1;
+ /* try software control */
+ if(mpvdec) return mpvdec->control(sh_video,VDCTRL_GET_EQUALIZER, item, value);
return 0;
}
@@ -201,7 +171,7 @@ mpi=mpvdec->decode(sh_video, start, in_size, drop_frame);
//------------------------ frame decoded. --------------------
#ifdef ARCH_X86
- // some codecs is broken, and doesn't restore MMX state :(
+ // some codecs are broken, and doesn't restore MMX state :(
// it happens usually with broken/damaged files.
if(gCpuCaps.has3DNow){
__asm __volatile ("femms\n\t":::"memory");