comparison x264.c @ 2568:f06d5bf3da71 libavcodec

B frames and CABAC/CAVLC selection by Erik Slagter (erik at slagter dot name)
author mru
date Sat, 19 Mar 2005 12:27:10 +0000
parents 1e52ef4887b5
children 980f66959698
comparison
equal deleted inserted replaced
2567:910cd8bd981f 2568:f06d5bf3da71
1 /* 1 /*
2 * H.264 encoding using the x264 library 2 * H.264 encoding using the x264 library
3 * Copyright (C) 2005 Måns Rullgård <mru@inprovide.com> 3 * Copyright (C) 2005 Mans Rullgard <mru@inprovide.com>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public 6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
134 x4->params.i_keyint_max = avctx->gop_size; 134 x4->params.i_keyint_max = avctx->gop_size;
135 x4->params.rc.i_bitrate = avctx->bit_rate / 1000; 135 x4->params.rc.i_bitrate = avctx->bit_rate / 1000;
136 x4->params.rc.i_rc_buffer_size = avctx->rc_buffer_size / 1000; 136 x4->params.rc.i_rc_buffer_size = avctx->rc_buffer_size / 1000;
137 if(avctx->rc_buffer_size) 137 if(avctx->rc_buffer_size)
138 x4->params.rc.b_cbr = 1; 138 x4->params.rc.b_cbr = 1;
139 x4->params.i_bframe = avctx->max_b_frames;
140 x4->params.b_cabac = avctx->coder_type == FF_CODER_TYPE_AC;
141
139 x4->params.rc.i_qp_min = avctx->qmin; 142 x4->params.rc.i_qp_min = avctx->qmin;
140 x4->params.rc.i_qp_max = avctx->qmax; 143 x4->params.rc.i_qp_max = avctx->qmax;
141 x4->params.rc.i_qp_step = avctx->max_qdiff; 144 x4->params.rc.i_qp_step = avctx->max_qdiff;
142 145
143 if(avctx->flags & CODEC_FLAG_QSCALE && avctx->global_quality > 0) 146 if(avctx->flags & CODEC_FLAG_QSCALE && avctx->global_quality > 0)