*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* 4MV & hq & b-frame encoding stuff by Michael Niedermayer <michaelni@gmx.at>
*/
break;
case CODEC_ID_H263:
if (h263_get_picture_format(s->width, s->height) == 7) {
- av_log(avctx, AV_LOG_INFO, "Input picture size isn't suitable for h263 codec! try h263+\n");
+ av_log(avctx, AV_LOG_INFO, "The specified picture size of %dx%d is not valid for the H.263 codec.\nValid sizes are 128x96, 176x144, 352x288, 704x576, and 1408x1152. Try H.263+.\n", s->width, s->height);
return -1;
}
s->out_format = FMT_H263;
emms_c();
s->last_pict_type = s->pict_type;
+ s->last_lambda_for[s->pict_type]= s->current_picture_ptr->quality;
if(s->pict_type!=B_TYPE){
s->last_non_b_pict_type= s->pict_type;
}
int is_p= i % (j+1) == j || i==s->max_b_frames;
input[i+1].pict_type= is_p ? P_TYPE : B_TYPE;
- input[i+1].quality= s->rc_context.last_qscale_for[input[i+1].pict_type];
+ input[i+1].quality= s->last_lambda_for[input[i+1].pict_type];
out_size = avcodec_encode_video(c, outbuf, outbuf_size, &input[i+1]);
rd += (out_size * lambda2) >> FF_LAMBDA_SHIFT;
}
estimate_qp(s, 1);
ff_get_2pass_fcode(s);
}else if(!(s->flags & CODEC_FLAG_QSCALE)){
- RateControlContext *rcc= &s->rc_context;
-
if(s->pict_type==B_TYPE)
- s->lambda= rcc->last_qscale_for[s->pict_type];
+ s->lambda= s->last_lambda_for[s->pict_type];
else
- s->lambda= rcc->last_qscale_for[rcc->last_non_b_pict_type];
+ s->lambda= s->last_lambda_for[s->last_non_b_pict_type];
update_qscale(s);
}