Ticket #37: mplayer-vd-1-1.patch

File mplayer-vd-1-1.patch, 2.6 KB (added by mplayer-bugs@…, 15 years ago)

Improved patch. Tested & works.

  • mplayer.c

    RCS file: /cvsroot/mplayer/main/mplayer.c,v
    retrieving revision 1.764
    diff -u -r1.764 mplayer.c
     
    319319
    320320char* current_module=NULL; // for debugging
    321321
    322 // also modified by Gui/mplayer/gtk/eq.c:
    323 int vo_gamma_gamma = 1000;
    324 int vo_gamma_brightness = 1000;
    325 int vo_gamma_contrast = 1000;
    326 int vo_gamma_saturation = 1000;
    327 int vo_gamma_hue = 1000;
     322extern int vo_gamma_gamma;
     323extern int vo_gamma_brightness;
     324extern int vo_gamma_contrast;
     325extern int vo_gamma_saturation;
     326extern int vo_gamma_hue;
    328327
    329328// ---
    330329
     
    17801779// ========== Init display (sh_video->disp_w*sh_video->disp_h/out_fmt) ============
    17811780
    17821781current_module="init_vo";
    1783     if (sh_video)
    1784     {
    1785         if (vo_gamma_gamma != 1000)
    1786           set_video_colors (sh_video, "gamma", vo_gamma_gamma);
    1787         if (vo_gamma_brightness != 1000)
    1788             set_video_colors(sh_video, "brightness", vo_gamma_brightness);
    1789         if (vo_gamma_contrast != 1000)
    1790             set_video_colors(sh_video, "contrast", vo_gamma_contrast);
    1791         if (vo_gamma_saturation != 1000)
    1792             set_video_colors(sh_video, "saturation", vo_gamma_saturation);
    1793         if (vo_gamma_hue != 1000)
    1794             set_video_colors(sh_video, "hue", vo_gamma_hue);
    1795     }
    1796 
    17971782   if(vo_flags & 0x08 && vo_spudec)
    17981783      spudec_set_hw_spu(vo_spudec,video_out);
    17991784
  • libmpcodecs/vd.c

    RCS file: /cvsroot/mplayer/main/libmpcodecs/vd.c,v
    retrieving revision 1.77
    diff -u -r1.77 vd.c
     
    126126int vo_flags=0;
    127127int vd_use_slices=1;
    128128
     129// modified by mplayer.c and Gui/mplayer/gtk/eq.c:
     130int vo_gamma_gamma = 1000;
     131int vo_gamma_brightness = 1000;
     132int vo_gamma_contrast = 1000;
     133int vo_gamma_saturation = 1000;
     134int vo_gamma_hue = 1000;
     135
    129136extern vd_functions_t* mpvdec; // FIXME!
    130137extern int divx_quality;
    131138
     
    306313    }
    307314
    308315    sh->vf_inited=1;
     316
     317    if (vo_gamma_gamma != 1000)
     318        set_video_colors(sh, "gamma", vo_gamma_gamma);
     319    if (vo_gamma_brightness != 1000)
     320        set_video_colors(sh, "brightness", vo_gamma_brightness);
     321    if (vo_gamma_contrast != 1000)
     322        set_video_colors(sh, "contrast", vo_gamma_contrast);
     323    if (vo_gamma_saturation != 1000)
     324        set_video_colors(sh, "saturation", vo_gamma_saturation);
     325    if (vo_gamma_hue != 1000)
     326        set_video_colors(sh, "hue", vo_gamma_hue);
     327
    309328    return 1;
    310329}
    311330