comparison libmpcodecs/ve_lavc.c @ 6461:b2f659932839

wmv1 grayscale only encoding (forgot to commit that ...)
author michael
date Tue, 18 Jun 2002 01:39:26 +0000
parents 140e94c4c89b
children d6adae1af0e3
comparison
equal deleted inserted replaced
6460:945071cf52ae 6461:b2f659932839
62 static int lavc_param_luma_elim_threshold = 0; 62 static int lavc_param_luma_elim_threshold = 0;
63 static int lavc_param_chroma_elim_threshold = 0; 63 static int lavc_param_chroma_elim_threshold = 0;
64 static int lavc_param_packet_size= 0; 64 static int lavc_param_packet_size= 0;
65 static int lavc_param_strict= 0; 65 static int lavc_param_strict= 0;
66 static int lavc_param_data_partitioning= 0; 66 static int lavc_param_data_partitioning= 0;
67 static int lavc_param_gray=0;
67 68
68 #include "cfgparser.h" 69 #include "cfgparser.h"
69 70
70 #ifdef USE_LIBAVCODEC 71 #ifdef USE_LIBAVCODEC
71 struct config lavcopts_conf[]={ 72 struct config lavcopts_conf[]={
93 {"vpsize", &lavc_param_packet_size, CONF_TYPE_INT, CONF_RANGE, 0, 100000000, NULL}, 94 {"vpsize", &lavc_param_packet_size, CONF_TYPE_INT, CONF_RANGE, 0, 100000000, NULL},
94 {"vstrict", &lavc_param_strict, CONF_TYPE_FLAG, 0, 0, 1, NULL}, 95 {"vstrict", &lavc_param_strict, CONF_TYPE_FLAG, 0, 0, 1, NULL},
95 {"vdpart", &lavc_param_data_partitioning, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_PART, NULL}, 96 {"vdpart", &lavc_param_data_partitioning, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_PART, NULL},
96 #endif 97 #endif
97 {"keyint", &lavc_param_keyint, CONF_TYPE_INT, 0, 0, 0, NULL}, 98 {"keyint", &lavc_param_keyint, CONF_TYPE_INT, 0, 0, 0, NULL},
99 #if LIBAVCODEC_BUILD >= 4614
100 {"gray", &lavc_param_gray, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_PART, NULL},
101 #endif
98 {NULL, NULL, 0, 0, 0, 0, NULL} 102 {NULL, NULL, 0, 0, 0, 0, NULL}
99 }; 103 };
100 #endif 104 #endif
101 105
102 struct vf_priv_s { 106 struct vf_priv_s {
173 177
174 lavc_venc_context.flags|= lavc_param_v4mv ? CODEC_FLAG_4MV : 0; 178 lavc_venc_context.flags|= lavc_param_v4mv ? CODEC_FLAG_4MV : 0;
175 #ifdef CODEC_FLAG_PART 179 #ifdef CODEC_FLAG_PART
176 lavc_venc_context.flags|= lavc_param_data_partitioning; 180 lavc_venc_context.flags|= lavc_param_data_partitioning;
177 #endif 181 #endif
182 #if LIBAVCODEC_BUILD >= 4614
183 if(lavc_param_gray) lavc_venc_context.flags|= CODEC_FLAG_GRAY;
184 #endif
185
178 186
179 /* lavc internal 2pass bitrate control */ 187 /* lavc internal 2pass bitrate control */
180 if(lavc_param_vpass==1) 188 if(lavc_param_vpass==1)
181 lavc_venc_context.flags|= CODEC_FLAG_PASS1; 189 lavc_venc_context.flags|= CODEC_FLAG_PASS1;
182 else if(lavc_param_vpass==2) 190 else if(lavc_param_vpass==2)
335 mux_v->bih->biCompression = mmioFOURCC('D', 'I', 'V', 'X'); 343 mux_v->bih->biCompression = mmioFOURCC('D', 'I', 'V', 'X');
336 else if (!strcasecmp(lavc_param_vcodec, "msmpeg4")) 344 else if (!strcasecmp(lavc_param_vcodec, "msmpeg4"))
337 mux_v->bih->biCompression = mmioFOURCC('d', 'i', 'v', '3'); 345 mux_v->bih->biCompression = mmioFOURCC('d', 'i', 'v', '3');
338 else if (!strcasecmp(lavc_param_vcodec, "msmpeg4v2")) 346 else if (!strcasecmp(lavc_param_vcodec, "msmpeg4v2"))
339 mux_v->bih->biCompression = mmioFOURCC('M', 'P', '4', '2'); 347 mux_v->bih->biCompression = mmioFOURCC('M', 'P', '4', '2');
348 else if (!strcasecmp(lavc_param_vcodec, "wmv1"))
349 mux_v->bih->biCompression = mmioFOURCC('W', 'M', 'V', '1');
340 else 350 else
341 mux_v->bih->biCompression = mmioFOURCC(lavc_param_vcodec[0], 351 mux_v->bih->biCompression = mmioFOURCC(lavc_param_vcodec[0],
342 lavc_param_vcodec[1], lavc_param_vcodec[2], lavc_param_vcodec[3]); /* FIXME!!! */ 352 lavc_param_vcodec[1], lavc_param_vcodec[2], lavc_param_vcodec[3]); /* FIXME!!! */
343 353
344 if (!avcodec_inited){ 354 if (!avcodec_inited){