Mercurial > libavcodec.hg
comparison ratecontrol.c @ 3203:a78cc2e4b90e libavcodec
fix frametypes with xvid_rc
| author | michael |
|---|---|
| date | Sat, 18 Mar 2006 20:43:48 +0000 |
| parents | 646f6344472d |
| children | 19e9a62ddf1b |
comparison
equal
deleted
inserted
replaced
| 3202:89348aaf566e | 3203:a78cc2e4b90e |
|---|---|
| 115 return -1; | 115 return -1; |
| 116 } | 116 } |
| 117 | 117 |
| 118 p= next; | 118 p= next; |
| 119 } | 119 } |
| 120 | |
| 121 if(init_pass2(s) < 0) return -1; | |
| 122 | |
| 120 //FIXME maybe move to end | 123 //FIXME maybe move to end |
| 121 if((s->flags&CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID) { | 124 if((s->flags&CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID) { |
| 122 #ifdef CONFIG_XVID | 125 #ifdef CONFIG_XVID |
| 123 return ff_xvid_rate_control_init(s); | 126 return ff_xvid_rate_control_init(s); |
| 124 #else | 127 #else |
| 125 av_log(s->avctx, AV_LOG_ERROR, "XviD ratecontrol requires libavcodec compiled with XviD support\n"); | 128 av_log(s->avctx, AV_LOG_ERROR, "XviD ratecontrol requires libavcodec compiled with XviD support\n"); |
| 126 return -1; | 129 return -1; |
| 127 #endif | 130 #endif |
| 128 } | 131 } |
| 129 | |
| 130 if(init_pass2(s) < 0) return -1; | |
| 131 } | 132 } |
| 132 | 133 |
| 133 if(!(s->flags&CODEC_FLAG_PASS2)){ | 134 if(!(s->flags&CODEC_FLAG_PASS2)){ |
| 134 | 135 |
| 135 rcc->short_term_qsum=0.001; | 136 rcc->short_term_qsum=0.001; |
