]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/libxvid_rc.c
threads: add sysconf based number of CPUs detection
[ffmpeg] / libavcodec / libxvid_rc.c
index c161ba71010b8e5b1c02e38dbbc0869afa63d464..b4bc715aeae4f599845721a7236ff5af52dd44de 100644 (file)
@@ -3,20 +3,20 @@
  *
  * Copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>
  *
- * This file is part of FFmpeg.
+ * This file is part of Libav.
  *
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
  *
- * FFmpeg is distributed in the hope that it will be useful,
+ * Libav is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
+ * License along with Libav; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
@@ -40,7 +40,7 @@ int ff_xvid_rate_control_init(MpegEncContext *s){
 
 //xvid_debug=-1;
 
-    fd=av_tempfile("xvidrc.", &tmp_name);
+    fd=ff_tempfile("xvidrc.", &tmp_name);
     if (fd == -1) {
         av_log(NULL, AV_LOG_ERROR, "Can't create temporary pass2 file.\n");
         return -1;
@@ -134,7 +134,7 @@ float ff_xvid_rate_estimate_qscale(MpegEncContext *s, int dry_run){
     if(!dry_run)
         s->rc_context.dry_run_qscale= 0;
 
-    if(s->pict_type == FF_B_TYPE) //FIXME this is not exactly identical to xvid
+    if(s->pict_type == AV_PICTURE_TYPE_B) //FIXME this is not exactly identical to xvid
         return xvid_plg_data.quant * FF_QP2LAMBDA * s->avctx->b_quant_factor + s->avctx->b_quant_offset;
     else
         return xvid_plg_data.quant * FF_QP2LAMBDA;