Mercurial > mplayer.hg
comparison mencoder.c @ 5386:e93fc4a8851a
2-pass lavc encoding fixed
author | arpi |
---|---|
date | Fri, 29 Mar 2002 01:01:35 +0000 |
parents | 7f3fe7dbca7a |
children | 3af2729c5c87 |
comparison
equal
deleted
inserted
replaced
5385:b2549a1b444c | 5386:e93fc4a8851a |
---|---|
1217 lavc_venc_context.quality = lavc_param_vqscale; | 1217 lavc_venc_context.quality = lavc_param_vqscale; |
1218 } | 1218 } |
1219 | 1219 |
1220 switch(pass){ | 1220 switch(pass){ |
1221 case 1: | 1221 case 1: |
1222 if (VbrControl_init_2pass_vbr_analysis(passtmpfile, lavc_param_vme) == -1) | 1222 if (VbrControl_init_2pass_vbr_analysis(passtmpfile, 5) == -1) |
1223 { | 1223 { |
1224 printf("2pass failed: filename=%s\n", passtmpfile); | 1224 printf("2pass failed: filename=%s\n", passtmpfile); |
1225 pass_working = 0; | 1225 pass_working = 0; |
1226 } | 1226 } |
1227 else | 1227 else |
1228 pass_working = 1; | 1228 pass_working = 1; |
1229 break; | 1229 break; |
1230 case 2: | 1230 case 2: |
1231 if (VbrControl_init_2pass_vbr_encoding(passtmpfile, | 1231 if (VbrControl_init_2pass_vbr_encoding(passtmpfile, |
1232 lavc_venc_context.bit_rate, | 1232 lavc_venc_context.bit_rate, |
1233 lavc_venc_context.frame_rate, | 1233 force_ofps?force_ofps:sh_video->fps, |
1234 100, /* crispness */ | 1234 100, /* crispness */ |
1235 lavc_param_vme) == -1) | 1235 5) == -1) |
1236 { | 1236 { |
1237 printf("2pass failed: filename=%s\n", passtmpfile); | 1237 printf("2pass failed: filename=%s\n", passtmpfile); |
1238 pass_working = 0; | 1238 pass_working = 0; |
1239 } | 1239 } |
1240 else | 1240 else { |
1241 pass_working = 1; | 1241 pass_working = 1; |
1242 lavc_venc_context.flags |= CODEC_FLAG_QSCALE; | |
1243 } | |
1242 break; | 1244 break; |
1243 } | 1245 } |
1244 | 1246 |
1245 if (avcodec_open(&lavc_venc_context, lavc_venc_codec) != 0) | 1247 if (avcodec_open(&lavc_venc_context, lavc_venc_codec) != 0) |
1246 { | 1248 { |