diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-04-15 13:39:48 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-04-15 13:39:48 +0000 |
commit | 6d8cc6f3e94e1f8d71aa85250f9107f93edaadf2 (patch) | |
tree | a5496291847ba2bf684503d9a9003878933d2585 /libmpcodecs/ve_lavc.c | |
parent | 04536ff9c564604c91b746ab02bf1607901562b5 (diff) |
2-pass qscale fixed
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5633 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/ve_lavc.c')
-rw-r--r-- | libmpcodecs/ve_lavc.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/libmpcodecs/ve_lavc.c b/libmpcodecs/ve_lavc.c index 8a3589e7ad..920766e6dc 100644 --- a/libmpcodecs/ve_lavc.c +++ b/libmpcodecs/ve_lavc.c @@ -153,7 +153,8 @@ static int config(struct vf_instance_s* vf, 5) == -1){ mp_msg(MSGT_MENCODER,MSGL_ERR,"2pass failed: filename=%s\n", passtmpfile); pass=0; - } + } else + lavc_venc_context.flags|=CODEC_FLAG_QSCALE|CODEC_FLAG_TYPE; // VBR break; } @@ -199,13 +200,8 @@ static void put_image(struct vf_instance_s* vf, mp_image_t *mpi){ if(pass==2){ // handle 2-pass: lavc_venc_context.flags|=CODEC_FLAG_QSCALE; // enable VBR lavc_venc_context.quality=VbrControl_get_quant(); -#ifdef CODEC_FLAG_TYPE - lavc_venc_context.flags|=CODEC_FLAG_TYPE; // force keyframes lavc_venc_context.key_frame=VbrControl_get_intra(); lavc_venc_context.gop_size=0x3fffffff; -#else -#error you should upgrade libavcodec... get latest CVS -#endif out_size = avcodec_encode_video(&lavc_venc_context, mux_v->buffer, mux_v->buffer_size, &lavc_venc_picture); VbrControl_update_2pass_vbr_encoding(lavc_venc_context.mv_bits, |