comparison libvo/vo_gl.c @ 28059:8f43ff543dc6

Add support for YCBCR MESA texture format to vo_gl.
author reimar
date Fri, 05 Dec 2008 15:36:54 +0000
parents 170c4c26e75d
children 70a2108520eb
comparison
equal deleted inserted replaced
28058:323c1ddffdd6 28059:8f43ff543dc6
69 static int osdtexCnt; 69 static int osdtexCnt;
70 static int eosdtexCnt; 70 static int eosdtexCnt;
71 static int osd_color; 71 static int osd_color;
72 72
73 static int use_aspect; 73 static int use_aspect;
74 static int use_ycbcr;
74 static int use_yuv; 75 static int use_yuv;
75 static int lscale; 76 static int lscale;
76 static int cscale; 77 static int cscale;
77 static float filter_strength; 78 static float filter_strength;
78 static int yuvconvtype; 79 static int yuvconvtype;
831 return caps; 832 return caps;
832 // HACK, otherwise we get only b&w with some filters (e.g. -vf eq) 833 // HACK, otherwise we get only b&w with some filters (e.g. -vf eq)
833 // ideally MPlayer should be fixed instead not to use Y800 when it has the choice 834 // ideally MPlayer should be fixed instead not to use Y800 when it has the choice
834 if (!use_yuv && (format == IMGFMT_Y8 || format == IMGFMT_Y800)) 835 if (!use_yuv && (format == IMGFMT_Y8 || format == IMGFMT_Y800))
835 return 0; 836 return 0;
837 if (!use_ycbcr && (format == IMGFMT_UYVY || format == IMGFMT_YUY2))
838 return 0;
836 if (many_fmts && 839 if (many_fmts &&
837 glFindFormat(format, NULL, NULL, NULL, NULL)) 840 glFindFormat(format, NULL, NULL, NULL, NULL))
838 return caps; 841 return caps;
839 return 0; 842 return 0;
840 } 843 }
856 static opt_t subopts[] = { 859 static opt_t subopts[] = {
857 {"manyfmts", OPT_ARG_BOOL, &many_fmts, NULL}, 860 {"manyfmts", OPT_ARG_BOOL, &many_fmts, NULL},
858 {"osd", OPT_ARG_BOOL, &use_osd, NULL}, 861 {"osd", OPT_ARG_BOOL, &use_osd, NULL},
859 {"scaled-osd", OPT_ARG_BOOL, &scaled_osd, NULL}, 862 {"scaled-osd", OPT_ARG_BOOL, &scaled_osd, NULL},
860 {"aspect", OPT_ARG_BOOL, &use_aspect, NULL}, 863 {"aspect", OPT_ARG_BOOL, &use_aspect, NULL},
864 {"ycbcr", OPT_ARG_BOOL, &use_ycbcr, NULL},
861 {"slice-height", OPT_ARG_INT, &slice_height, (opt_test_f)int_non_neg}, 865 {"slice-height", OPT_ARG_INT, &slice_height, (opt_test_f)int_non_neg},
862 {"rectangle", OPT_ARG_INT, &use_rectangle,(opt_test_f)int_non_neg}, 866 {"rectangle", OPT_ARG_INT, &use_rectangle,(opt_test_f)int_non_neg},
863 {"yuv", OPT_ARG_INT, &use_yuv, (opt_test_f)int_non_neg}, 867 {"yuv", OPT_ARG_INT, &use_yuv, (opt_test_f)int_non_neg},
864 {"lscale", OPT_ARG_INT, &lscale, (opt_test_f)int_non_neg}, 868 {"lscale", OPT_ARG_INT, &lscale, (opt_test_f)int_non_neg},
865 {"cscale", OPT_ARG_INT, &cscale, (opt_test_f)int_non_neg}, 869 {"cscale", OPT_ARG_INT, &cscale, (opt_test_f)int_non_neg},
881 // set defaults 885 // set defaults
882 many_fmts = 1; 886 many_fmts = 1;
883 use_osd = 1; 887 use_osd = 1;
884 scaled_osd = 0; 888 scaled_osd = 0;
885 use_aspect = 1; 889 use_aspect = 1;
890 use_ycbcr = 0;
886 use_yuv = 0; 891 use_yuv = 0;
887 lscale = 0; 892 lscale = 0;
888 cscale = 0; 893 cscale = 0;
889 filter_strength = 0.5; 894 filter_strength = 0.5;
890 use_rectangle = 0; 895 use_rectangle = 0;