changeset 1904:129236143f2e libavcodec

warning patrol
author mellum
date Wed, 24 Mar 2004 23:32:48 +0000
parents c94b19667d8b
children 2761950695cc
files 4xm.c avcodec.h dv.c flac.c interplayvideo.c motion_est.c mpeg12.c mpegvideo.c
diffstat 8 files changed, 9 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/4xm.c	Mon Mar 22 20:54:04 2004 +0000
+++ b/4xm.c	Wed Mar 24 23:32:48 2004 +0000
@@ -354,7 +354,7 @@
     }
     
     if(bitstream_size != (get_bits_count(&f->gb)+31)/32*4)
-        av_log(f->avctx, AV_LOG_ERROR, " %d %d %d bytes left\n", 
+        av_log(f->avctx, AV_LOG_ERROR, " %d %zd %zd bytes left\n", 
             bitstream_size - (get_bits_count(&f->gb)+31)/32*4, 
             bytestream_size - (f->bytestream - (buf + 20 + bitstream_size + wordstream_size)),
             wordstream_size - (((uint8_t*)f->wordstream) - (buf + 20 + bitstream_size))
--- a/avcodec.h	Mon Mar 22 20:54:04 2004 +0000
+++ b/avcodec.h	Wed Mar 24 23:32:48 2004 +0000
@@ -1895,6 +1895,7 @@
 
 void avcodec_get_context_defaults(AVCodecContext *s);
 AVCodecContext *avcodec_alloc_context(void);
+void avcodec_get_frame_defaults(AVFrame *pic);
 AVFrame *avcodec_alloc_frame(void);
 
 int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic);
--- a/dv.c	Mon Mar 22 20:54:04 2004 +0000
+++ b/dv.c	Wed Mar 24 23:32:48 2004 +0000
@@ -113,7 +113,7 @@
 	    return -ENOMEM;
 	}
 	for (i=0; i<12*27; i++)
-	    (int)dv_anchor[i] = i;
+	    dv_anchor[i] = (void*)(size_t)i;
 	
         /* NOTE: as a trick, we use the fact the no codes are unused
            to accelerate the parsing of partial codes */
@@ -896,7 +896,7 @@
 static int dv_decode_mt(AVCodecContext *avctx, void* sl)
 {
     DVVideoContext *s = avctx->priv_data;
-    int slice = (int)sl;
+    int slice = (size_t)sl;
     dv_decode_video_segment(s, &s->buf[((slice/27)*6+(slice/3)+slice*5+7)*80],
 	                    &s->sys->video_place[slice*5]);
     return 0;
@@ -905,7 +905,7 @@
 static int dv_encode_mt(AVCodecContext *avctx, void* sl)
 {
     DVVideoContext *s = avctx->priv_data;
-    int slice = (int)sl;
+    int slice = (size_t)sl;
     dv_encode_video_segment(s, &s->buf[((slice/27)*6+(slice/3)+slice*5+7)*80],
 	                    &s->sys->video_place[slice*5]);
     return 0;
--- a/flac.c	Mon Mar 22 20:54:04 2004 +0000
+++ b/flac.c	Wed Mar 24 23:32:48 2004 +0000
@@ -753,7 +753,6 @@
 }
 
 static void flac_flush(AVCodecContext *avctx){
-    int i;
     FLACContext *s = avctx->priv_data;
 
     s->bitstream_size=
--- a/interplayvideo.c	Mon Mar 22 20:54:04 2004 +0000
+++ b/interplayvideo.c	Wed Mar 24 23:32:48 2004 +0000
@@ -846,7 +846,7 @@
     }
     if ((s->stream_ptr != s->stream_end) &&
         (s->stream_ptr + 1 != s->stream_end)) {
-        av_log(s->avctx, AV_LOG_ERROR, " Interplay video: decode finished with %d bytes left over\n",
+        av_log(s->avctx, AV_LOG_ERROR, " Interplay video: decode finished with %zd bytes left over\n",
             s->stream_end - s->stream_ptr);
     }
 }
--- a/motion_est.c	Mon Mar 22 20:54:04 2004 +0000
+++ b/motion_est.c	Wed Mar 24 23:32:48 2004 +0000
@@ -774,10 +774,6 @@
     int same=1;
     const int stride= s->linesize;
     const int uvstride= s->uvlinesize;
-    const int xmin= s->me.xmin;
-    const int ymin= s->me.ymin;
-    const int xmax= s->me.xmax;
-    const int ymax= s->me.ymax;
 
     for(block=0; block<4; block++){
         int mx4, my4;
--- a/mpeg12.c	Mon Mar 22 20:54:04 2004 +0000
+++ b/mpeg12.c	Wed Mar 24 23:32:48 2004 +0000
@@ -242,7 +242,7 @@
 {
         unsigned int vbv_buffer_size;
         unsigned int fps, v;
-        int n, i;
+        int i;
         uint64_t time_code;
         float best_aspect_error= 1E10;
         float aspect_ratio= av_q2d(s->avctx->sample_aspect_ratio);
@@ -954,7 +954,7 @@
 static VLC mb_btype_vlc;
 static VLC mb_pat_vlc;
 
-static void init_vlcs()
+static void init_vlcs(void)
 {
     static int done = 0;
 
@@ -2821,7 +2821,7 @@
         input_size = buf_end - buf_ptr;
 
         if(avctx->debug & FF_DEBUG_STARTCODE){
-            av_log(avctx, AV_LOG_DEBUG, "%3X at %d left %d\n", start_code, buf_ptr-buf, input_size);
+            av_log(avctx, AV_LOG_DEBUG, "%3X at %zd left %d\n", start_code, buf_ptr-buf, input_size);
         }
 
                 /* prepare data for next start code */
--- a/mpegvideo.c	Mon Mar 22 20:54:04 2004 +0000
+++ b/mpegvideo.c	Wed Mar 24 23:32:48 2004 +0000
@@ -3382,7 +3382,6 @@
     int dct_offset   = s->linesize*8; //default for progressive frames
     uint8_t *ptr_y, *ptr_cb, *ptr_cr;
     int wrap_y, wrap_c;
-    int emu=0;
     
     for(i=0; i<6; i++) skip_dct[i]=0;
     
@@ -4580,7 +4579,6 @@
 
 static void encode_picture(MpegEncContext *s, int picture_number)
 {
-    int mb_x, mb_y;
     int i, j;
     int bits;
 
@@ -5141,7 +5139,6 @@
     int prev_run=0;
     int prev_level=0;
     int qmul, qadd, start_i, last_non_zero, i, dc;
-    const int esc_length= s->ac_esc_length;
     uint8_t * length;
     uint8_t * last_length;
     int lambda;
@@ -5249,7 +5246,6 @@
 #endif
     for(;;){
         int best_score=s->dsp.try_8x8basis(rem, weight, basis[0], 0);
-        int nochange_score= best_score;
         int best_coeff=0;
         int best_change=0;
         int run2, best_unquant_change, analyze_gradient;