[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec avcodec.h, 1.393, 1.394 ffv1.c, 1.32, 1.33 g726.c, 1.5, 1.6 h263.c, 1.279, 1.280 huffyuv.c, 1.61, 1.62 mpeg12.c, 1.235, 1.236 mpegvideo.c, 1.480, 1.481 snow.c, 1.60, 1.61

Michael Niedermayer CVS michael
Sun May 8 22:15:46 CEST 2005


Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv910/libavcodec

Modified Files:
	avcodec.h ffv1.c g726.c h263.c huffyuv.c mpeg12.c mpegvideo.c 
	snow.c 
Log Message:
#defines for strict_std_compliance and split between inofficial extensions and non standarized things


Index: avcodec.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/avcodec.h,v
retrieving revision 1.393
retrieving revision 1.394
diff -u -d -r1.393 -r1.394
--- avcodec.h	30 Apr 2005 21:43:56 -0000	1.393
+++ avcodec.h	8 May 2005 20:15:42 -0000	1.394
@@ -954,7 +954,12 @@
      * - decoding: unused
      */
     int strict_std_compliance;
-    
+#define FF_COMPLIANCE_VERY_STRICT   2 ///< strictly conform to a older more strict version of the spec or reference software
+#define FF_COMPLIANCE_STRICT        1 ///< strictly conform to all the things in the spec no matter what consequences
+#define FF_COMPLIANCE_NORMAL        0
+#define FF_COMPLIANCE_INOFFICIAL   -1 ///< allow inofficial extensions
+#define FF_COMPLIANCE_EXPERIMENTAL -2 ///< allow non standarized experimental things
+
     /**
      * qscale offset between ip and b frames.
      * if > 0 then the last p frame quantizer will be used (q= lastp_q*factor+offset)

Index: ffv1.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/ffv1.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- ffv1.c	24 Apr 2005 17:21:08 -0000	1.32
+++ ffv1.c	8 May 2005 20:15:42 -0000	1.33
@@ -550,9 +550,9 @@
     FFV1Context *s = avctx->priv_data;
     int i;
 
-    if(avctx->strict_std_compliance >= 0){
+    if(avctx->strict_std_compliance >FF_COMPLIANCE_EXPERIMENTAL){
         av_log(avctx, AV_LOG_ERROR, "this codec is under development, files encoded with it may not be decodeable with future versions!!!\n"
-               "use vstrict=-1 / -strict -1 to use it anyway\n");
+               "use vstrict=-2 / -strict -2 to use it anyway\n");
         return -1;
     }
         

Index: g726.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/g726.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- g726.c	29 Dec 2004 17:50:25 -0000	1.5
+++ g726.c	8 May 2005 20:15:42 -0000	1.6
@@ -327,7 +327,7 @@
         av_log(avctx, AV_LOG_ERROR, "G726: unsupported audio format\n");
 	return -1;
     }
-    if (avctx->sample_rate != 8000 && avctx->strict_std_compliance>=0) {
+    if (avctx->sample_rate != 8000 && avctx->strict_std_compliance>FF_COMPLIANCE_INOFFICIAL) {
         av_log(avctx, AV_LOG_ERROR, "G726: unsupported audio format\n");
 	return -1;
     }

Index: h263.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/h263.c,v
retrieving revision 1.279
retrieving revision 1.280
diff -u -d -r1.279 -r1.280
--- h263.c	5 May 2005 14:34:47 -0000	1.279
+++ h263.c	8 May 2005 20:15:42 -0000	1.280
@@ -2408,9 +2408,9 @@
     
     if(s->pict_type==I_TYPE){
         if(!(s->flags&CODEC_FLAG_GLOBAL_HEADER)){
-            if(s->strict_std_compliance < 2) //HACK, the reference sw is buggy
+            if(s->strict_std_compliance < FF_COMPLIANCE_VERY_STRICT) //HACK, the reference sw is buggy
                 mpeg4_encode_visual_object_header(s);
-            if(s->strict_std_compliance < 2 || picture_number==0) //HACK, the reference sw is buggy
+            if(s->strict_std_compliance < FF_COMPLIANCE_VERY_STRICT || picture_number==0) //HACK, the reference sw is buggy
                 mpeg4_encode_vol_header(s, 0, 0);
         }
         if(!(s->workaround_bugs & FF_BUG_MS))

Index: huffyuv.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/huffyuv.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- huffyuv.c	24 Apr 2005 17:21:08 -0000	1.61
+++ huffyuv.c	8 May 2005 20:15:42 -0000	1.62
@@ -541,8 +541,8 @@
         }
         if(s->interlaced != ( s->height > 288 ))
             av_log(avctx, AV_LOG_INFO, "using huffyuv 2.2.0 or newer interlacing flag\n");
-    }else if(avctx->strict_std_compliance>=0){
-        av_log(avctx, AV_LOG_ERROR, "This codec is under development; files encoded with it may not be decodable with future versions!!! Set vstrict=-1 / -strict -1 to use it anyway.\n");
+    }else if(avctx->strict_std_compliance>FF_COMPLIANCE_EXPERIMENTAL){
+        av_log(avctx, AV_LOG_ERROR, "This codec is under development; files encoded with it may not be decodable with future versions!!! Set vstrict=-2 / -strict -2 to use it anyway.\n");
         return -1;
     }
     

Index: mpeg12.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mpeg12.c,v
retrieving revision 1.235
retrieving revision 1.236
diff -u -d -r1.235 -r1.236
--- mpeg12.c	30 Apr 2005 21:43:56 -0000	1.235
+++ mpeg12.c	8 May 2005 20:15:42 -0000	1.236
@@ -203,7 +203,7 @@
     for(i=1;i<14;i++) {
         int64_t n0= 1001LL/frame_rate_tab[i].den*frame_rate_tab[i].num*s->avctx->time_base.num;
         int64_t n1= 1001LL*s->avctx->time_base.den;
-        if(s->avctx->strict_std_compliance >= 0 && i>=9) break;
+        if(s->avctx->strict_std_compliance > FF_COMPLIANCE_INOFFICIAL && i>=9) break;
 
         d = ABS(n0 - n1);
         if(d < dmin){
@@ -225,7 +225,7 @@
         return -1;
 
     if(find_frame_rate_index(s) < 0){
-        if(s->strict_std_compliance >=0){
+        if(s->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL){
             av_log(avctx, AV_LOG_ERROR, "MPEG1/2 does not support %d/%d fps\n", avctx->time_base.den, avctx->time_base.num);
             return -1;
         }else{

Index: mpegvideo.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mpegvideo.c,v
retrieving revision 1.480
retrieving revision 1.481
diff -u -d -r1.480 -r1.481
--- mpegvideo.c	8 May 2005 09:58:41 -0000	1.480
+++ mpegvideo.c	8 May 2005 20:15:42 -0000	1.481
@@ -898,12 +898,12 @@
     }
 
     if(avctx->codec_id == CODEC_ID_MJPEG || avctx->codec_id == CODEC_ID_LJPEG){
-        if(avctx->strict_std_compliance>=0 && avctx->pix_fmt != PIX_FMT_YUVJ420P){
+        if(avctx->strict_std_compliance>FF_COMPLIANCE_INOFFICIAL && avctx->pix_fmt != PIX_FMT_YUVJ420P){
             av_log(avctx, AV_LOG_ERROR, "colorspace not supported in jpeg\n");
             return -1;
         }
     }else{
-        if(avctx->strict_std_compliance>=0 && avctx->pix_fmt != PIX_FMT_YUV420P){
+        if(avctx->strict_std_compliance>FF_COMPLIANCE_INOFFICIAL && avctx->pix_fmt != PIX_FMT_YUV420P){
             av_log(avctx, AV_LOG_ERROR, "colorspace not supported\n");
             return -1;
         }

Index: snow.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/snow.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- snow.c	25 Apr 2005 18:29:05 -0000	1.60
+++ snow.c	8 May 2005 20:15:42 -0000	1.61
@@ -3340,9 +3340,9 @@
     SnowContext *s = avctx->priv_data;
     int plane_index;
 
-    if(avctx->strict_std_compliance >= 0){
+    if(avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL){
         av_log(avctx, AV_LOG_ERROR, "this codec is under development, files encoded with it may not be decodable with future versions!!!\n"
-               "use vstrict=-1 / -strict -1 to use it anyway\n");
+               "use vstrict=-2 / -strict -2 to use it anyway\n");
         return -1;
     }
  





More information about the ffmpeg-cvslog mailing list