changeset 932:176fd8c8e8a8 libavcodec

mb qp limits
author michaelni
date Wed, 18 Dec 2002 10:09:43 +0000
parents 5bc072934017
children 8254eac24488
files avcodec.h ratecontrol.c utils.c
diffstat 3 files changed, 21 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/avcodec.h	Wed Dec 18 09:23:24 2002 +0000
+++ b/avcodec.h	Wed Dec 18 10:09:43 2002 +0000
@@ -5,8 +5,8 @@
 
 #define LIBAVCODEC_VERSION_INT 0x000406
 #define LIBAVCODEC_VERSION     "0.4.6"
-#define LIBAVCODEC_BUILD       4645
-#define LIBAVCODEC_BUILD_STR   "4645"
+#define LIBAVCODEC_BUILD       4646
+#define LIBAVCODEC_BUILD_STR   "4646"
 
 enum CodecID {
     CODEC_ID_NONE, 
@@ -828,6 +828,7 @@
 #define FF_DEBUG_QP        16
 #define FF_DEBUG_MV        32
 #define FF_DEBUG_VIS_MV    64
+#define FF_DEBUG_SKIP      128
     
     /**
      * error
@@ -835,6 +836,20 @@
      * decoding: unused
      */
     uint64_t error[4];
+    
+    /**
+     * minimum MB quantizer
+     * encoding: set by user.
+     * decoding: unused
+     */
+    int mb_qmin;
+
+    /**
+     * maximum MB quantizer
+     * encoding: set by user.
+     * decoding: unused
+     */
+    int mb_qmax;
 } AVCodecContext;
 
 typedef struct AVCodec {
--- a/ratecontrol.c	Wed Dec 18 09:23:24 2002 +0000
+++ b/ratecontrol.c	Wed Dec 18 10:09:43 2002 +0000
@@ -474,8 +474,8 @@
     float cplx_sum= 0.0;
     float cplx_tab[s->mb_num];
     float bits_tab[s->mb_num];
-    const int qmin= 2; //s->avctx->mb_qmin;
-    const int qmax= 31; //s->avctx->mb_qmax;
+    const int qmin= s->avctx->mb_qmin;
+    const int qmax= s->avctx->mb_qmax;
     Picture * const pic= &s->current_picture;
     
     for(i=0; i<s->mb_num; i++){
--- a/utils.c	Wed Dec 18 09:23:24 2002 +0000
+++ b/utils.c	Wed Dec 18 10:09:43 2002 +0000
@@ -217,6 +217,8 @@
     s->bit_rate_tolerance= s->bit_rate*10;
     s->qmin= 2;
     s->qmax= 31;
+    s->mb_qmin= 2;
+    s->mb_qmax= 31;
     s->rc_eq= "tex^qComp";
     s->qcompress= 0.5;
     s->max_qdiff= 3;