changeset 2635:eaa57c3336fc libavcodec

PIX_FMT_NONE and related fixes
author michael
date Mon, 25 Apr 2005 18:29:06 +0000
parents 337217ecbb3e
children 2344c6713011
files asv1.c avcodec.h rv10.c snow.c utils.c
diffstat 5 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/asv1.c	Mon Apr 25 10:03:01 2005 +0000
+++ b/asv1.c	Mon Apr 25 18:29:06 2005 +0000
@@ -557,6 +557,7 @@
     common_init(avctx);
     init_vlcs(a);
     ff_init_scantable(a->dsp.idct_permutation, &a->scantable, scantab);
+    avctx->pix_fmt= PIX_FMT_YUV420P;
 
     a->inv_qscale= ((uint8_t*)avctx->extradata)[0];
     if(a->inv_qscale == 0){
--- a/avcodec.h	Mon Apr 25 10:03:01 2005 +0000
+++ b/avcodec.h	Mon Apr 25 18:29:06 2005 +0000
@@ -17,7 +17,7 @@
 
 #define FFMPEG_VERSION_INT     0x000409
 #define FFMPEG_VERSION         "0.4.9-pre1"
-#define LIBAVCODEC_BUILD       4752
+#define LIBAVCODEC_BUILD       4753
 
 #define LIBAVCODEC_VERSION_INT FFMPEG_VERSION_INT
 #define LIBAVCODEC_VERSION     FFMPEG_VERSION
@@ -206,6 +206,7 @@
  * to run on the IBM VGA graphics adapter use 6-bit palette components.
  */
 enum PixelFormat {
+    PIX_FMT_NONE= -1,
     PIX_FMT_YUV420P,   ///< Planar YUV 4:2:0 (1 Cr & Cb sample per 2x2 Y samples)
     PIX_FMT_YUV422,    ///< Packed pixel, Y0 Cb Y1 Cr 
     PIX_FMT_RGB24,     ///< Packed pixel, 3 bytes per pixel, RGBRGB...
--- a/rv10.c	Mon Apr 25 10:03:01 2005 +0000
+++ b/rv10.c	Mon Apr 25 18:29:06 2005 +0000
@@ -560,7 +560,9 @@
     if(avctx->debug & FF_DEBUG_PICT_INFO){
         av_log(avctx, AV_LOG_DEBUG, "ver:%X ver0:%X\n", avctx->sub_id, avctx->extradata_size >= 4 ? ((uint32_t*)avctx->extradata)[0] : -1);
     }
-    
+
+    avctx->pix_fmt = PIX_FMT_YUV420P;
+
     if (MPV_common_init(s) < 0)
         return -1;
 
@@ -576,8 +578,6 @@
                  rv_chrom_code, 2, 2, 1);
         done = 1;
     }
-    
-    avctx->pix_fmt = PIX_FMT_YUV420P;
 
     return 0;
 }
--- a/snow.c	Mon Apr 25 10:03:01 2005 +0000
+++ b/snow.c	Mon Apr 25 18:29:06 2005 +0000
@@ -3652,6 +3652,8 @@
 {
     SnowContext *s = avctx->priv_data;
     int block_size;
+    
+    avctx->pix_fmt= PIX_FMT_YUV420P;
 
     common_init(avctx);
     
--- a/utils.c	Mon Apr 25 10:03:01 2005 +0000
+++ b/utils.c	Mon Apr 25 18:29:06 2005 +0000
@@ -459,6 +459,7 @@
     s->profile= FF_PROFILE_UNKNOWN;
     s->level= FF_LEVEL_UNKNOWN;
     s->me_penalty_compensation= 256;
+    s->pix_fmt= PIX_FMT_NONE;
     
     s->intra_quant_bias= FF_DEFAULT_QUANT_BIAS;
     s->inter_quant_bias= FF_DEFAULT_QUANT_BIAS;