comparison mencoder.c @ 2577:1a118523b1e6

YV12 fixed (for mpeg)
author arpi
date Tue, 30 Oct 2001 22:27:37 +0000
parents cc926eda63cd
children e94a20dec331
comparison
equal deleted inserted replaced
2576:437ed06579d8 2577:1a118523b1e6
78 } 78 }
79 x0>>=1;y0>>=1; 79 x0>>=1;y0>>=1;
80 w>>=1;h>>=1; 80 w>>=1;h>>=1;
81 // copy U: 81 // copy U:
82 for(y=0;y<h;y++){ 82 for(y=0;y<h;y++){
83 unsigned char* s=src[1]+stride[1]*(y0+y)+x0; 83 unsigned char* s=src[2]+stride[2]*(y0+y)+x0;
84 unsigned char* d=vo_image+vo_w*vo_h+(vo_w>>1)*(y0+y)+x0; 84 unsigned char* d=vo_image+vo_w*vo_h+(vo_w>>1)*(y0+y)+x0;
85 memcpy(d,s,w); 85 memcpy(d,s,w);
86 } 86 }
87 // copy V: 87 // copy V:
88 for(y=0;y<h;y++){ 88 for(y=0;y<h;y++){
144 } 144 }
145 145
146 if(argc>1) 146 if(argc>1)
147 stream=open_stream(argv[1],0,&file_format); 147 stream=open_stream(argv[1],0,&file_format);
148 else 148 else
149 stream=open_stream("/3d/divx/405divx_sm_v2[1].avi",0,&file_format); 149 stream=open_stream("/3d/abcug/Weird AL - Amish Paradise (MUSIC VIDEO).mpeg",0,&file_format);
150 // stream=open_stream("/3d/divx/405divx_sm_v2[1].avi",0,&file_format);
150 // stream=open_stream("/dev/cdrom",2,&file_format); // VCD track 2 151 // stream=open_stream("/dev/cdrom",2,&file_format); // VCD track 2
151 152
152 if(!stream){ 153 if(!stream){
153 printf("Cannot open file/device\n"); 154 printf("Cannot open file/device\n");
154 exit(1); 155 exit(1);
223 vo_h=sh_video->disp_h; 224 vo_h=sh_video->disp_h;
224 vo_image=malloc(vo_w*vo_h*3/2); 225 vo_image=malloc(vo_w*vo_h*3/2);
225 vo_image_ptr=vo_image; 226 vo_image_ptr=vo_image;
226 } 227 }
227 228
229 divx_quality=4;
230
228 if(!init_video(sh_video)){ 231 if(!init_video(sh_video)){
229 mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_CouldntInitVideoCodec); 232 mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_CouldntInitVideoCodec);
230 exit(1); 233 exit(1);
231 } 234 }
232 235
274 case VCODEC_DIVX4: 277 case VCODEC_DIVX4:
275 // init divx4linux: 278 // init divx4linux:
276 enc_param.x_dim=sh_video->disp_w; 279 enc_param.x_dim=sh_video->disp_w;
277 enc_param.y_dim=sh_video->disp_h; 280 enc_param.y_dim=sh_video->disp_h;
278 enc_param.framerate=sh_video->fps; 281 enc_param.framerate=sh_video->fps;
279 enc_param.bitrate=800; 282 enc_param.bitrate=1800000;
280 enc_param.rc_period=0; 283 enc_param.rc_period=0;
281 enc_param.rc_reaction_period=0; 284 enc_param.rc_reaction_period=0;
282 enc_param.rc_reaction_ratio=0; 285 enc_param.rc_reaction_ratio=0;
283 enc_param.max_quantizer=0; 286 enc_param.max_quantizer=0;
284 enc_param.min_quantizer=0; 287 enc_param.min_quantizer=0;